Repository navigation
Keep Sidekick response identities distinct - #1236
Conversation
taras
left a comment
There was a problem hiding this comment.
Independent Fable review: PASS on a6c9a9f99e83784bd0ebb6f689f8aac88168772b. Published from the original Fable review receipt produced by the combined XMD workflow. No blocking findings.
Fable verified that response IDs are distinct from legacy IDs and that replies, controls, and feedback use the same ID while turn attribution still comes from the saved turn. Cold reopen preserved both the recorded operations and the journal bytes without new prompts or writes. The duplicate-slot refusal remains in place, and the legacy orphan still reconciles with its own response.
The focused recovery, dispatch, lifecycle, journey, and presentation tests passed. Fable did not rerun the regression against the old writer or run the full CI battery. The uniqueness argument depends on append-only history and appending the request before persisting or showing its response ID. The required CI and main-health gates remain separate.
taras
left a comment
There was a problem hiding this comment.
Independent Fable review
PASS on be8729723f0046b7eda4336030aeccee40475fff. Fable reviewed the correction against a6c9a9f99e with performance explicitly in scope and found no blocking issues.
The allocator now reads the length of the same acknowledged record array directly. It keeps the allocation point and response:journal:<n> format and removes one full-history copy per response. The reviewer traced the append and reopen paths and checked that the count is identical. In a scratch probe at one million records, the old count path averaged about 0.96 ms per call and the direct read stayed below the probe’s 0.0001 ms reporting threshold. This measures the count operation.
The collision, legacy reopen, duplicate-refusal, and queued dispatch checks passed. The focused typecheck passed. Required CI and the main-health gate are separate from this verdict.
Preserve a unique response key across interrupted requests and automatic feedback. Keep the stored turn and existing journal addresses independent.
be87297 to
72452f6
Compare
Why
An interrupted Sidekick message can leave the saved message ordinal ahead of the canonical turn. When later automatic feedback advances the turn without saving a message, two evaluated responses can share a control slot and make the chat unreadable.
What changes
Sidekick assigns a private response ID from its acknowledged journal position before it previews or evaluates a reply. The live reply, generated root, controls, outcome, and feedback use that same ID. Canonical turn attribution stays independent. The new IDs occupy a separate namespace from the numeric IDs in older journals.
How to verify it
Closes #1234.