-
Notifications
You must be signed in to change notification settings - Fork 0
Checkpoints v2: write compact transcript.jsonl alongside full session data #152
Copy link
Copy link
Open
Labels
Description
Description
Partio currently stores full JSONL session data in git objects on the checkpoint branch. For large sessions this means fetching/reading the full event stream to get a summary view. A compact transcript.jsonl containing only normalized turn-level entries (user prompt + assistant response, stripped of internal tool calls) would make session browsing faster and reduce storage cost for downstream consumers.
This is the approach taken in entireio/cli (changelog 0.5.2, PRs #828, #788, #781).
What to implement
- Add a
checkpoints_v2boolean field to theConfigtype (default: false) as a feature flag. - When the flag is enabled, after writing the full checkpoint blob, also write a compact
transcript.jsonlto a v2 ref path (e.g.refs/partio/checkpoints/v2/<repo-id>). - The compact transcript format: one JSON object per turn, each with
{"role": "user"|"assistant", "ts": "...", "content": "..."}. Strip raw tool-call events and internal events; keep only conversation-level content. - The v2 ref write must use the same git plumbing approach (hash-object, mktree, commit-tree, update-ref) as the existing checkpoint storage.
- Add a unit test for the compact transcript generation from a sample JSONL session.
Acceptance Criteria
- When
checkpoints_v2feature flag is enabled, a compacttranscript.jsonlis written to a v2 ref layout alongside the full session JSONL - The compact transcript contains normalized, per-turn entries (user prompt + assistant response) instead of raw JSONL events
- The v2 ref layout uses a stable path structure (e.g.
refs/partio/checkpoints/v2/main) - When
checkpoints_v2is disabled (default), no v2 refs are written — existing behavior is unchanged make testpassesmake lintpasses
Source
Inspired by entireio/cli changelog 0.5.2 (PRs #828, #788, #781)
Reactions are currently unavailable