checkpoint: refresh remaining stale compact-transcript comments · Entire

checkpoint: refresh remaining stale compact-transcript comments

799bb0a→main· Soph·2w ago·2 files·+9 added/-6 removed

Two leftover comments still described transcript.jsonl as pre-sliced / not referenced by metadata:

(attribution.go's "scoped to this checkpoint" refers to prompt.txt scoping, a separate and still-accurate concept, so it is left as-is.)

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

Sessions

dcc943cf1976View transcript

Compact Transcript Storage and Boundary MarkersClaude Code·Opus 4.8[1m]·1 step

Changes

2

293 unmodified lines

294
295
296
297
297
298
299
300
442 unmodified lines

743
744
745
746
747
748
749
746
747
748
749
750
751
752
753
754

293 unmodified lines

// ├── 1/ # First session
// │ ├── metadata.json # Metadata (session-specific, includes initial_attribution)
// │ ├── full.jsonl # Raw agent transcript (CLI rewind/resume/explain)
// │ ├── transcript.jsonl # Compact transcript scoped to this checkpoint (pushed; not yet referenced by metadata.json)
// │ ├── transcript.jsonl # Full compacted session (slice at compact_transcript_start)
// │ ├── prompt.txt
// │ └── content_hash.txt
// ├── 2/ # Second session
442 unmodified lines

}

// writeTranscript writes the transcript, compact transcript, and content hash
// to the checkpoint entries. The compact transcript.jsonl is written into the
// tree (so it is pushed alongside full.jsonl) but is not yet referenced by
// metadata. Returns true when a transcript was written, false when it was
// empty and nothing was written.
// to the checkpoint entries. The compact transcript.jsonl (the full compacted
// session) is written into the tree and pushed alongside full.jsonl. Returns
// (wrote, compactStart): wrote is true when a transcript was written (false when
// empty, nothing written); compactStart is the line offset of this checkpoint's
// slice within the compact transcript, to record as CompactTranscriptStart, or
// nil when no compact transcript was produced.
func (s *GitStore) writeTranscript(ctx context.Context, opts WriteOptions, basePath string, entries map[string]object.TreeEntry) (bool, *int, error) {
    logCtx := logging.WithComponent(ctx, "checkpoint")
    transcriptBytes := opts.Transcript.Bytes()

Mcmd/entire/cli/checkpoint/persistent.go+7/-5

29 unmodified lines

30
31
32
33
33
34
35
36
37

29 unmodified lines

TranscriptFileName       = "full.jsonl"
    TranscriptFileNameLegacy = "full.log"
    // CompactTranscriptFileName is the compact transcript stored alongside
    // full.jsonl, pre-sliced to the checkpoint's own portion.
    // full.jsonl. It holds the full compacted session; this checkpoint's slice
    // begins at the session metadata's compact_transcript_start.
    CompactTranscriptFileName = "transcript.jsonl"
    MetadataFileName          = "metadata.json"
    CheckpointFileName        = "checkpoint.json"

Mcmd/entire/cli/paths/paths.go+2/-1