Repository navigation
Harden Pi native session v3 projection (GEN-2139) - #191
Merged
Merged
Conversation
github-merge-queue
Bot
removed this pull request from the merge queue due to no response for status checks
Oct 9, 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.
Pi's native session projection dropped tool-result links and compaction/branch boundaries, and retained unbounded tool arguments. Support the deployed @earendil-works/pi-coding-agent 1.1.0 session v3 contract, preserve native tree provenance separately from tool-call IDs, and project documented message blocks, usage, bash execution, prompt patches, context edits and structural metadata.
Keep native_session as Pi's primary artifact with CLI/format version receipts. Check the CLI version before launch so image drift fails explicitly. Bound arguments/results and extension metadata, omit image bytes and replay signatures, and retain future records as safe metadata. Document historical best-effort parsing without rewriting artifacts.
Versioned fixtures include every documented entry type and native JSONL captured from the deployed binary using a local deterministic model. Tests cover linked tool calls/results, sibling branches, compaction boundaries, streaming equivalence, live chunk retries, legacy fallback, malformed records and display bounds.
Validation: npm run check (workspace API boundary checks, TypeScript, tests and Worker dry-run builds); targeted Pi/live trace tests; git diff --check. Optional database-dependent tests require AUTH_TEST_DATABASE_URL and are skipped locally.
Closes GEN-2139.