Checkpoints V2: Support checkpoint_transcript_start for compact transcript.jsonl files#877
Draft
computermode wants to merge 7 commits intomainfrom
Draft
Checkpoints V2: Support checkpoint_transcript_start for compact transcript.jsonl files#877computermode wants to merge 7 commits intomainfrom
checkpoint_transcript_start for compact transcript.jsonl files#877computermode wants to merge 7 commits intomainfrom
Conversation
Entire-Checkpoint: e5883f33cb01
Initialize compact transcript offsets from existing checkpoint offsets during state normalization and add tests to preserve migration behavior. Made-with: Cursor Entire-Checkpoint: 4678bd55995f
…t-start-at-metadata
Entire-Checkpoint: 15712c7a9051
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for correctly tracking checkpoint_transcript_start for v2 compact transcript.jsonl artifacts by introducing a compact-transcript-specific offset and propagating it through condensation and migration.
Changes:
- Introduces
CompactTranscriptStart/CompactTranscriptLinesplumbing to track compact transcript offsets separately fromfull.jsonloffsets. - Updates v2
/maincommitted metadata writing to use the compact transcript start offset forcheckpoint_transcript_start. - Enhances
migrateto compute and persist compact transcript offsets when generatingtranscript.jsonl.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| cmd/entire/cli/strategy/manual_commit_types.go | Extends condensation result to report compact transcript line counts. |
| cmd/entire/cli/strategy/manual_commit_test.go | Adds coverage ensuring v2 /main writes checkpoint_transcript_start correctly for compact transcripts. |
| cmd/entire/cli/strategy/manual_commit_hooks.go | Updates session state to advance/reset compact transcript offsets across condensations/carry-forward. |
| cmd/entire/cli/strategy/manual_commit_condensation.go | Plumbs compact transcript start into write options and computes compact transcript line deltas. |
| cmd/entire/cli/session/state.go | Adds persisted compact_transcript_start to session state with legacy backfill behavior. |
| cmd/entire/cli/session/state_test.go | Adds tests for CompactTranscriptStart normalization/backfill and JSON round-trip. |
| cmd/entire/cli/migrate.go | Computes compact transcript offsets during migration and stores them in v2 write options. |
| cmd/entire/cli/checkpoint/v2_store_test.go | Tests that v2 /main metadata uses CompactTranscriptStart for checkpoint_transcript_start. |
| cmd/entire/cli/checkpoint/v2_committed.go | Switches v2 /main metadata field to use compact transcript start offset. |
| cmd/entire/cli/checkpoint/checkpoint.go | Adds CompactTranscriptStart to WriteCommittedOptions for v2 metadata writing. |
Entire-Checkpoint: 92926498c799
Contributor
Author
|
bugbot review |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit c12965c. Configure here.
Entire-Checkpoint: 3e7abfc2d4a5
Entire-Checkpoint: 1b4ddd35692a
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.

Ensures we have
checkpoint_transcript_startin the metadata.json for the compacttranscript.jsonlfiles.Also updates the
migratecommand to respect the start lines (previously, if I migrated, then added v1 checkpoints and migrated again, it wouldn't calculatecheckpoint_transcript_start).I tested this by creating multiple commits and checkpoints with a Claude session and inspecting the v2 refs to ensure that the
checkpoint_transcript_startlines were added to themetadata.jsonfile as expected.Testing with Codex next...
Note
Medium Risk
Adjusts how
checkpoint_transcript_startis computed and stored for v2/mainand during migration, which can affect transcript scoping and downstream consumers if offsets are wrong. Changes are localized and covered by new tests, but touch persistence/state and migration behavior.Overview
Ensures v2
/mainmetadata writescheckpoint_transcript_startin the compact transcript.jsonl line domain by addingCompactTranscriptStarttoWriteCommittedOptionsand using it inv2_committed.go.Updates manual-commit condensation and session state to track
compact_transcript_start, compute/fallback the compact offset when missing, and advance it after each condensation so subsequent checkpoints are correctly scoped.Improves
migrate --checkpoints v2to compute and persist compact transcript start offsets when generatingtranscript.jsonl, with new unit tests validating v2 metadata uses the compact offset (not full.jsonl offsets) across write, condense, and migration paths.Reviewed by Cursor Bugbot for commit c12965c. Configure here.