fix: clarify external checkpoint discovery warning#889
fix: clarify external checkpoint discovery warning#889peyton-alt wants to merge 40 commits intomainfrom
Conversation
Entire-Checkpoint: 079c1c0e0eeb
Pre-session dirty files (CLI config files from `entire enable`, leftover changes from previous sessions) were incorrectly counted as human contributions, deflating agent percentage. Root cause: PA1 (first prompt attribution) captures worktree state at session start. This data was used to correct agent line counts (correct) but also added to human contributions (wrong). Fix: - Split prompt attributions into baseline (PA1) and session (PA2+) - PA1 data still subtracted from agent work (correct agent calc) - PA1 contributions excluded from relevantAccumulatedUser - PA1 removals excluded from totalUserRemoved - Include PendingPromptAttribution during condensation for agents that skip SaveStep (e.g., Codex mid-turn commits) - Add .entire/ filter to attribution calc (matches existing PA filter) - Fix wrapcheck lint errors in updateCombinedAttributionForCheckpoint Verified end-to-end: 100% agent with config files committed alongside. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: b0cb4216f6bc
…ibution Checkpoint package changes required by the attribution baseline fix: - PromptAttributionsJSON field on WriteCommittedOptions and CommittedMetadata - UpdateCheckpointSummary method on GitStore for multi-session aggregation - CombinedAttribution field on CheckpointSummary - Preserve existing CombinedAttribution during summary rewrites Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: b8963737336c
…arentCommitHash Fixes all 4 issues from Copilot and Cursor Bugbot review: 1. Precompute parentCommitHash on postCommitActionHandler struct using ParentHashes[0] (avoids extra object read, no silent error) 2. Remove duplicated 6-line parentCommitHash computation from HandleCondense and HandleCondenseIfFilesTouched 3. Thread parentTree through condenseOpts/attributionOpts and use it for non-agent file line counting — ensures diffLines uses parent→HEAD (consistent with parentCommitHash file scoping) instead of sessionBase→HEAD which over-counted intermediate commit changes 4. Add ParentTreeForNonAgentLines test proving the fix (TDD verified: HumanAdded=8 without fix → HumanAdded=3 with fix) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 12f5c4373467
Three fixes for multi-session attribution: 1. Cross-session file exclusion: Thread allAgentFiles (union of all sessions' FilesTouched) through the attribution pipeline. Files created by other agent sessions are no longer counted as human work. 2. Exclude .entire/ from commit session fallback: When the commit session has no FilesTouched and falls back to all committed files, filter out .entire/ metadata created by `entire enable`. 3. PA1 baseline uses base tree for new sessions: New sessions (StepCount == 0) always diff against the base commit tree, not the shared shadow branch which may contain other sessions' state. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 209a37190167
Entire-Checkpoint: 573a97ec8d2c
Entire-Checkpoint: 3790cba265e6
Entire-Checkpoint: c9595c52ab4a
Entire-Checkpoint: 9f07aeebbf93
Entire-Checkpoint: f1c37c8efc47
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tering - Test AllAgentFiles cross-session exclusion in CalculateAttributionWithAccumulated - Test committedFilesExcludingMetadata filters .entire/ paths Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The combined_attribution field now diffs parent→HEAD once and classifies files as agent vs human based on the union of sessions with real checkpoints (SaveStep ran). Filters .entire/ and .claude/ config paths. Also adds ReadSessionMetadata for lightweight per-session metadata reads. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…mmit-inflation Fix attribution inflation from intermediate commits
don't show multiple spaces for codex single line start message rendering
Entire-Checkpoint: 36db97269a69
Entire-Checkpoint: 93066e1dac3c
Entire-Checkpoint: 4fdb72622b7f
Entire-Checkpoint: 51d95c3209d7
Entire-Checkpoint: f0469a040e08
Entire-Checkpoint: 766ab74c76fd
Entire-Checkpoint: a5d50321aaee
Checkpoints V2: add migration option
Fix timeout for attach integration test on some machines
fix issue with entire attach using wrong codex path
Guard the redact.JSONLBytes + compactTranscriptForV2 calls in CondenseSession behind settings.IsCheckpointsV2Enabled. Previously the redaction ran unconditionally even though its output was only consumed by compactTranscriptForV2, which already had an internal v2 guard and would discard the result.
Skip transcript redaction when checkpoints v2 is disabled
fe2de3e to
b2d247b
Compare
There was a problem hiding this comment.
Pull request overview
This PR improves user feedback after pushing checkpoints to an external checkpoint remote by warning (once per process) when .entire/settings.json isn’t tracked, clarifying that entire.io may not be able to discover the checkpoint remote. It also adds support for compacting GitHub Copilot CLI transcripts into the normalized transcript.jsonl format.
Changes:
- Emit a consequence-first post-push note for external checkpoint remote pushes when
.entire/settings.jsonis untracked (deduped viasync.Once). - Add Copilot transcript compaction (
assistant.message/tool.execution_complete→ inlined tool results) plus fixtures and a unit test. - Rename the Codex
"message"constant to a sharedtranscriptTypeMessagefor reuse in format detection.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| cmd/entire/cli/strategy/push_common.go | Adds printSettingsCommitHint + isSettingsTrackedByGit to print the clarified warning after successful URL pushes. |
| cmd/entire/cli/strategy/push_v2.go | Invokes the new post-push settings hint after successful v2 ref pushes. |
| cmd/entire/cli/strategy/push_common_test.go | Adds tests covering settings tracking detection and hint printing/deduping. |
| cmd/entire/cli/transcript/compact/compact.go | Routes Copilot-format transcripts through the new compactor. |
| cmd/entire/cli/transcript/compact/copilot.go | Implements Copilot JSONL detection and compaction with inlined tool results. |
| cmd/entire/cli/transcript/compact/copilot_test.go | Adds fixture-based test for Copilot compaction. |
| cmd/entire/cli/transcript/compact/testdata/copilot_full.jsonl | Adds a Copilot raw transcript fixture. |
| cmd/entire/cli/transcript/compact/testdata/copilot_expected.jsonl | Adds expected normalized output for the Copilot fixture. |
| cmd/entire/cli/transcript/compact/codex.go | Renames the "message" type constant used by Codex parsing. |
| old := os.Stderr | ||
| r, w, err := os.Pipe() | ||
| require.NoError(t, err) | ||
| os.Stderr = w | ||
|
|
||
| printSettingsCommitHint(context.Background(), "origin") | ||
|
|
||
| w.Close() | ||
| var buf bytes.Buffer | ||
| if _, readErr := buf.ReadFrom(r); readErr != nil { | ||
| t.Fatalf("read pipe: %v", readErr) | ||
| } | ||
| os.Stderr = old | ||
|
|
There was a problem hiding this comment.
These tests temporarily replace the process-wide os.Stderr but don’t restore it via t.Cleanup/defer, so a t.Fatalf/require failure before restoration can leak the redirected stderr into later tests. Consider using t.Cleanup to always restore os.Stderr (see strategy/checkpoint_token_test.go for an example), and also close both pipe ends via defer to avoid FD leaks on early returns.
b2d247b to
8ffca11
Compare
Entire-Checkpoint: d2972e70b180
8ffca11 to
4926cc9
Compare
When checkpoints are pushed to a separate checkpoint remote, the push can succeed even though entire.io may not be able to discover that remote from the repository. The old hint only told the user to commit .entire/settings.json, but it didn’t explain the consequence.
This change makes the post-push warning consequence-first:
[entire] Note: Commit and push .entire/settings.json or entire.io may not find checkpoints on this remote.
Scope:
Refs: #859
Note
Medium Risk
Adds a new post-push hint gated by an external checkpoint URL and a
git ls-filescheck, plus introduces a new Copilot JSONL compaction path; both affect user-facing CLI output and transcript parsing behavior.Overview
After successful pushes to an external checkpoint URL remote, the CLI now emits a consequence-first hint when
/.entire/settings.jsonis not tracked by git, and ensures this message prints only once per process viasync.Once(applied to both v1doPushBranchand v2doPushRef).The transcript compactor gains Copilot JSONL support: format detection is added post-truncation, a new
compactCopilotconverter inlinestool.execution_completeresults into precedingtool_useblocks, and fixture-based tests + sample data validate the transformation.Reviewed by Cursor Bugbot for commit fe2de3e. Configure here.