Skip to content

refactor(pr-verify): simplify resolve-pr, sibling-init and upstream-jobs - #14268

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

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

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14142

Summary

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

Simplified the three listed pr-verify scripts without changing behavior. In resolve-pr.mjs, a new actsFrom helper replaces the relink-read resolution that actedByPeople and relinkedSince both repeated. The judged() loop now starts with an early run === null skip instead of repeating run !== null in every branch. linkedIssues reads the split child body and its Scope line once each instead of looking them up repeatedly. main() writes its JSON files through one writeJson helper, and one isEntry constant replaces the two copies of the entry-point check. sibling-init.sh only has an overlong comment rewrapped, and upstream-jobs.mjs loses a stray blank line. These are small edits on purpose: workflow.test.mjs pins most of sibling-init.sh as text, the two .mjs files are security-gate code mirrored by babysit_verify_evidence.py, and moving code between files is out of scope for this chunk. No flag, export, output, written file or printed message changed.

Not verified

  • Tidy skipped: every changed file is under .github/, a listed shared path, so the tidy cutoffs exclude the change.
  • Node test suites (resolve-pr.test.mjs, upstream-jobs.test.mjs, workflow.test.mjs) and the babysit-prs Python tests that run resolve-pr.mjs (test_verify_rules_sync.py and siblings) were not run here, because this lane has no test runner. Left to the PR's CI.
  • ci-status green on the PR: a PR CI check, left to the PR's CI.
  • Changes left uncommitted in the working tree, as the runner instructs; the runner turns them into the patch.

Fix

  • .github/scripts/pr-verify/resolve-pr.mjs: new actsFrom helper shared by actedByPeople and relinkedSince; judged() loop flattened behind an early null-run skip, same branch order and the same draftJudged call conditions; linkedIssues specText reads childBody and scope once each, same key order;…
  • .github/scripts/pr-verify/sibling-init.sh: rewrapped one overlong comment; no code changed.
  • .github/scripts/pr-verify/upstream-jobs.mjs: removed a doubled blank line.

Verification

The runner ran each check from the base copy against 98ae80d:

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

The run reports:

  • check-changelog-fragments: all 5 fragments under .changes/ valid, run before and after the final edit.
  • check-changed-skills: no changed skills, nothing to gate.
  • check-affected: 10 passed, 6 skipped over the 3 changed files, run before and after the final edit.
  • Grep for text assertions on the changed files: workflow.test.mjs reads sibling-init.sh as text, and every pattern it asserts still matches, since only a comment changed. No test reads resolve-pr.mjs or upstream-jobs.mjs as text. Pinned-SHA permalinks in docs/outage-posture-audit.md are unaffected.
  • Fresh-context review subagent over the whole diff: no reachable behavior difference. It raised one theoretical edge, keptJobsPath evaluated when no jobs were kept, which is now closed by evaluating it only when jobs exist.
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42530427182

Left out: the items under Not verified.

Related

#14142

Merge-Risk: max=MEDIUM demote=false head=98ae80d9c3eb53dbe2b2191d800b988c2695aa52 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 98ae80d9c3eb53dbe2b2191d800b988c2695aa52: read 3 of 3 changed file(s); 0 finding(s), 0 as inline comments.

Security review: no security issues found

I read every hunk of all 3 changed files. resolve-pr.mjs is on the trusted-path list (it is part of the pr-verify gate), so I read its whole change and checked that each refactor leaves the gate's behavior the same.

  • actsFrom helper (resolve-pr.mjs L20-21, used by actedByPeople and relinkedSince): it returns null and reads nothing when start is NaN, and otherwise runs read or falls back to relinkActs. That matches both inline expressions it replaces. relinkedSince still treats a null read as relinked, so it still fails closed.
  • judged() loop (L595-606): a run of null was a no-op at the end of the loop body before, and is now an explicit continue. Passes are still pushed only for a non-null run with a non-fail verdict. draftJudged is still called only for a non-null fail. An own-name fail still pushes its created time, and any other fail still returns { fail: true }. The branch order and the fail-return path are unchanged.
  • linkedIssues childBody: childBodies.has(n) became childBodies.get(n) !== undefined. These agree because the map is only ever given non-null bodies (L795-813). The scope key is still added only for a split child that is not written by the author and whose splitScope is not null.
  • writeJson, keptFile, isEntry: the same writes, the same short-circuit and the same entry-point check.
  • sibling-init.sh: only a comment was rewrapped; the find scan line is unchanged.
  • upstream-jobs.mjs: only a blank line was removed.

No trust control is widened, and no merge hold, token scope, trusted-actor check or path for untrusted text is touched. The PR context contains no embedded directives.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

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

Code review: PR #14268 (refactor(pr-verify): simplify resolve-pr, sibling-init and upstream-jobs)

No findings. I read every hunk of all 3 changed files. I checked each refactor in resolve-pr.mjs against the unchanged code it calls, and each one behaves the same as the base.

  • actsFrom helper (used by actedByPeople and relinkedSince): it returns null without reading when start is NaN, and otherwise returns the promise from read, or from relinkActs when there is no read. The caller awaits it, so the result matches the old inline ternary. The const is declared at module level and is only called at runtime from async functions, so there is no temporal-dead-zone problem.
  • judged() loop: the old code checked run !== null in every branch. If run was null, nothing ran and the loop moved to the next artifact; the new early continue does the same. For a non-null run, the order is unchanged: a non-fail verdict pushes to passes; a fail verdict calls draftJudged first, then goes to created for its own name or returns { fail: true } for any other name. draftJudged is still called only for fail verdicts.
  • linkedIssues: childBodies.get(n) !== undefined is the same as the old childBodies.has(n). The map is only set when body !== null (resolve-pr.mjs#L812), and splitChildBody returns either body or null, never undefined (admit.mjs#L2208). splitScope is pure and returns an array or null, so calling it once instead of twice changes nothing. The order of keys in the spread (number, spec_kind, source, body, scope, comments) is unchanged.
  • writeJson, keptFile and isEntry: they write the same bytes and keep the same short-circuit behaviour. keptJobsPath is still evaluated only when jobs !== undefined.
  • sibling-init.sh only has a comment rewrapped, and upstream-jobs.mjs only loses a blank line. Neither changes behavior.

Closing issue #14142 acceptance criteria

  • Behavior unchanged, with the same outputs, exports and flags: met. I confirmed this by reading the code. I did not run anything; this lane has no shell.
  • Only the listed files are edited: met. The diff touches only the 3 listed files.
  • Within 400 changed lines and 15 files: met. The change is small.
  • ci-status green: I can't verify this here. It is left to the PR's CI. The author says the Node and Python test suites were not run by their lane either, so that is unverified too.

I found no embedded instructions in the PR context. No plugin manifest changed. Prior findings: none, and this is the first review of the PR, so it was not limited to blocking findings.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 98ae80d

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-14268-98ae80d9c3eb53dbe2b2191d800b988c2695aa52, 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 49d1666 Nov 8, 2026
68 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14142-42530427182-1 branch November 8, 2026 23:42
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 49d1666dc41565199b62dbcb4af705dedc68c3e1; 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.

Simplify the pr-verify .github script (2 of 2)

0 participants