fix(prime): verify native transcript and compaction continuity - #570
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
This was referenced Sep 15, 2026
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.
Native Prime messages and compaction could make a valid session fail transcript continuity after synchronization. Preserve private identities for the known append-only native records, and accept a replaced compaction context only after the exact session tree proves its previous history, retained boundary, summary and current snapshot.
The tree read is bounded, tied to the active session/leaf/connection generation, and used only when ordinary reconciliation fails. Live compaction summaries remain invalid. Existing lifecycle, tool-cycle, ordering, duplicate and restart checks remain required; private contents never enter client projections.
Fixes #552. Includes
ipython_state, emitted when Prime compacts kernel context. Automation (heartbeat_prompt,thread_goal_state,goal_context) remains explicitly unsupported pending Pylon-owned occurrence/turn semantics. Unknown types, changed fingerprints, missing/oversized trees (over 8,192 entries), and unproved compaction chains fail closed. Prime #77 preserves custom timestamps for future histories; existing timestamp mismatches are deliberately rejected, with an actual native regression fixture documenting that limit.Validation: 578 focused tests across decoder, adapter, runtime, restart and compaction history passed; scoped lint and server typecheck passed (existing Effect suggestions remain). The positive and legacy-negative fixtures came from isolated Prime faux-provider sessions with real persisted compaction. Adapter coverage includes shorter-context recovery, duplicate snapshots, changed retained history and missing proof; runtime coverage rejects foreign leaves/sessions and retired connections. CI also includes #571's unrelated baseline expectation correction.
Delivery is tracked in #557; merging this PR alone does not update an installed application or Prime runtime. The developer authorized review, fixes and merging this batch.
Implemented and reviewed with GPT-6 Astra in Pylon/Codex.