Repository navigation
fix(storage): preserve committed response-handle lifetimes - #5009
Merged
Merged
Conversation
ScriptedAlchemy
enabled auto-merge (squash)
November 29, 2026 05:44
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The registered response-handle store still treats a valid creation timestamp later than the current wall clock as corruption. A backwards clock correction therefore makes a previously issued handle unreadable; replaying the same content rewrites its creation and expiry backwards.
The consolidation also lacked direct evidence for interruption after a successful SQL commit and between expiry-cleanup batches.
Changes
No production fault hook, schema change, new storage owner, or compatibility reader is introduced.
Completion of #4448
The retained transition policy is explicit: pre-upgrade filesystem handles return the existing typed, retryable
handle_not_foundand require rerunning the original tool. The repository's current no-legacy policy supersedes the issue's proposed compatibility reader; this PR does not claim that old JSON handle contents survive that transition.Page retrieval continues to read and verify the full record. #4979 measured the existing SQLite TEXT slicing path as more expensive than a sequential copy; omitting the whole-record digest check would lose corrupt-content refusal. This PR preserves that deliberate choice and the external bounded paging contract.
Validation
git diff --checkpasses.75f5fb073aeea63e1db04bc13513937a8de6cd82passed 182/182 targets: 50 executed and 132 cached. The hook/LSP suite actually ran in 25.7 seconds and the full MCP suite in 277.8 seconds. The global-db unit suite was a valid cached pass from its 218.3-second execution; these results are not claimed as local runtime runs.Full CI fixture preparation
The first Linux run exposed a hook-fixture preparation wait that reused the 10-second
PROMPT_DRAINbudget. Daemon startup had already completed; the project reached graph admission at 9,880 ms and session capability publication at 9,914 ms, before the independent-owner hold marker existed.The fixture now waits for that existing
.enteredowner gate while checking that its daemon remains alive, as the shared startup harness does. The enclosing Bazel test timeout bounds a stalled setup. All actual 10-second failure-status, receipt-drain, and recovery assertions remain unchanged, including the shared elapsed repair budget, durable corrupt receipt, orchestrator hold, and final release.That run also failed the existing MCP fact-add journey at capability expiry. The fact journey and its production expiry handling are unchanged. The corrected head's full MCP suite passed in the Linux run linked above, validating that unchanged journey alongside the corrected hook fixture.
Focused target:
bazel test //crates/tracedecay-global-db:unit_test --test_arg=response_handles::tests:: --test_output=all.The tests exercise actual registered-store commits and reopen operations. They do not simulate power loss or assert new latency thresholds for product behavior.
Closes #4448.