Skip to content

docs(agents): hold a review to the PR's invariant and stop at a third round - #4835

Merged
thymikee merged 1 commit into
mainfrom
docs/review-scope-rule
Nov 20, 2026
Merged

thymikee merged 1 commit into
mainfrom
docs/review-scope-rule

Conversation

@thymikee

@thymikee thymikee commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Summary

#4724 started as a 186-line fix for one invariant (#4518: a remote response never chooses a local write destination). Review rounds then asked for adjacent hardening in the same code, and the author added each item. The PR reached about 690 production lines over more than ten rounds before the maintainer cut it back. The existing guidance did not stop this: it sent only an unrelated finding to an issue, and its size threshold triggered late.

This changes the invariant that review holds a PR to:

  • Blocking: a finding blocks only if the change breaks the PR's invariant or regresses behavior. Every other finding goes to an issue, adjacent code included.
  • Stop rule: a third review round that adds requirements now triggers the same step as the size thresholds: an independent reviewer assesses a smaller design, and the maintainer re-scopes.
  • PR body: the Summary states the invariant.

To stay inside the 40,000-byte agent-docs budget, it removes three lines: the narrower "unrelated finding" rule that the new rule replaces, "For moves, weigh gross churn. Explain justified growth." (the move exemption and the size threshold cover it), and the git diff --stat measuring hint. Two files changed.

Validation

  • Tested SHA: d0aa8f66dc.
  • scripts/__tests__/agent-guidance-contract.test.ts: 5 passed. docs/agents is 39,999 bytes.
  • Docs-only agent guidance. Runtime tests do not apply. I did not run check:affected.
  • This is a prose change to review rules. Another model provider did not review the wording.

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

View guided diff Turn on auto-fix

@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve · review of d0aa8f6

No open findings.

Not in the reviewers' prompt (2 files)
  • docs/agents/pull-requests.md: no reviewer was selected for this change
  • docs/agents/review.md: no reviewer was selected for this change

Reviewed with this repository's own Sentinel configuration (0731b7a06858).

💬 Talking to Sentinel

In a finding's thread, reply with:

Command What it does
@apex-sentinel-staging note <context> Adds context; Sentinel re-checks the cited code
@apex-sentinel-staging pivot <why> Says the finding is wrong; Sentinel re-checks the cited code
@apex-sentinel-staging like Marks the finding as useful
@apex-sentinel-staging dislike <why> Marks it as not useful, so it is not raised again

On this conversation, comment @apex-sentinel-staging review to run a full review once again.

@thymikee

Copy link
Copy Markdown
Member Author

This PR is ready at d0aa8f6. All checks pass on this docs-only diff and there are no conflicts.

Not blocking, take or leave:

  • In docs/agents/review.md, "Ask the maintainer to re-scope." follows the combined trigger sentence, so it reads as applying to the 700-line and 3 kB triggers as well as the third round. A separate sentence such as "At a third round, also ask the maintainer to re-scope." would remove the doubt.
  • "Block unsupported claims" sits next to the new invariant rule, so it is unclear whether an unsupported doc claim counts as breaking the invariant. One clause would settle it.
  • The bulk-prose rule asks for a second independent review of agent-doc changes; the PR body says that was not done.

Not verified here: the agent-guidance-contract test and the byte-budget check were not rerun locally; CI covers them.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 20, 2026
@thymikee
thymikee merged commit 832b3b3 into main Nov 20, 2026
8 checks passed
@thymikee
thymikee deleted the docs/review-scope-rule branch November 20, 2026 17:10
thymikee added a commit that referenced this pull request Nov 20, 2026
…nts-main

* origin/main:
  refactor(contracts): bind only the interactor families an owner implements (#4821)
  refactor(gestures): move gesture algorithms out of contracts into @agent-device/gestures (#4823)
  docs(command-docs): add the shared option table and per-action option tables (#4824)
  docs(agents): hold a review to the PR's invariant and stop at a third round (#4835)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant