Skip to content

refactor(pr-unblock): simplify verify-notes.mjs - #14175

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

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

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14139

Summary

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

Simplified .github/scripts/pr-unblock/verify-notes.mjs with behavior unchanged. Two local helpers replace repeated code: markedBy (github-actions[bot] author plus first-line check, used three times) and bullets (the - note mapping, used three times). noteComments now pushes onto each path's array instead of copying it on every note, holdPersonPull uses findLast in place of filter plus at(-1), and three over-long comment lines are rewrapped. Exports, comment bodies, API calls and outputs are unchanged.

Not verified

  • node --test over .github/scripts/pr-unblock/verify-notes.test.mjs, adjudicate-feedback.test.mjs and the pr-verify name-sync test was not run: this lane allows no interpreter. Left to the PR's CI.
  • tidy skipped: the change is under .github/, a listed shared path for the tidy cutoffs
  • Changes are left uncommitted in the working tree as the runner instructs; the runner turns them into the patch.
  • ci-status green on the PR is left to the PR's CI. Note: merge-holds.mjs lists verify-notes.mjs as an enforcement path, so the PR may be held for a person's review.

Fix

  • .github/scripts/pr-unblock/verify-notes.mjs: added markedBy and bullets helpers and used them in noteComments, failComment, holdForCredential, holdPersonPull and postAtHead; noteComments builds byPath by push instead of copying the array; holdPersonPull uses findLast; rewrapped over-long comment…

Verification

The runner ran each check from the base copy against 6319e0a:

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

The run reports:

Left out: the items under Not verified.

Related

#14139

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

Security review: PR #14175, refactor(pr-unblock): simplify verify-notes.mjs

No security issues found.

critical-findings: 0

What I checked

.github/scripts/pr-unblock/verify-notes.mjs is on the trusted-path list, and the merge-hold control reaches it through pr-unblock/ imports. I read every hunk of the change and compared each rewritten predicate against the base code:

  • markedBy (comment.user?.id === MARKER_AUTHOR_ID && firstLine(comment.body) === line) does exactly what the three inline checks did before. MARKER_AUTHOR_ID is still the value imported from ./address-feedback.mjs (line 62), so the github-actions[bot] author check is not loosened.
    • In holdForCredential, the credential-hold dedup still requires the bot author, the personReasonLines first line, and the said substring.
    • In postAtHead, the conditions are only reordered (markedBy && commit_id === head && !resolved). It is still an AND of side-effect-free checks, so the set of comments that count as posted is the same and nothing extra gets suppressed.
  • holdPersonPull: findLast(markedBy(..., VERIFY_NOTE_MARKER)) picks the same comment as filter(...).at(-1), so the edit-or-create decision on the FAIL comment is unchanged.
  • noteComments: building byPath with push instead of copying the array only changes how a local array is built. The order of notes per path and the grouping into the first file are the same. Model text still goes through quote(...) as fenced data and never reaches a command.
  • bullets and the rewrapped comments change no output.

Trust controls

Nothing is widened. The marker-author checks, the pr-verify-failed label hold, the credential hold and the leave-queue step behave as they did on the base. No token scope, trusted actor or untrusted-text path changed. No plugin manifest or instruction surface is touched.

Embedded text

The PR description has no directives aimed at this lane. Its note that the PR "may be held for a person's review" is information, not an instruction.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

claude-review reviewed 6319e0a875bbdc3e4e2dcc883f1bcedb821c21c1: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Code review: PR #14175, refactor(pr-unblock): simplify verify-notes.mjs

No findings. I read every hunk of the one changed file, .github/scripts/pr-unblock/verify-notes.mjs. It is on the trusted-path list, so I checked each change against the base code line by line.

Behavior equivalence (checked by reading the code, not by running anything):

  • markedBy(comment, line) matches the old inline check exactly: comment.user?.id === MARKER_AUTHOR_ID && firstLine(comment.body) === line. In postAtHead, the commit_id check now runs after the firstLine check instead of between the author and first-line checks. firstLine has no side effects and copes with a missing body, so the filter result is the same.
  • holdPersonPull now uses findLast where it used filter(...).at(-1). Both return the last matching comment, or undefined when none match. findLast already appears elsewhere in this directory (fix-ci-context.mjs:97, gate-source.mjs:68, address-feedback.mjs:241), so the runtime supports it.
  • noteComments now pushes onto each path's array instead of copying it. The arrays are local to the call and each one is created with [note], so the change touches no caller data. The order of notes within each path and the order of paths are unchanged.
  • bullets produces the same - note lines in noteComments and failComment. The comment bodies come out byte-identical.
  • The comment rewraps change prose layout only. Exports are unchanged.

Closing issue #14139 acceptance criteria:

  • Behavior unchanged, exports and names unchanged, no file renamed: met by the reading above. The existing verify-notes.test.mjs covers these bodies and lookups and could fail if they changed. I did not run it: this lane has no interpreter. The author also says it was not run.
  • Diff edits only the listed file: met (1 file).
  • Within 400 changed lines and 15 files: met (24 added, 16 removed).
  • ci-status green: CI has to confirm this. This review cannot.

The PR body's check results (changelog-fragment check, check-affected) are the author's claims and I did not verify them.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 6319e0a

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-14175-6319e0a875bbdc3e4e2dcc883f1bcedb821c21c1, 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 89e7947 Nov 8, 2026
66 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14139-42497387988-1 branch November 8, 2026 17:36
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: verify-notes.mjs

0 participants