fix(code-index): keep sealed generation when freshness proof expires - #1818
Conversation
|
|
Pairs with #1825 (clone copy off freshness receipt). Merge order: either works independently; land both for the full ~90s rebuild path. |
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a2f50b7970
ℹ️ 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".
| // does not name this generation. The sealed digests are the proof. | ||
| // Graph-off still captures so a metadata-only drift is verified | ||
| // without a full decode when the quiet witness is absent. | ||
| if sealed_bytes_match && (quiet_witness || !rebuild_changed_source_without_decode) { |
There was a problem hiding this comment.
Rebuild when the source revision changes
When graph activation is enabled and the checkout moves to another commit or branch whose indexed source bytes are identical (for example, a docs-only commit), sealed_bytes_match remains true and !rebuild_changed_source_without_decode makes this return Noop even though the Git witness changed. This skips the later reference/source_revision comparisons in finish_retained_reconcile, marks the old generation current, and can leave its stale commit/reference attribution in place indefinitely until code bytes change; require the resolved revision to match the retained snapshot, or run the authoritative capture before accepting the generation.
AGENTS.md reference: AGENTS.md:L177-L178
Useful? React with 👍 / 👎.
|
Cancelled CI run 35427551242: this fixes the same defect as f2ab808 + 8b75523 (clone-postings occurrence indexes, per-page resume reads) on |
|
Correction to my previous comment: this PR is not a duplicate of the clone-postings fix; that text was meant for #1824/#1830. I cancelled the run only to keep the shared runner queue (2 concurrent, ~20 deep) moving while #1797 waits; this PR gets its own review agent and a fresh dispatch afterwards. Apologies for the noise. |
e441823 to
35ac50f
Compare
35ac50f to
5bb2534
Compare
A seal or clone backfill outlives the 30s freshness window. Expiry and a predecessor witness used to clear the newer generation and reseal it. Unchanged sealed bytes now rebind that proof instead. Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
The seat-swap witness does not own the lexical full-copy. That copy stays on the retained successor driver. Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Dropping the witness generation-id guard let the graph-on retained reconcile return `Noop` whenever the sealed file digests still matched, including after a commit or branch switch that touches no indexed byte (an empty or docs-only commit). `accept_unchanged_sealed_snapshot` then persisted the new git-metadata sample onto the retained generation's witness, so the stale `reference`/`source_revision` attribution stayed masked until code bytes moved. `finish_retained_reconcile` rebuilds on exactly that drift, and `branch_generations` resolves generations by the commit they sealed, so the retained generation must not outlive it. Gate the accept on the attribution a fresh capture would seal: HEAD's ref must still match the snapshot's, and a snapshot that sealed a revision must still name HEAD's commit. `self.identity` is re-resolved a few lines above, so this adds no walk. A snapshot sealed from a dirty tree carries no revision and keeps the fast path. Verified by `a_moved_commit_refuses_the_sealed_generation_despite_identical_bytes`, which fails on the parent commit with `Some(Noop(..))`. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
5bb2534 to
c1633dd
Compare
|
Folded into #1848 at an earlier head; the commits this branch received afterwards are being reviewed for the next integration batch (ci/pr-batch-e). Leaving open until that batch lands. |
Summary
e1300458e4333902b37cd6772e9e5742e0ac885e(fix(sessions): drop the u64 identity conversion clippy rejects #1858). The scheduler delta is unchanged.reference/source_revisionno longer names HEAD. Identical bytes are not enough.76c58af7e25dde6daa330bab74af5ee281d98c61).serving.rsvsreconcile.rs/registry/mount.rs). Neither PR subsumes the other.Dispatch SHA:
c1633dd96bb0f70d89d5a33cc64c3d5c35d71dfaClippy on runs 35442002957 / 35442004499 failed in
tracedecay-sessions(u64::try_fromofMetadata::len) before this crate was checked. That one-liner is now on master via #1858. This head does not carry a second copy.cargo clippy -p tracedecay-code-index-runtime -p tracedecay-sessions --all-targets --locked -- -D warningspassed on the scheduler tree this head still has.Does not touch
.github/workflows/ci.yml.Test plan
cargo test -p tracedecay-code-index-runtime --lib sealed_generation— 5 passed, including the moved-commit refusal and the expired-proof and predecessor-witness keeps. Five adjacent currency tests passed. Scheduler sources are byte-identical to that run after this rebase.cursor_cas_lost_on_a_partially_covered_window_replays_the_tail— 1 passed on the length line fix(sessions): drop the u64 identity conversion clippy rejects #1858 landed.Checklist
CHANGELOG.mdupdated (release-please owns the published notes)