Skip to content

Bind CR-7 intents to CR-5's shared line anchors - #410

Merged
BunsDev merged 1 commit into
mainfrom
cr7-anchors
Oct 26, 2026
Merged

BunsDev merged 1 commit into
mainfrom
cr7-anchors

Conversation

@BunsDev

@BunsDev BunsDev commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

CR-7's draft/intent model is on main (unwired, via #404). This PR checks it against the producer slices that have since landed and fixes the one mismatch.

CR-5 (#395) anchors didn't fit the model.

  • anchorFor returns a seven-field LineAnchor. The extra field is commitSha: the head, or the proven diff base for the base side.
  • The model checked for exactly six fields, so it refused every real anchor, and the digest never bound the diff base.

The fix

  • LineAnchor moves into the shared contract. patch.ts re-exports it and the model uses it, so the two can't drift apart silently.
  • commitSha must be 40-hex and, on the head side, must be the revision's head. It's part of the intent digest.
  • The future write adapter must still match a base-side commitSha to the fresh read's diffBaseSha before dispatch. The design page says so.

CR-4 (#393) slots fit. comment, edit and requestReviewers are zero-argument callbacks bound by the host. There's no slot yet for submitting a review, the state menu or Merge; the write increments add those.

This PR adds no GitHub mutation, IPC channel, UI or capability. Write authorization and scope decisions 2–4 are asked on #326 and still unanswered.

Validation (local, macOS, at 56691ab's tree):

  • Red first: 3 of 31 intent tests failed against the old model.
  • Focused intents and CR-5 diff tests: 39 passed.
  • pnpm build && pnpm test: exit 0. Desktop: 1,940 passed, 17 skipped, 0 failed.
  • pnpm test:e2e: exit 0. 451 desktop and 7 site tests passed, 7 skipped.
  • Hosted CI on 56691ab: all checks passed, including the required unit + e2e (macOS).

Evidence. Mock only: no comment, review, merge or live write was performed.

Refs #326, #319.

🤖 Generated with Claude Code

CR-5's anchorFor returns a seven-field LineAnchor with commitSha, the commit
its line numbers count in. The unwired intent model checked for an exact
six-field shape, so it refused every real anchor, and its digest never bound
the diff base.

LineAnchor moves into the shared contract. patch.ts re-exports it and the
model uses it. commitSha must be 40-hex, must be the head on the head side,
and is part of the digest. The future write adapter still checks a base-side
commitSha against the fresh read's diffBaseSha.

This also records the check of CR-4's action slots. Adds no GitHub mutation,
IPC channel or UI. Refs #326.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@vercel

vercel Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
modex Ready Ready Preview Oct 24, 2026 11:10pm UTC

Request Review

@github-code-quality

Copy link
Copy Markdown

Code coverage overview

Languages: TypeScript

TypeScript / code-coverage-agent

main a10fcc4 cr7-anchors 56691ab +/-
65% 65% 0%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.

@BunsDev
BunsDev added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit deb373a Oct 26, 2026
13 checks passed
@BunsDev
BunsDev deleted the cr7-anchors branch October 26, 2026 21:35

This branch was successfully deployed

1 active deployment
Preview — 56691ab1 Deployed Oct 24, 2026 by vercel[bot]
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