feat(session): add transcript store and read-only stream - #34
Closed
ZeroPointSix wants to merge 2 commits into
Closed
feat(session): add transcript store and read-only stream#34ZeroPointSix wants to merge 2 commits into
ZeroPointSix wants to merge 2 commits into
Conversation
Owner
Author
复审 Context fact card(上下文事实卡)Target
Verified facts
Relevant code and tests
CI/CD and validation entrypoints
Assumptions not allowed
Risks / blockers
Proposed change scope
Execution summaryProblem
Root cause / verified facts
Solution
Files changed
Validation
CI/CD
Remaining risks / follow-ups
|
This was referenced Aug 12, 2026
Owner
Author
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.
Closes ZER-670
Review Contract
Goal
Provide a read-only, per-session transcript contract that preserves real ACP tool payloads for W4 consumers while retaining one shared SSE cursor for lifecycle and transcript events.
Non-goals
This PR does not implement the W4 transcript UI, persist transcript data across process restarts, or redesign the existing lifecycle SSE endpoint beyond adding transcript events to its shared cursor.
Accepted Residual Risks
Transcript and stream histories are bounded in memory. A client that reconnects behind the retained cursor must handle the existing history-gap/cursor-reset response by refetching a snapshot; long streaming replies still duplicate accumulated text within the bounded replay history.
Acceptance Criteria
tool_callandtool_call_updateretain raw ACP fields, including tool input, output, terminal data, and file-diff payloads, under a stabletoolCallId.entry_id, distinct from the per-session mutation cursor, so clients can upsert revisions.GET /api/v1/sessions/{session_id}/transcript?after=<sequence>andGET /api/v1/sessions/eventsretain their snapshot, replay, history-gap, andLast-Event-IDcontracts.Follow-ups
W4 will render the preserved tool payloads as Terminal and FileDiff cards. W5 can optimize long-output memory behavior and decide whether transcript persistence is required. Rebase against PR #33 before merging if its overlapping session/SSE changes land first.
Summary
tool_callandtool_call_updateobjects during classification and upsert them bytoolCallIdinto the read-only transcript.entry_idfor assistant and tool revisions;sequenceremains the snapshot mutation cursor and SSE events keep their separate global cursor.Validation
cargo clippy --workspace -- -D warningscargo test -p openab-core --no-default-features— 542 passedcargo test -p openab-gateway --test admin_api_integration --no-default-features— 13 passedA full
cargo test --workspacerun was started after the strict Clippy check but was stopped locally after prolonged high memory use during final test binary linking; targeted core and gateway coverage above completed successfully.