Repository navigation
fix(transcript): keep derived history record identities unique - #11783
Merged
esengine merged 1 commit intoOct 4, 2026
Merged
Conversation
Interrupted-attempt records are persisted without a message id, so stampHistoryRows derived "m::notice:0" for every one of them and NewProjection rejected the whole baseline, leaving the session unopenable across restarts. Disambiguate the derived address the same way repairCheckpointRecordIdentities already does. Canonical duplicates are untouched and still rejected. Refs esengine#10456
Contributor
|
Thanks, this is a clean fix. I merged it onto current main-v2: the transcript tests pass, reverting the production change fails the new test with the shared |
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.
Summary
stampHistoryRowsderives its last-resort record address asm:<messageID>:notice:<i>. Interrupted-attempt records are persisted without a message id, so two of them both derivem::notice:0,NewProjectionrejects the whole baseline, and the session cannot be opened at all — including after a restart.Disambiguated with a
usedset, the way the siblingrepairCheckpointRecordIdentitiesalready does. Canonicalm:/tool:addresses are untouched, so genuine duplicates are still rejected.Issues
Refs #10456 — I could not reproduce that report's exact identity (
tool:call_00_…), only the derivedm::notice:Ncollision, soRefsrather thanFixes.Verification
go test ./internal/transcript/green;gofmt -landgo vetclean. Two new tests, both built from the production constructoragent.InterruptedStreamRecord:TestHistoryKeepsDerivedRecordIdentitiesUnique— reverting the fix fails it withrows 1 and 3 share record identity "m::notice:0".TestHistoryKeepsCanonicalDuplicatesRejected— inverse guard;tool:reused-calltwice must still fail.Linux, root module only. Two failures elsewhere (
control TestServeForkStartsNoBroaderThanInheritedReadOnly,agent TestRepairSessionListingProjectionHealsRecoveryLedgerOnce) also fail on a cleanmain-v2with this change stashed.Documentation impact
Documentation-impact: none - no user-visible behavior change.
Cache impact
Cache-impact: none - display projection only.
Cache-guard: n/a;
internal/transcriptrecords never enter provider messages.System-prompt-review: N/A