Skip to content

feat(review): place the boundary-trust, state-scope, no-lock and converge-on-rerun principle parts - #12165

Merged
melodic-automation-lanes[bot] merged 3 commits into
mainfrom
work-resolve-issue/issue-12147-41358892190-1
Nov 2, 2026
Merged

melodic-automation-lanes[bot] merged 3 commits into
mainfrom
work-resolve-issue/issue-12147-41358892190-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #12147

Summary

Opened by the work-resolve-issue lane. The run's own summary:

Placed four pstack principle parts as reasoned sentences in the steps that apply them. Each names its test or reason and the principle it comes from. code-reviewer gains a boundary re-check item built on the question "Is this data crossing a system boundary right now?", and its mutable-state item gains the scope order: returns over mutation, locals over fields, fields over globals. /coupling:reduce rung 1 carries "Instructions and conventions are not concurrency control." with its reason. The loop-lane contract's §4 gains a "Forge writes converge on rerun" invariant. I put the rule in §4 because the issue phrases it as a must for every forge-writing step. I bumped the contract to 15.0.0 because its own Versioning rule makes any loop-layer invariant change a major bump. No lane mechanic changed.

Not verified

  • Tidy not run: the change spans 3 areas (plugins/review, plugins/coupling, docs/contracts plus docs/upstream), over the 1-area tidy cutoff
  • Build and tests: the change is markdown only, with no build or test target. The CI-only scanners check-affected listed (line-citations, purged-em-dashes, lychee-offline, contract-clause-coverage and the rest) are left to the PR's CI
  • "The PR's CI is green" is a PR check this run cannot observe; left to the PR's CI
  • The changes are left uncommitted in the working tree, as the lane's system prompt directs, not committed with a commit tool
  • git status shows untracked environment files this run did not create (.bash_profile, .bashrc, .gitconfig, .idea, .mcp.json, .profile, .ripgreprc, .vscode, .zprofile, .zshrc). They are not part of this change and should be kept out of the patch

Fix

  • plugins/review/agents/code-reviewer.md: the mutable-state item adds the scope order with its reason (minimize-reader-load). A new code-quality item flags re-validation or deep nil checks on data that crossed no system boundary, with the boundary question and the noise/false-safety reason (boundary-d
  • plugins/coupling/skills/reduce/reference/remediations.md: rung 1 carries the sentence "Instructions and conventions are not concurrency control." plus one line of reason, citing separate-before-serializing-shared-state.
  • docs/contracts/loop-lane/README.md: §4 adds the "Forge writes converge on rerun" invariant: read current forge state, write only the difference, leave the same state when rerun after a stop. The reason given is that lanes restart and are re-dispatched. It names restart adoption and §2 "Escalation re
  • docs/contracts/loop-lane/CHANGELOG.md: 15.0.0 entry (major, per the contract's rule that a loop-layer invariant change is major).
  • docs/upstream/cursor-pstack.md: the per-principle placement index now lists review:code-reviewer under minimize-reader-load and the loop-lane convention under make-operations-idempotent.
  • .changes/review/work-resolve-issue-issue-12147-41358892190-1-657c3553.md: patch fragment describing the two reviewer additions.
  • .changes/coupling/work-resolve-issue-issue-12147-41358892190-1-ab7fcdcd.md: patch fragment describing the rung 1 sentence.

Verification

The runner ran each check from the base copy against 6abaaaa:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • read https: //raw.githubusercontent.com/cursor/plugins/88d47514b82e7c44f00f2b2a72ff6dd12158038c/pstack/skills/principle-separate-before-serializing-shared-state/SKILL.md: contains the exact sentence "Instructions and conventions are not concurrency control." and reserves locks, phased execution or a
  • read https: //raw.githubusercontent.com/cursor/plugins/88d47514b82e7c44f00f2b2a72ff6dd12158038c/pstack/skills/principle-boundary-discipline/SKILL.md: internal code gets no re-validation and no redundant nil checks deep in call chains; test question "Is this data crossing a system boundary right now?
  • read https: //raw.githubusercontent.com/cursor/plugins/88d47514b82e7c44f00f2b2a72ff6dd12158038c/pstack/skills/principle-minimize-reader-load/SKILL.md: "Shrink state scope": returns over mutations, locals over fields, fields over module state, module state over globals; mutable context is what the re
  • read https: //raw.githubusercontent.com/cursor/plugins/88d47514b82e7c44f00f2b2a72ff6dd12158038c/pstack/skills/principle-make-operations-idempotent/SKILL.md: operations converge regardless of how many times they run; read current state, compare to the goal, apply only the difference; crashes, restart
  • scripts/shared-copies.txt: lists no copy of remediations.md or docs/contracts/loop-lane/README.md, so there was no copy to sync and no per-plugin loop-lane fragment to add
  • check-changelog-fragments: all 13 fragments valid (run before and after review fixes)
  • check-changed-skills: coupling/reduce PASS, 0 errors, 3 warnings, all about the skill's size and present before this change (run before and after review fixes)
  • check-affected: 11 passed, 7 skipped over 7 changed files (run before and after review fixes)
  • fresh-context review subagent over the full diff: 1 medium and 5 low findings, all six confirmed and fixed. Fixes: overlapping runs now point to §7 and posting-lanes.md; §2 cross-reference named by heading; upstream placement index updated; scope item added to the SUGGESTION cap; nil-check item cond
  • grep for line-number citations into the edited files: only docs/upstream/cursor-pstack.md and an ADR cite them. check-line-citations.py exempts both as point-in-time records, and every edited file only grew, so no citation runs past its end
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/41358892190

Left out: the items under Not verified.

Related

#12147

Lane-Activity: work-resolve-issue/resolve-issue
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 6abaaaa6f1c4beb5a9e4401565adfcab33fec5ea. The lanes clear this reason on their own; the next scheduled run judges it again.

pr-merge's gate refuses its verifier verdict (verify:missing)

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 3fafac15a83373e7d242e30c2f67eea5fde1c494: read 7 of 7 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #12165

I read every hunk of all 7 changed files. I found no security issues.

None of the changed files matches a listed trusted path. The change is markdown only:

  • two changelog fragments under .changes/
  • the loop-lane contract's §4 invariant and its CHANGELOG
  • the pstack upstream placement index
  • a sentence added to /coupling:reduce rung 1
  • two checklist items added to plugins/review/agents/code-reviewer.md

Instruction-surface lens. The diff deletes, narrows or softens no standing instruction. It only adds text. The SUGGESTION cap sentence in code-reviewer.md grows to cover the two new items and drops none of its existing ones.

The new boundary re-check item tells code-reviewer to flag re-validation only on data that "crossed no system boundary". It also keeps "Whether the boundary itself checks enough stays with security-reviewer". The neighbouring item still leaves untrusted input with security-reviewer. So no security check moves out of this lane's scope, and nothing tells reviewers to remove validation at a trust boundary.

Other surfaces.

  • No plugin manifest changes, so there are no manifest lines to report.
  • No workflow, action, token, trust-control or merge-hold changes.
  • The new loop-lane invariant ("Forge writes converge on rerun") is guidance only. It widens nothing.

PR context. The description contains no embedded instructions aimed at this lane.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

claude-review reviewed 3fafac15a83373e7d242e30c2f67eea5fde1c494: read 7 of 7 changed file(s); 0 finding(s), 0 as inline comments.

Code review: PR #12165 (no findings)

I read every hunk in all 7 changed files. They are all markdown: two changelog fragments, the loop-lane contract and its changelog, the pstack upstream map, coupling's remediations.md, and the code-reviewer agent. None of them matches a trusted-path glob, and nothing here can cause a charge, so there is no hold.

Closing issue #12147: acceptance criteria

  • Code-quality boundary item: met. plugins/review/agents/code-reviewer.md has a new item with the question "Is this data crossing a system boundary right now?" and the noise and false-safety reason. It names the boundary-discipline principle.
  • Mutable-state scope order: met. The item now orders return over mutation, local over field, and field over global. It gives the reason that a reader must track every place that can change the value, and cites minimize-reader-load. The SUGGESTION-severity cap now lists both new items.
  • Coupling rung 1 sentence: met. Rung 1 now carries "Instructions and conventions are not concurrency control." word for word, followed by one line of reason. The PR says scripts/shared-copies.txt lists no copy of this file. That is the author's claim and I did not check it.
  • Loop-lane forge-write rule: met. §4 gains "Forge writes converge on rerun". It names label, comment, branch and pull request, says the step reads current forge state before writing, and gives the restart and re-dispatch reason. I checked each cross-reference and all of them resolve:
    • "Instance-collision detection", where the stale-block adopt path is (README.md#L951-L964)
    • §2 "Escalation record write" and its "One record per newly filed escalation" rule (#L480, #L518)
    • §7 "Confirm-then-record" (#L1437)
    • posting-lanes.md, which exists
  • Changelog fragments: met. .changes/review/ and .changes/coupling/ each have a bump: patch fragment describing the change. No plugin's loop-lane copy changed, so no further fragment is needed.
  • "The PR's CI is green": not something this lane can see. It is unverified here.
  • Tests: these criteria put prose into agent, skill and contract text, and no test pins them. A test that only checks the sentences exist would not catch anything useful, so I am not counting this as a finding.

Versioning

  • The 15.0.0 major bump follows the contract's own Versioning rule (README.md#L1476-L1478): a change to any loop-layer invariant is a major bump.
  • No consumer pins the contract version in a way this bump would break. The only mentions of a version are dated changelog lines.
  • No plugin manifest changed, so no manifest checks apply.

Other notes

  • The PR body's Verification section reports changelog-fragment and changed-skill checks passing. That is the author's claim; I ran neither check.
  • I found no embedded instructions in the PR context. I also found no settled threads and no prior findings, and the round cap did not apply.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 3fafac15a83373e7d242e30c2f67eea5fde1c494.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit a602391 Nov 2, 2026
43 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-12147-41358892190-1 branch November 2, 2026 01:05
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit a6023918d7cda315fbdd7df50b3f8f6564815065; later checks count it verified from this comment.

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.

feat(review): place the boundary-trust, state-scope, no-lock and converge-on-rerun principle parts in the reviewer, coupling and loop-lane

0 participants