Skip to content

perf(sessions): reuse proven prefixes in the backlog measure - #4534

Merged
ScriptedAlchemy merged 2 commits into
masterfrom
fix/s2-4514-backlog-prefix-cache
Oct 28, 2026
Merged

ScriptedAlchemy merged 2 commits into
masterfrom
fix/s2-4514-backlog-prefix-cache

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Merge #4478 first, followed by #4526, #4510, #4524, #4489, #4485, #4527, #4528, #4530, #4531, #4529, #4534, and #4541.

This PR is number 12 of 13, based on #4529. Merge #4541 next.

Use merge commits. After merging a parent PR, change its child's base to master before merging the child. Auto-merge is disabled.

Fixes #4514.

Status and doctor reuse settled transcript-prefix proofs instead of hashing unchanged admitted history on every read. Reuse requires the same native file identity, size, settled rewrite witness, and committed checkpoints. Changed or unsupported witnesses require byte-exact prefix validation.

The registered store owner now owns the proof state. Independently issued read/write and read-only leases share it; weak issuers retain only weak references. Successful retirement releases that state, so remounting the same database path revalidates its transcripts. A reversible retirement refusal preserves the existing owner's warm proofs. Only completed health walks replace their provider partition, and poisoned state returns a typed database error.

Verification through Bazel:

  • A real project-scoped Claude transcript reproduced stale proof reuse after retirement, then passed unchanged with the fix.
  • Nine health cases passed, including same-length rewrites, truncation, failed-walk publication, and warm reuse after retirement refusal.
  • Three proof-state cases, four registered-owner cases, and the existing exact retirement rollback control passed.
  • Formatting and Clippy passed for all three affected targets. Independent source review found no introduced production defect. Normal commit hooks passed.

@changeset-bot

changeset-bot Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 6abb7aa

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

devin-ai-integration[bot]

This comment was marked as resolved.

@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/static-context-tool-description branch from bafe3fd to 8dfc5c0 Compare October 25, 2026 10:36
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/s2-4514-backlog-prefix-cache branch from c6fdef1 to 8dfc5c0 Compare October 25, 2026 10:36
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/static-context-tool-description branch from 8dfc5c0 to f147012 Compare October 25, 2026 11:27
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/s2-4514-backlog-prefix-cache branch from 8c0b813 to 1827cd3 Compare October 25, 2026 11:27
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/static-context-tool-description branch from f147012 to 51d151e Compare October 25, 2026 13:27
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/s2-4514-backlog-prefix-cache branch from 1827cd3 to 5d0ce78 Compare October 25, 2026 13:27
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/static-context-tool-description branch from 51d151e to c8b0cff Compare October 25, 2026 19:42
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/s2-4514-backlog-prefix-cache branch from 800fb2c to 7fe08fa Compare October 25, 2026 19:42
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/static-context-tool-description branch from c8b0cff to 9174d4f Compare October 25, 2026 20:06
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/s2-4514-backlog-prefix-cache branch from 7fe08fa to 872e5bf Compare October 25, 2026 20:06
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/static-context-tool-description branch from 3492b08 to d623d23 Compare October 26, 2026 03:42
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/s2-4514-backlog-prefix-cache branch from ea9438a to c90e8f7 Compare October 26, 2026 08:58
ScriptedAlchemy added a commit that referenced this pull request Oct 26, 2026
Restack unique #4541 onto the rewritten #4534 tip.
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/static-context-tool-description branch from fe25235 to 8b5f906 Compare October 26, 2026 19:14
ScriptedAlchemy added a commit that referenced this pull request Oct 26, 2026
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/s2-4514-backlog-prefix-cache branch from c90e8f7 to 1c2920a Compare October 26, 2026 19:14
ScriptedAlchemy added a commit that referenced this pull request Oct 26, 2026
Restack unique #4541 onto the rewritten #4534 tip.
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/static-context-tool-description branch from 8b5f906 to 45031c0 Compare October 26, 2026 19:26
ScriptedAlchemy added a commit that referenced this pull request Oct 26, 2026
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/s2-4514-backlog-prefix-cache branch from 1c2920a to 8db6baa Compare October 26, 2026 19:26
ScriptedAlchemy added a commit that referenced this pull request Oct 26, 2026
Restack unique #4541 onto the rewritten #4534 tip.
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/static-context-tool-description branch from 45031c0 to 1e4aa82 Compare October 26, 2026 19:59
ScriptedAlchemy added a commit that referenced this pull request Oct 26, 2026
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/s2-4514-backlog-prefix-cache branch from 8db6baa to 8eb6517 Compare October 26, 2026 19:59
ScriptedAlchemy added a commit that referenced this pull request Oct 26, 2026
Restack unique #4541 onto the rewritten #4534 tip.
ScriptedAlchemy and others added 2 commits October 27, 2026 14:09
Restack unique #4534 onto the rewritten #4529 tip.

(cherry picked from commit 8eb6517)
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/s2-4514-backlog-prefix-cache branch from 8255fc5 to 6abb7aa Compare October 27, 2026 21:39
@ScriptedAlchemy
ScriptedAlchemy changed the base branch from fix/static-context-tool-description to master October 27, 2026 21:39
@ScriptedAlchemy
ScriptedAlchemy enabled auto-merge (squash) October 27, 2026 21:40
ScriptedAlchemy added a commit that referenced this pull request Oct 27, 2026
Restack unique #4541 onto the rewritten #4534 tip.

(cherry picked from commit c41f943)
auto-merge was automatically disabled October 27, 2026 21:48

Pull request was closed

@ScriptedAlchemy
ScriptedAlchemy enabled auto-merge (squash) October 27, 2026 21:48
@ScriptedAlchemy

Copy link
Copy Markdown
Owner Author

Included in the integration PR #4589, which runs CI once for all open PRs. This PR will be marked merged automatically when #4589 lands.

@ScriptedAlchemy
ScriptedAlchemy merged commit 6b20b5d into master Oct 28, 2026
9 of 17 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.

sessions: backlog measure re-hashes all transcript history on every status call

1 participant