Skip to content

refactor(ci): simplify write-verdict, file-due and outside-actor flag scripts - #14178

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-14143-42500553834-1
Nov 8, 2026
Merged

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

Conversation

@melodic-automation-lanes

@melodic-automation-lanes melodic-automation-lanes Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Closes #14143

Summary

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

Simplified three of the nine listed .github scripts with behavior unchanged (72 lines added, 87 removed): repeated env checks, JSON file reads, result-row builders, actor id/login parsing, trusted-list loading and client creation now go through small helpers in the same file. Every message, error text, error order, result key order, exported name and call order is unchanged. The other six files (check-permission-mode.sh, collect-patch.sh, ci-status.sh, decide-rebuild.sh, label-holds.mjs, queue-ahead.sh) were reviewed through the four /simplify checks and left as they are: each is already minimal, and the only candidates (for example folding decide-rebuild.sh's three jq reads into one read) would change how a failure surfaces under set -e. No code moved between files.

Not verified

  • node --test runs of write-verdict.test.mjs, file-due.test.mjs, security-outside-actor tests and test_verify_rules_sync.py: this lane cannot run node or python, so the suites are left to the PR's CI
  • tidy: skipped because the change is under .github/, a listed shared path for the tidy cutoffs
  • cant-fail-scan: not run; it scans test files and no test changed
  • ci-status green on the PR: a PR CI check, left to the PR's CI

Fix

  • .github/scripts/pr-verify/write-verdict.mjs: added requireEnv (replaces four copies of the required-env loop in checkKeyLeg, finalOutput, writeChunkResults and main) and readJson (replaces readExecution and main's two try/parse blocks, same error messages); buildVerdict reads specText through one…
  • .github/scripts/recurring-schedule/file-due.mjs: issueBody inlines the precondition lines like the notes lines; fileDue builds each row's {id, next_due, due} through one entry helper (same key order)
  • .github/scripts/security-outside-actor/flag.mjs: added itemNumber, idOf, loginOf and who (shared by readEvent/readRemoval and commentBody/removalBody), readTrusted (the trusted-list read with its warning, shared by main and handleRemoval) and clientFor (the client creation both repeated)

Verification

The runner ran each check from the base copy against 651fa93:

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

The run reports:

  • check-changelog-fragments: all 7 fragments valid; no fragment added since the change is to repository CI scripts, not a plugin
  • check-changed-skills: no changed skills, nothing to gate
  • check-affected: 8 passed, 8 skipped over 3 changed files
  • fresh-context subagent review of the full diff against the files, their tests and loadTrustedList: no behavior difference found; its one readability nit (a parameter shadowing the due array in file-due.mjs) was fixed by renaming it isDue
  • git diff --numstat HEAD: 3 files, 72 added and 87 removed, within the 400-line and 15-file limits
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42500553834

Left out: the items under Not verified.

Related

#14143

Merge-Risk: max=HIGH demote=true head=651fa932447677f200ef950b839dc90ab5a35870 rubric=8.1.2 rater=claude-opus-5-5 checker=claude-opus-5-5

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

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

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

Security review: PR #14178 (head 651fa93)

No security issues found. I read every hunk of all 3 changed files. Two of them are on trusted paths, so I also read what they gate:

  • .github/scripts/pr-verify/write-verdict.mjs (trusted path, writes the pr-verify verdict). requireEnv checks the same keys in the same order and throws the same message as the four loops it replaces. readJson gives the same error text as readExecution and as main's two try/parse blocks. A missing SPEC_TEXT_FILE still yields []. In buildVerdict, entries gives the same own and refs results for array and non-array specText. Moving isObject up only changes where it is declared, because specComment reads it when called. Each error path still throws, so a bad input still fails closed with no verdict written.
  • .github/scripts/recurring-schedule/file-due.mjs (trusted path). The issueBody precondition lines are now inlined and say the same thing. The entry helper builds {id, next_due, due} in the same key order. The requires_operator_confirmation hold is unchanged.
  • .github/scripts/security-outside-actor/flag.mjs (the outside-actor flag). itemNumber, idOf, loginOf and who do exactly what the inline code did. readTrusted still fails closed: an unreadable list gives ids/humans = null, so isTrusted trusts by association only and mayRemove returns false. Destructuring now happens outside the try. I checked loadTrustedList (check-trusted-trigger.mjs#L565-L595): it either throws or returns { ids, humans, logins }, so this cannot change the result. clientFor builds the client the same way as before. The new helper names do not clash with anything else in these files.

No trust control is widened: who passes the trusted-actor check, the token scope, what untrusted text reaches a lane and the merge holds are all unchanged. No plugin manifest changed, and nothing here spends credits or can bill.

The PR description and the issue context contain no instructions aimed at the review lane.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

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

Code review: no findings

I read every hunk of all 3 changed files. .github/scripts/pr-verify/write-verdict.mjs is on a trusted path, so I read its whole change and compared each part with the code it replaces. The other two files were checked the same way, hunk by hunk.

write-verdict.mjs

  • isObject moved above specComment. specComment only calls it when it runs, so moving it changes nothing.
  • buildVerdict now defaults specText to [] when it is not an array (entries). On a non-array, find still gives undefined and some still gives false, as before.
  • requireEnv replaces four copies of the same loop. The key order and the ${key} is not set message are the same.
  • readJson replaces readExecution and the two inline try/parse blocks in main. The three error messages are the same, and the files are read in the same order: after judgedChunks and headOutput, linked issues before spec text. The spec text file is still read only when SPEC_TEXT_FILE is set.
  • No new name clashes with anything already in the file.

file-due.mjs

  • Moving the precondition lines into issueBody builds the same lines in the same place.
  • The entry(row, isDue) helper keeps the key order id, next_due, due, then outcome/reason/issue, in all four places it is used.
  • The failed row built from rowProblem still has its own String(row?.id ?? "") form, as before.

flag.mjs

  • itemNumber, idOf, loginOf and who work exactly like the inline code they replace. Their inputs are never nullish: user and sender already fall back to {}.
  • readTrusted now does the destructuring of humans/ids outside the old try. I checked loadTrustedList (.github/actions/check-trusted-trigger/check-trusted-trigger.mjs, around line 565): it either throws or returns { ids, humans, logins }. So nothing that used to be caught can escape, and the fallback is still null, giving the same isTrusted/mayRemove results.
  • The two warning messages are the same, and clientFor matches the two copies it replaces.

Closing issue #14143 criteria

  • "Behavior is unchanged": met as far as I can tell by reading the code. The existing suites named in the PR (write-verdict.test.mjs, file-due.test.mjs, the security-outside-actor tests) cover these paths. I did not run them; this lane has no shell. The PR author says they did not run them either and left them to CI.
  • "The diff edits only the listed files": met. All 3 files are on the issue's list.
  • "Within 400 changed lines and 15 files": met (+72/−87, 3 files).
  • "ci-status is green": I cannot check this from here. It is left to the PR's CI.

Other checks

  • No .claude/rules path-scoped rule or plugin manifest applies to these files.
  • The PR context contains no embedded instructions aimed at this lane.
  • The review was not blocking-only: this lane has not reviewed an earlier head of this PR.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 651fa932447677f200ef950b839dc90ab5a35870, the head its arming checks judged.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 651fa93

The verifier passed this head. The capture artifact holds the capture summary, which says whether the capture ran, and any screenshot or video that passed the mask check; this comment uploads no file.

Capture artifact: pr-capture-14178-651fa932447677f200ef950b839dc90ab5a35870, expires on 2026-12-08.

One comment per pull request, updated in place for each new head.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 8, 2026
Merged via the queue into main with commit 30c6a19 Nov 8, 2026
66 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14143-42500553834-1 branch November 8, 2026 17:42
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.

Simplify .github: pr-verify, read-patch, recurring-schedule and 2 more

0 participants