Repository navigation
feat(review,planning,tdd): container close-out mode + Lane C corrected verdicts - #3043
Conversation
…shipped container (#3027) `work-items:decompose` and `work-items:ship` both routed container close-out at "the review plugin's spec-fidelity machinery." Lane D shipped the branch-scoped `spec` lens; a spec container is not a branch, so the routes still landed on nothing container-scoped. This is that machinery. `quality-gate` gains a tenth mode, `close-out`. It is `spec` mode at container scale, not a second spec lens: the finding-class enum, the spec-line quoting rule, the item-content-trust fence, the dispatch policy and the both-directions judging all stay owned by `context/spec.md` and are reused by citation. What close-out owns is what gets judged — which container, which spec body, and which change set counts as what the container shipped. It is the first mode that does not use SKILL.md's single review diff base at all, because squash-merge leaves no merge commit and no ancestry. The basis derives per execution shape: for `integration branch -> single PR`, the PR's range while open and its squash commit once merged; for `per-item PRs`, a commit SET read as the union of per-commit diffs — a two-dot range over the default branch would sweep in every foreign commit merged between the container's first and last item. The closing-commit ladder is provider close-linkage (`closedByPullRequestsReferences`, reduced the inverse way from the github adapter's in-flight check) -> a heuristic subject scan -> ask -> skip with a note. Gated on its own basis plus a container-finished rollup check, with `--dry-run` to verify resolution before paying for the pass. The verdict posts to the container, since the findings directory is pruned before merge. Dogfooded against container #2933, which corrected two things in the design: a successful close-linkage query returning zero PRs is an answer (`no-code` investigation items close on a comment) rather than a coverage gap, and the subject scan needs reductions — the board-publishing commit matched every sub-item it listed. Provider degradation is stated rather than papered over: GitHub-only in practice, jira degrades to asking, local-markdown has no path. Both routes now name the real target; the ship ritual keeps the close. Closes #3027 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01CnzwTKoTa6xNY7iyEzMYpm
…g-breakdown-ukohlx
|
Claude finished @kyle-sexton's task in 3m 42s —— View job Code review complete
This is a documentation/skill-instructions PR (no application code) adding a One gap worth fixing, left as an inline comment on
No other correctness issues found. The rest of the changes (SKILL.md router wiring, |
|
Claude finished @kyle-sexton's task in 1m 42s —— View job Security review —
|
|
Last security-reviewed head: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 170a4fbe61
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Claude has reviewed this PR 5 times. The lane skips further automatic reviews after 5; deleting this comment resets the count. |
…e PR, and admits comment-only containers Three review findings on PR #3043, each verified against the file first: - Shape was inferred from the **Integration branch:** line, so a container recording the integration shape before its branch is backfilled (a permitted transient state) fell through to Shape B — searching for per-item PRs that shape never produces and misclassifying every checkpoint as no-code. The **Execution shape:** line is now authoritative per execution-shape.md's own rule ("read the shape from this line, never from convention or guesswork"), and shape-A-without-a- branch is UNRESOLVED, never a fallback. - Shape A's bullets assumed a PR object the branch line does not carry. Added the derivation by head branch across all states (the PR is merged in the common case, and close-out often runs from a session whose checked-out branch is not the integration branch), with multiple-match and no-match outcomes stated. - The empty-basis gate was unconditional, so an all-investigation container — every sub-item no-code, criteria judged against closing comments — could never render the verdict its own close ritual requires, making it permanently un-closeable. Empty-because-resolved now proceeds; empty-because-unresolved still stops. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01CnzwTKoTa6xNY7iyEzMYpm
|
Claude finished @kyle-sexton's task in 2m 31s —— View job Code review complete
This push ( One new gap in the fix itself, left as an inline comment on
No other issues found — the rest of the diff (SKILL.md router wiring, |
|
Claude finished @kyle-sexton's task in 2m 9s —— View job Security review —
|
…andidate index Refs #2936, refs #2933. Two fresh-context validators (rationale withheld) challenged all five of the lane's initial answers: two proposed ADOPT verdicts were already shipped, one enforcement site structurally cannot host the rule it was given, and one disposal venue does not exist. What lands is the corrected set. - planning:plan — the Test strategy element (and its template placeholder) now asks for the public interfaces the tests will drive, each marked existing or newly introduced. Naming them lets the Step 5 approval settle them, so implementation writes no test against a boundary the plan never named. Upstream's hard consent gate is softened deliberately: an unattended run cannot obtain confirmation, so an unnamed boundary becomes a DEVIATIONS.md entry reviewed at PR time rather than a blocking stop. Not phrased as "seams" (fleet-registered vocabulary with a second controlled-vocabulary sense that forbids substitution) and not hosted by phase-verifier (it grades binary criteria against a final diff and refuses to guess its inputs, so a stated-before-the-first-test ordering claim is unobservable there). - tdd:principles — the SDK-style boundary section, present since 85aa806 and therefore not an addition, gains the subordination clause it lacked: it shapes a boundary already decided to be mocked and never widens what gets mocked. - Course SSOT — Lane C section with the corrected verdicts, including the rejected-with-reasons chain doc and the STALE -> UNVERIFIED retraction, plus a graduated candidate index. C1-C23 were defined only in the topic's self-ignored memory slice, so every lane verdict on the board cited an artifact that dies with the working tree. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01CnzwTKoTa6xNY7iyEzMYpm
|
Claude finished @kyle-sexton's task in 48s —— View job Security review —
|
|
Claude finished @kyle-sexton's task in 2m 19s —— View job Code review complete
This push ( Checked this delta for correctness:
No correctness or maintainability issues found in this delta. Security-relevant findings (e.g. the untrusted-branch-name shell interpolation and the The rest of the diff ( |
The heuristic default-branch scan in close-out.md used a GNU word-boundary escape in its --grep pattern. BSD userland (macOS) does not honor it, so the right-hand boundary would silently vanish there and #12 would match #123 — attributing another sub-item's commit to this one, in the exact rung whose findings are already flagged as heuristic. Replaced with an explicit ERE class under --extended-regexp, with the reason stated at the site. Caught by shell-portability-lint, which extracts fenced shell from Markdown. Refs #3027. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01CnzwTKoTa6xNY7iyEzMYpm
|
Claude finished @kyle-sexton's task in 1m 40s —— View job Security review —
|
|
Claude finished @kyle-sexton's task in 2m 8s —— View job Code review complete
This push ( The fix replaces rung 2's commit-scan -git log origin/<default> --format='%H %s' --grep='#<sub-item-number>\b'
+git log origin/<default> --format='%H %s' \
+ --extended-regexp --grep='#<sub-item-number>([^0-9]|$)'Checked this for correctness:
No issues found in this delta. One note for context, not a new finding: the previously-reported |
…tch count actionable Two findings on the PR-derivation step added in 02b224b. Command injection: the branch name comes off the container body, which this same file classifies as untrusted item content, and a git-legal ref may contain $, backticks, ;, & and | — all of which expand inside double quotes. It now gets the treatment Step 1 already gives an issue number: validated against a shape before it reaches any command (character allowlist, then git check-ref-format), and carried in a variable rather than pasted into the command text. Collapsed multiplicity: the snippet reduced the listing with --jq '.[0]', which made "exactly one" indistinguishable from "several, arbitrarily picked" and turned zero matches into a silent null — so the two outcomes the prose branches on could not be implemented from the command shown. The array is now returned whole and the three counts are stated as outcomes, matching rung 1's failed-query-is-not-an-empty-set discipline. Refs #3027. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01CnzwTKoTa6xNY7iyEzMYpm
|
Claude finished @kyle-sexton's task in 1m 28s —— View job Security review —
|
|
Claude finished @kyle-sexton's task in 2m 23s —— View job Code review complete
This is a re-review of the commits pushed since this lane's last review (
I checked both fixes against the exact injection PoC and the exact match-count ambiguity raised previously; both are closed correctly, and neither fix disturbs the shape-line/PR-derivation/empty-basis-gate logic fixed in the prior round ( No new findings. No other files changed in this range — |
Closes #3027
Closes #2936
Summary
Two of the spec container's remaining sub-items, on the session's single branch (this topic runs one session → one branch → PRs opened from it in sequence, per the dogfood constraint set at interview): the container close-out review mode that #2933 needs in order to close itself, and the corrected Lane C verdicts after adversarial validation overturned all five of the lane's original answers.
Fix
Part 1 — container close-out mode (#3027)
A
close-outmode inquality-gatethat reviews a whole shipped container — across however many PRs — against the container's own spec body, and the twowork-itemsroutes that named this machinery before it existed now point at it. Split out of Lane D (#2937) during design validation, when two independent validators showed the originally-proposed mechanism was underivable; this implements the corrected design recorded on #3027, whose constraints are not re-derived here.plugins/review/skills/quality-gate/context/close-out.md(new) — the container lens: resolves the container, derives a cumulative diff basis per execution shape (the constraint that killed the original design —integration branch → single PRhas no per-item PRs at all, so the container's recorded integration-branch line is the handle there, while per-item shape uses the squash commits on the default branch; "union of merge commits" was rejected because this repo squash-merges and produces none), judges the container's acceptance criteria with thespecmode's finding classes, and posts its verdict back to the container.quality-gate/SKILL.md—close-outjoins the router as a tenth mode with an optional container ref and--dry-run. It is the one mode that replaces the skill's Shared-inputs review diff base rather than consuming it, called out at the base definition and again in Step 1; it reusesspecmode's finding-class enum and discovery ladder rather than restating either.work-items:decomposeship ritual — the dangling "the review plugin's spec-fidelity machinery" pointer now names the real target, with the division of labor stated: the review produces the verdict, the ritual owns the close — amissingorwrongfinding against a stated criterion keeps the container open and becomes a new item or a re-decompose.work-items:ship— its all-sub-items-closed route names the same real target.reviewplugin → the manual pass against the Brief's acceptance criteria; non-GitHub providers degrade per the constraints recorded on Container close-out review — invocable cumulative review of a shipped container against its spec #3027 (jiradeclareslist-sub-items: false;local-markdownhas no PR concept and is barred from containers).Three review findings were fixed on this part after the first push, all against
close-out.md: the execution shape is now read from the authoritative shape line rather than inferred from the presence of the integration-branch line (Shape-A-without-a-branch is UNRESOLVED, never a silent fallback to Shape B); Shape A now derives the PR object its bullets assumed, with stated multiple-match and no-match outcomes; and the empty-basis gate now distinguishes empty-because-unresolved (STOP) from empty-because-resolved, which had made an all-no-codecontainer permanently un-closeable. A fourth was caught by CI: the rung-2 commit scan used a GNU word-boundary escape BSD userland does not honor, so its right-hand boundary would have vanished on macOS and#12would have matched#123— now an explicit ERE class under--extended-regexp.Part 2 — Lane C corrected verdicts (#2936)
Two fresh-context validators, rationale withheld, run over the lane's five proposed answers. All five were challenged — two proposed ADOPT verdicts were already shipped, one proposed enforcement site structurally cannot host the rule it was given, and one disposal venue does not exist. Full adjudication is the resolved-design comment on #2936; the SSOT record is the new "Lane C" section in
docs/upstream/aihero-shipping-course.md.planning:plan(0.32.0) — the Test strategy element and its template placeholder now ask for the public interfaces the tests will drive, each marked existing or newly introduced. Naming them lets the Step 5 approval settle them, so implementation writes no test against a boundary the plan never named. Upstream's hard consent gate is softened deliberately: an unattended run cannot obtain confirmation, so an unnamed boundary becomes aDEVIATIONS.mdentry reviewed at PR time rather than a blocking stall. Not phrased as "seams" (fleet-registered vocabulary, with a second controlled-vocabulary sense inarchitecture:improvethat forbids substitution) and not hosted byphase-verifier(it grades binary criteria against a final diff and is told to refuse to guess its inputs — a stated-before-the-first-test ordering claim is unobservable there).tdd:principles(0.4.1) — the SDK-style boundary section, present since85aa8066and therefore not an addition, gains the subordination clause it lacked: it shapes a boundary already decided to be mocked and never widens what gets mocked.Three spin-offs filed rather than folded in: #3046 (review code-lens tautology criterion — the detector only catches textually identical sides, verified by running it), #3047 (
pre-pr.mddeclares an unreorderable pre-PR order thatimplement's completion handoff contradicts), #3048 (measure implement→tdd invocation viaclaude-opsSkillUsetelemetry, with the no-caller-attribution limit stated).Verification
check-skill.sh --require-evals quality-gate→ PASS, 0 errors / 0 warnings (theREcompile() - paniclines in its output are the known mawk ERE-interval bug tracked as skill-quality: check-skill.sh fresh-eyes scanner breaks under mawk — ERE interval expressions unsupported #3005, not a check failure)check-skill.sh planandcheck-skill.sh principles→ PASS, 0 errors; warning sets byte-identical to the pre-change baseline (verified by stashing)scripts/check-shell-portability.sh origin/main→ No unexcused GNU-only constructs in 7 shell file(s) after the fixmarkdownlint-cli2over all touched Markdown → 0 issuesscripts/check-changelog-parity.sh --check→ cleanRelated
specmode the close-out mode reuses (finding classes + discovery ladder)REcompile()noise in check-skill output🤖 Generated with Claude Code
https://claude.ai/code/session_01CnzwTKoTa6xNY7iyEzMYpm