/goal compact transcripts (transcript.jsonl) are pushed up as part of checkpoints v1.

Claude Code·Fable 5·computermode·3mo ago·2hr 24min·1 Checkpoint·6 file changes·+396/-29·130.1K tokens
3mo ago·51m

Done — the goal condition holds. Here's what changed on push-compact-for-v1:

What was implemented

Compact transcripts are now part of checkpoints v1. Every committed checkpoint write (WriteCommitted) and finalization rewrite (UpdateCommitted/replaceTranscript) generates a compact transcript.jsonl from the full transcript via the existing transcript/compact package and stores it in the session directory next to full.jsonl. Since the whole entire/checkpoints/v1 branch is what PrePush pushes (and the v1.1 mirror re-points at the same commit), the compact transcript is pushed with no push-path changes.

metadata.json points at it. The root CheckpointSummary's sessions[].transcript now targets /<cp>/<n>/transcript.jsonl when the compact was generated, falling back to full.jsonl exactly as before when it wasn't (unparseable/external-agent formats, or empty output). CLI read paths (rewind/resume/explain) are unaffected — they read full.jsonl by filename, never through the pointer.

Key design decision (differs from the removed v2 deliberately): the stored compact is pre-sliced to the checkpoint's own portion — compact.Compact is called with StartLine = checkpoint_transcript_start. v1's checkpoint_transcript_start must keep full.jsonl units for CLI readers, so a cumulative compact would have needed a new offset field plus the v2 offset-tracking machinery. A pre-sliced file is self-describing, and the entire.io server's identifier-based filtering degrades to "all messages" on compact content — which is exactly right for a pre-sliced file. Generation is best-effort: failures log and never fail the checkpoint write, and a failed regeneration during finalization keeps the previous transcript.jsonl so the pointer never dangles.

Files changed

  • cmd/entire/cli/paths/paths.go — CompactTranscriptFileName = "transcript.jsonl"
  • cmd/entire/cli/checkpoint/committed.go — writeCompactTranscript/replaceCompactTranscript helpers, pointer logic, agent-slug resolution via the registry (matches v2's "claude-code"-style values)
  • cmd/entire/cli/checkpoint/checkpoint.go, docs/architecture/sessions-and-checkpoints.md, CLAUDE.md — docs/layout comments
  • New committed_compact_transcript_test.go — 4 tests: compact written + pointer set, scoping at checkpoint_transcript_start, fallback pointer for non-compactable transcripts, regeneration on UpdateCommitted

Verification

mise run fmt + mise run lint clean; unit (6222 tests), integration (400 tests), and e2e canary (Vogon, all 59) all pass.

One follow-up that lives in the entire.io repo (not done here): for offset-only agents (Codex, OpenCode, etc.), sliceTranscriptForStorage would apply full.jsonl-unit offsets to compact content — the server should skip numeric slicing when the session path ends in /transcript.jsonl (it already keys unified-parser detection on that filename). I've noted this in memory. Nothing has been committed — the working tree holds the changes for your review.

Simplify and then push up to a draft PR

3mo ago·15m

Draft PR created: https://github.com/entireio/cli/pull/1419

Simplification summary (from the 4-agent review, applied before pushing):

  • Centralized the pointer decision — writeTranscript now returns the filename the metadata pointer should target instead of two booleans the caller had to interpret (altitude + simplification findings).
  • Removed redundant metadata re-read — UpdateCommitted already parses the session metadata while locating the session slot; it now passes startLine/agent down to replaceTranscript, and the replaceCompactTranscript wrapper (with its blob re-read and empty-agent band-aid) was deleted (efficiency + altitude findings).
  • Test reuse — dropped the newCompactTestRepo wrapper and my duplicate summary reader in favor of the existing setupTestRepo and readSummaryFromBranch helpers; trimmed the over-long paths.go constant comment.

Skipped (noted, not applied): deduplicating the pre-existing ASCII tree diagrams across doc comments (out of diff scope), inlining compactAgentName (single use, but the fallback semantics deserve a name), and hoisting the agent-registry lookup out of the finalization loop (~400ns per the registry's own docs, negligible next to the compaction itself).

All verification re-ran green after the simplification: lint 0 issues, 6222 unit + 400 integration tests, canary 59/59 + 4/4. The "25 uncommitted changes" warning from gh refers to the unrelated untracked debris in the repo root (plan.md, review-*.md, debug binaries, etc.) — none of it is in the commit.