Skip to content

fix: gracefully handle legacy 2-line meta file#3

Merged
nmccready merged 1 commit into
mainfrom
fix/graceful-legacy-meta
Apr 24, 2026
Merged

fix: gracefully handle legacy 2-line meta file#3
nmccready merged 1 commit into
mainfrom
fix/graceful-legacy-meta

Conversation

@nmccready
Copy link
Copy Markdown
Contributor

Summary

  • When upgrading from the shell-based envcache, the meta file has 2 lines (date + timestamp) instead of the Rust version's 3 (+ secrets hash)
  • Previously this errored with malformed meta file: expected 3 lines, got 2
  • Now treats any malformed/legacy meta as stale and triggers a fresh resolve instead of failing

Test plan

  • All 13 existing tests pass
  • Verified: old 2-line meta triggers refresh instead of error
  • Verified: after refresh, new 3-line meta works on subsequent runs

🤖 Generated with Claude Code

@nmccready nmccready force-pushed the fix/graceful-legacy-meta branch from be495b9 to 19246a7 Compare April 23, 2026 12:20
Instead of swallowing all read_meta errors, fix the parser itself:
- Filter blank lines before indexing
- Accept 2-line (date + timestamp) legacy meta from shell era
- Default missing secrets_hash to empty string (triggers refresh via mismatch)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nmccready nmccready force-pushed the fix/graceful-legacy-meta branch from 19246a7 to c7102a2 Compare April 23, 2026 12:22
@nmccready nmccready merged commit e4fb154 into main Apr 24, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant