Repository navigation
feat(repo): prune dead protected-cache entries on save - #204
Conversation
ProtectedCache::save skips entries whose file is gone from the checkout, so .sc/protected-cache and .sc/ws/cache-<i> stay bounded by the protected files present. A lookup compares the keyed tag of plaintext read from the file, so an entry for an absent file is never consulted; dropping it costs at most one re-seal. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0d0925b35a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codex: is_file() follows symlinks, so a file replaced by a symlink (or under a symlinked directory) kept a dead entry the walker can never consult. Check each path component with symlink_metadata instead. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
tonibergholm-codento
left a comment
There was a problem hiding this comment.
Required checks green on 6a244bf; reviewer and Codex findings fixed and resolved.
* fix(repo,cli): accept bracketed IPv6 hosts in sc+http(s):// urls (#219) ScHttpUrl::parse split on the first ':' and rejected [::1]:7777. It now unbrackets the host (kept bare for TLS name checks and the pin key) and re-brackets it for the connect address, Host header, pin file and display. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * docs(repo,cli): reword the .sc gate claim and fix rustdoc warnings (#219) Since #207 the 404 for a missing repo follows the auth gate. Plain code spans replace links from public docs to private items; two clap doc comments no longer parse as HTML or an intra-doc link. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * test(repo): cover the --theirs carry edges and ws cache pruning (#219) Theirs-side resolve carry (#205): rebase --continue, a convergent blob on their side, the seal fallback when their wrap list is missing, and the documented under-grant after a grant on our side. Protected-cache pruning (#204): a live workspace's .sc/ws/cache-<i> drops a deleted protected file. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * fix(repo,cli): canonical IPv6 pin keys, accurate gate wording, IPv6 pin CLI test (#219) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * fix(repo): read pin-file keys with the URL authority grammar (#219) A bracketed DNS name such as [example.com]:8730 had its brackets stripped and became a live pin. parse_line now uses split_authority, so brackets must hold an IPv6 literal and anything else is skipped. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Closes the protected-cache hygiene follow-on in ROADMAP.md.
ProtectedCache::savenow skips entries whose file is no longer on disk (deleted, renamed, outside the sparse view). The cache file stays bounded by the protected files present instead of growing for the life of the repo. Lookups compare the keyed tag of plaintext read from the file, so an entry for an absent file is never consulted; a dropped entry costs at most one re-seal if the path returns.Verification: new test
save_drops_entries_for_files_no_longer_on_disk;cargo clippy --workspace --all-targets -- -D warningsclean;cargo test --workspace982 passed, 0 failed.🤖 Generated with Claude Code
Summary by CodeRabbit