Skip to content

feat(verification): record the confirm verdict per head and report it at ready - #11510

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-11501-41189498292-1
Oct 31, 2026
Merged

melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-11501-41189498292-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #11501

Summary

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

/verification:confirm now records its verdict and each MISSING or PARTIAL plan item for the exact head commit it judged, and the pull-request ready report prints the verdict recorded for the PR worktree's HEAD, or says none is recorded for that head. The line is advisory: it is read after the flip and never refuses it, and the verify gate is untouched. Design choice: per the issue's decision to store the verdict 'the way the pull-request skill's verify gate stores one', a new script confirm-verdict.sh keeps one file per head under the git common dir (confirm-verdict/<sha>, or $CONFIRM_VERDICT_DIR), shared by every worktree, the same as verify-gate.sh's ready-verify/<sha>. Two plugins need it, so it lives in lib/ as a canonical with generated copies in both plugins, registered in scripts/shared-copies.txt, the way lib/lane-push.sh is shared. Each plugin then carries its own copy and neither depends on the other being installed.

Not verified

  • lib/confirm-verdict.test.sh and plugins/source-control/skills/pull-request/scripts/ready-flip.test.sh were not executed: this lane's Bash runs only the named wrappers, and check-affected ran without --tests. The suites are left to the PR's CI.
  • tidy skipped: the change touches the shared paths lib/ and scripts/ (scripts/shared-copies.txt) and spans several areas (lib, scripts, plugins/verification, plugins/source-control), over the 1-area cutoff.
  • check-affected skipped typos (not installed), validate-plugins sub-checks and changed-skills (they run code from the checked tree), and lists CI-only checks (e.g. fixture-git-isolation, test-tmp-cleanup, evals-quality). Those are left to the PR's CI.
  • AC1's 'after /verification:confirm finishes' half is a skill instruction (SKILL.md), not executable code. The test shows the record stores the verdict and items for exactly the given head, but no eval drives the confirm skill end to end.
  • The untracked files .bash_profile, .bashrc, .gitconfig, .idea, .mcp.json, .profile, .ripgreprc, .vscode, .zprofile and .zshrc in the checkout root were not created by this run (they look like sandbox mount placeholders) and are not part of this change.

Fix

  • lib/confirm-verdict.sh: new canonical script. record --head &lt;sha&gt; --verdict CONFIRMED|'NEEDS WORK'|'NOT VERIFIED' \[--missing &lt;item&gt;\]... \[--partial &lt;item&gt;\]... writes the record atomically. show --head &lt;sha&gt; prints the verdict and items for that head, or that none is re
  • lib/confirm-verdict.test.sh: new tests. Record content per head, show output with items, an earlier head not covering a later one, replacement, unreadable records, usage errors, a record from a linked worktree read from the main checkout, a commit voiding the record, and behavior outside a repositor
  • scripts/shared-copies.txt: registers the two generated copies of lib/confirm-verdict.sh.
  • plugins/verification/scripts/confirm-verdict.sh: generated copy (sync-shared-copies).
  • plugins/source-control/skills/pull-request/scripts/confirm-verdict.sh: generated copy (sync-shared-copies).
  • plugins/verification/skills/confirm/SKILL.md: new 'Record the verdict for the head it judged' step. It records the final verdict, with one --missing or --partial per MISSING or PARTIAL item, for git rev-parse HEAD. It skips the record when the working tree had uncommitted changes, since the verdic
  • plugins/source-control/skills/pull-request/reference/ready-for-review.md: 2.5.6 Report adds the confirm verdict line and its command (pr-worktree.sh, then confirm-verdict.sh show for the PR worktree's HEAD), and states it is advisory and separate from the verify gate's record.
  • plugins/source-control/skills/pull-request/scripts/ready-flip.test.sh: block takes an optional file. New cases extract and run the documented 2.5.6 report command against the stubbed gh. With a NEEDS WORK verdict and items, the flip passes, the verify pass is unchanged, and the report names the ve
  • .changes/verification/feat-11501-confirm-verdict-per-head-7d2a9c41.md: minor fragment for the record step.
  • .changes/source-control/feat-11501-confirm-verdict-per-head-b5e03f68.md: minor fragment for the ready report line.

Verification

The runner ran each check from the base copy against 34bb995:

  • scripts/check-changelog-fragments.sh --check: passed

The run reports:

  • .lane/checks/bin/check-changelog-fragments: all 43 fragments valid.
  • .lane/checks/bin/check-affected: first run failed shellcheck (SC2249, no default case in confirm-verdict.sh). Fixed, and the final run reports 12 passed, 6 skipped over 10 changed files.
  • .lane/verify/bin/sync-shared-copies: regenerated both copies from lib/confirm-verdict.sh after each canonical edit (exit 0).
  • Fresh-context review subagent over the whole diff found 5 items. Fixed: (1) high, record with no items always failed and exited 2, from a wrong || group; (2) a broken code fence in ready-for-review.md 2.5.6; (3) the report cases called the script directly instead of the documented report command
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/41189498292

Left out: the items under Not verified.

Related

#11501

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 34bb995af1d0f964e42ba5b95e6bb38ab7200445: 0 finding(s), 0 as inline comments.

No security issues found in this pull request.

I read the full diff (10 files) and the PR context. The PR context contains no embedded instructions aimed at the review.

  • Trusted paths: none of the changed files match a TRUSTED PATHS: glob. The PR touches no trust control: no trusted-actor list, token request, kill switch, merge hold, or pr-pipeline.yaml setting. It does not touch the verify gate script either.
  • Manifests: no plugin.json or marketplace.json change, so there are no manifest <field> lines.
  • Instruction surface: the SKILL.md and ready-for-review.md edits only add a record step and a report line. Nothing standing is deleted, narrowed or softened.
  • lib/confirm-verdict.sh (and its two generated copies):
    • Path safety: --head must match ^[0-9a-f]{40}$ before it is used in the record path, so there is no traversal or option injection.
    • Verdict whitelist: --verdict is limited to three fixed strings.
    • Item text: --missing and --partial take one non-empty line with no control characters, so a caller cannot forge extra lines or a second verdict: line in the record.
    • Writes: records go to a temp file made with mktemp and are moved into place with mv. All expansions are quoted, and nothing is eval'd or run through a shell.
    • Reads: show only echoes lines that match MISSING: or PARTIAL: , and only after the first line has been validated.
    • Record location: the record lives under the local git common dir, or under CONFIRM_VERDICT_DIR when set. Both are controlled by the local operator or the lane, not by a pull request author.
  • Ready report command: PR_TREE and the rev-parse output are quoted. PR_NUMBER already goes through pr-worktree.sh, which this PR does not change.
  • Gate impact: the verdict is advisory. show always exits 0, and the PR's own ready-flip.test.sh cases check that a NEEDS WORK verdict or a missing one does not change the flip or the verify result. A forged or stale record can only change a report line. It cannot reach a leak, a compromise, or a charge.

manifest: not applicable (no manifest files changed)
critical-findings: 0

No cost or spend impact. The PR adds no schedules, turn limits or model changes.

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed 34bb995af1d0f964e42ba5b95e6bb38ab7200445: 0 finding(s), 0 as inline comments.

No blocking or advisory findings on head 34bb995.

Closing issue #11501 (Closes), criterion by criterion

  • AC1 (verdict and each MISSING/PARTIAL item stored for exactly the head judged): met. lib/confirm-verdict.test.sh records for HEAD_A and reads back the exact file content. It also checks that a record from a linked worktree is read from the main checkout. The SKILL.md step that makes /verification:confirm call record is an instruction, not code, as the PR notes. No eval drives it end to end.
  • AC2 (the ready report names the verdict and each item): met. ready-flip.test.sh extracts the documented 2.5.6 report command from ready-for-review.md and runs it against the stubbed gh. It asserts the exact NEEDS WORK output with the MISSING and PARTIAL lines.
  • AC3 (no verdict for the current head, including one recorded for an earlier head): met. Both the lib test and the report test assert no verdict recorded for head <sha> for an earlier-head record.
  • AC4 (NEEDS WORK or a missing verdict doesn't stop the flip, and the verify gate is unchanged): met. The tests show FLIP_EXIT=0 with a NEEDS WORK verdict and with none for the head. They also show verify-gate.sh check still passing, and FLIP_EXIT=2 when only a CONFIRMED verdict exists and the verify record is missing.

Read for correctness

  • lib/confirm-verdict.sh validates the head as 40 hex characters, so the record path can't be escaped. It rejects empty and control-character items, so a record is one verdict line plus single-line items. It writes through a temp file and mv. The empty-items case is handled correctly (((${#items[@]} == 0)) || printf). show exits 0 on every path, which matches the advisory contract.
  • The two plugin copies are byte-identical to the canonical file apart from the generated header. Both are registered in scripts/shared-copies.txt.
  • The .changes fragments use bump: minor, which fits the additive change.
  • No manifest files changed, so there are no manifest <field> lines.

Not independently verified
I did not run any test suite. The PR text says lib/confirm-verdict.test.sh and ready-flip.test.sh were not executed in the authoring lane. Treat them as unverified until CI passes. I confirmed by reading that the report test's stub (gh pr view ... headRefName returning STUB_BRANCH STUB_OID) matches what pr-worktree.sh consumes in the existing flow.

Spend: no billing change. Nothing in the diff changes lane runs, models or schedules.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 34bb995af1d0f964e42ba5b95e6bb38ab7200445. 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)

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 34bb995af1d0f964e42ba5b95e6bb38ab7200445.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Oct 31, 2026
Merged via the queue into main with commit 24995df Oct 31, 2026
51 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-11501-41189498292-1 branch October 31, 2026 10:26
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(verification): record the confirm verdict per head and report it at ready

0 participants