refactor: join lineage by request ID - #2452
Merged
Merged
Conversation
hallerite
marked this pull request as ready for review
August 27, 2026 14:36
Contributor
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This refactor changes ACP request handling, provider-facing idempotency headers, serialized trace records, and removes a public Notes:
You can add or adjust custom eligibility rules. Learn more. |
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
This is a focused follow-up stacked on #2449. It keeps that PR's optional ACP lineage manifest and simplifies only the model-call correlation transport:
lineage_request_idon eachModelCallinstead of copying session, context, compaction, transition, parent, and depth into aCallLineageenvelopeX-ACP-Lineage-Request-IDat interception;Idempotency-Keyremains independent and continues to the providerLineageManifest.requestswhen ACP publishes its snapshot, with the manifest remaining the sole source of graph structurecalls_by_session,branches_by_session, and branch session/context/compaction IDs through that join without persisting duplicate graph datae26b37a0e8f06d64bff8d7a627ed261be41726a3The resulting wire contract is:
Merge order
Merge nano-RLM #152 first, then update this PR's pin to the resulting commit on nano-RLM
mainbefore merging. This keeps the exact pin reachable even if #152 is squash-merged and its source branch is deleted.Validation
uv run pytest tests/: 919 passed, 76 credential-gated tests skippedLineageManifest.requestspluscalls_by_sessionasyncio.gatherrecursion and a 1,000-token compaction threshold; each persisted 7 calls = 7 manifest requests, 3 sessions, 4 contexts, one completed compaction, overlapping child-call intervals, complete per-session grouping, and a successful JSON round tripuv run ty check verifiers, touched-file pre-commit, and push hooks: passed