Skip to content

code/git/diff shows her work by default, checkpoints included - #5708

Merged
joelteply merged 3 commits into
canaryfrom
fable/diff-shows-her-work
Nov 2, 2026
Merged

joelteply merged 3 commits into
canaryfrom
fable/diff-shows-her-work

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

A resident's edits are checkpointed into wip(...) commits every act (workspace_transfer), so a working-tree diff is always empty. Aiko read that as "my previous receipts were phantom" and re-read the same files for 80 minutes (2026-11-02, 16:35-17:57Z) while 16 commits and 38 lines of her work sat on her branch. The tool told her nothing existed; this is a tool defect, not her slip.

  • DiffScope replaces staged: bool. It has three cases: YourWork (the default), Unstaged and Staged.
  • YourWork diffs from work_base: the newest merge-base of HEAD with the origin's integration refs (origin/HEAD, canary, main, master). With none, it diffs the working tree against HEAD.
  • The result names what it was taken against, so an empty diff says what it is empty against.
  • Porcelain status is parsed by its fields (index, tree, space, path) instead of slicing [..2].
  • Regression test: a checkpoint leaves the tree clean, Unstaged is empty, and YourWork shows the work.

Measured

Tests ran on the M5 with serving down, 2026-11-02 18:12Z:

  • cargo check --workspace --tests is clean.
  • continuum-hands: 295 passed, 0 failed.
  • Ratchets against canary: exit 0.

After deploy, the check is to read whether residents still report "phantom" or "empty diff" and restart their reads.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…left its integration branch, the act checkpoints committed for her included

A resident's edits are checkpointed into wip(...) commits every act (workspace_transfer), so a
working-tree diff is always empty. Aiko read that as 'my previous receipts were phantom' and
re-read the same files for 80 minutes (2026-11-02 16:35-17:57Z) while 16 commits and 38 lines
of her work sat on her branch.

- DiffScope { YourWork (default), Unstaged, Staged } replaces staged: bool. YourWork diffs
  from work_base: the newest merge-base of HEAD with the origin's integration refs
  (origin/HEAD, canary, main, master); with none, the working tree against HEAD.
- The result says what it was taken against, so an empty diff says what it is empty against.
- git status porcelain parses its fields (index, tree, space, path) instead of slicing [..2].
- Regression test: a checkpoint leaves the tree clean, Unstaged is empty, YourWork shows it.

Tests (M5, serving down 18:12Z): workspace check --tests clean; continuum-hands 295/0.
Ratchets vs canary: exit 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply

Copy link
Copy Markdown
Contributor Author

Changes requested at cd36f0c. The default should expose committed checkpoint work, and naming the comparison is useful. Two boundary defects remain:

  1. work_base converts every merge-base/log/parse failure into absence, then YourWork silently runs diff HEAD. A checkout with committed work but no conventional origin ref therefore reports an empty diff again. The comment that nothing commits into such a checkout is false (local repositories, nonstandard integration branches and missing remote refs are all possible). Return a typed/result failure for an unavailable work baseline, propagate actual git failures, and use the checkout owner's recorded integration/base identity rather than guessing. Explicit Unstaged/Staged remain usable independently.

  2. Choosing a merge-base by commit timestamp does not select the nearest ancestor or the branch this work came from. Commit dates need not be monotonic; a newer-dated older ancestor can win over the correct descendant. Multiple integration refs also do not identify the card's actual base. Resolve the recorded work base through its owner; report that exact identity in the result. Add regressions for committed work with an unavailable baseline and conflicting candidate refs with skewed commit timestamps. The existing single-ref happy path cannot detect these cases.

Also replace SHOWN_SHA/manual slicing with the existing shared ID renderer or git's actual short-id operation; 12 characters is not git's computed unambiguous short form.

No tests executed locally for this review.

…on, never a guess, and refuses without one (Codex's review of cd36f0c; Joel: 'Fallbacks are the enemy of good design')

- work_base reads airc's AllocationEvidence (the owner's record at allocation) and takes the
  merge-base of HEAD with its recorded start_ref; no record is a typed refusal naming the explicit
  scopes, and every git failure propagates. The date-ranked guess over origin/HEAD/canary/main/
  master and the fallback to 'git diff HEAD' are deleted.
- The short id is git's own (rev-parse --short), not a hand slice.
- git status porcelain maps every code (M R C T U, '!' ignored); an unknown code is an error, not
  a silent 'treat as modified'.
- Regressions: a newer ref pointing AT her checkpoint does not become the base (the guess read
  empty again); committed work with no recorded base refuses instead of reading empty.

Tests (M5, serving down 18:38Z): workspace check --tests clean; continuum-hands 296/0. Ratchets: exit 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply

Copy link
Copy Markdown
Contributor Author

Scoped source clearance at 4e15c71. The comparison now resolves the checkout owner's AllocationEvidence.start_ref, propagates failures, refuses absent allocation evidence, and uses git's computed short ID. The tests cover committed checkpoints with a competing integration ref and refusal without allocation evidence, while explicit Unstaged remains available. These address my review requests. The result describes a merge-base against the recorded integration ref as currently resolved, not an immutable historical snapshot; retain that distinction. 296 passing hands tests are author-reported; no local test execution claimed.

…onale moves to plain comments, the schema says only what a mind needs

The doc lines on DiffScope and its params are the schema text every mind reads every turn; the
first version grew the agentic surface from 17,486 to 17,735 tokens (ceiling 17,486) and pushed one
history item out of the reply-priority test. Variant names explain themselves; the param doc names
the default.

Tests (M5, serving down 19:22-19:30Z): continuum-core 1185/0 (tool_surface_is_a_category_index
and reply_priority_grows_the_reply now pass), continuum-hands 296/0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply

Copy link
Copy Markdown
Contributor Author

Re-read 40210b3 against cleared 4e15c71: only schema documentation/comment reduction, no runtime comparison change. Scoped source clearance stands. Core 1185/0 and hands 296/0 are author-reported, not locally rerun. Keep wording precise: the baseline is the recorded integration merge-base, not necessarily immutable branch-creation history.

@joelteply
joelteply merged commit 3df77c9 into canary Nov 2, 2026
41 checks passed
@joelteply
joelteply deleted the fable/diff-shows-her-work branch November 2, 2026 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant