Skip to content

Don't warn on drift when HEAD only moved forward - #56

Open
jbwinters wants to merge 2 commits into
feat/checkpoint-token-fixesfrom
feat/drift-fast-forward
Open

jbwinters wants to merge 2 commits into
feat/checkpoint-token-fixesfrom
feat/drift-fast-forward

Conversation

@jbwinters

Copy link
Copy Markdown
Contributor

Stacked on #55. Follow-up from the #55 rerun (onlybots !93 @ ca9cf71), where the drift warning still fired in 61 candidate sessions. Most read 'written at A with uncommitted changes; now B on master': the checkpoint's own work, committed since.

  • If the saved HEAD is an ancestor of the current HEAD on the same branch (git merge-base --is-ancestor, 1.5 s timeout, false on any failure), the line is Workspace moved forward from <A> to <B> on <branch> since this was written. with no reread instruction and no uncommitted-changes warning.
  • Untracked-file notes still apply (they make it a warning again).
  • Rewritten history, branch switches and no-git cases are unchanged.

Not measured: the remaining OpenAI budget ($9.49 of $65) does not cover another paired rerun.

Tests: full suite 83 files / 728 tests pass locally.

🤖 Generated with Claude Code

…eckpoint's commit

In the #55 rerun, the drift warning fired in 61 candidate sessions. In most of them the checkpoint
was written with uncommitted changes and HEAD had since moved forward on the same branch: the work
was committed, not lost. A fast-forward now gets one neutral clause with no reread instruction and
no uncommitted-changes warning; rewritten or switched history keeps the full warning.
…ted changes

Review: ancestry shows the commits moved forward, not that the saved uncommitted changes were committed.
@jbwinters

Copy link
Copy Markdown
Contributor Author

Fresh Opus review: nothing blocking. Took its one judgment call in d12be05: when the checkpoint had uncommitted changes, the forward line adds '(it was written with uncommitted changes, which may or may not be in these commits)', still without the reread header. Known false positive left as is: work on feat, then fast-forward main to it and check out main still gets the full warning (branch differs). Full suite 83 files / 728 tests pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant