Skip to content

refactor(work-unblock): simplify the first half of label-unblocked.mjs - #14273

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

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

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14152

Summary

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

Simplified the functions and declarations that start in lines 1-1353 of .github/scripts/work-unblock/label-unblocked.mjs. Behavior is unchanged. The two imports from admit.mjs are now one. Eight raw-log regexes that each repeated the same timestamp prefix are now built by one stamped helper, with a denial(mode) builder for the two broker-denial patterns. Unused had (and, for dropDeferral, github/repo) arguments are no longer passed to admit, parkDone, refuseDeferred, dropDeferral and handBackParked, which never read them, so their labelNames calls go too. The code === null ? CONFIRMED : NEEDS_DECISION expression, repeated at three sites, is now parkingStatus. A stray double blank line is gone. The same unused had arguments still appear at call sites in labelUnblocked and in the split-parent hand-back, both of which start after line 1353; they are part 2's range and were left alone.

Not verified

  • label-unblocked.test.mjs and the node test suite were not run: this lane cannot run an interpreter, so the tests are left to the PR's CI
  • tidy skipped: the change is under .github/, a listed shared path
  • ci-status green on the PR is a PR check, left to the PR's CI

Fix

  • .github/scripts/work-unblock/label-unblocked.mjs: merged the duplicate admit.mjs import; added a stamped regex builder and denial(mode), used by DENIAL, STEP_FAILED, STOPPED, MINT_START, mintEnd, LISTED and HELD; removed unused arguments passed to…

Verification

The runner ran each check from the base copy against c693fa1:

  • 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

#14152

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

Code review: no findings. I read the whole diff of the one changed file, .github/scripts/work-unblock/label-unblocked.mjs.

What I checked, reading the files only (I ran nothing):

  • Regex rewrites. stamped(rest) puts the same ^\d{4}-\d\d-\d\dT[\d:.]+Z prefix in front of each pattern, with no flags, as before. Each rewritten pattern gives the same source as the literal it replaces:
    • String.raw keeps \[, \], \. and \d as written.
    • ${mode} in denial fills in check or token.
    • mintEnd's id.replace(".", "\\.") still yields \. inside the raw template.
    • LISTED and HELD keep the trailing literal $ in a cooked template.
  • Dropped arguments. No function the change stops passing arguments to reads them. admit (L853), parkDone (L875), handBackParked (L924), dropDeferral (L1048) and refuseDeferred (L1218) declare no had parameter, and dropDeferral declares no github or repo. The labelNames(...) calls removed with them had no side effects. In admitDeferred, current is still used at L1012–1013.
  • parkingStatus. It is a module-level const, and only function bodies that run after the module loads call it, so no temporal-dead-zone risk. Its output matches the three inline ternaries it replaces.
  • Merged import. The names imported from admit.mjs are the same set as before.
  • Closing issue Simplify the label-unblocked.mjs .github script (part 1 of 2) #14152 criteria. The diff edits only the listed file. It is well under 400 changed lines. Every changed function starts in the first half of the file; the last, readmitReady, starts before L1353. The criteria "behavior unchanged" and "ci-status green" are met as far as the code shows. The author says the test suite was not run and is left to CI; that claim is unverified by this lane.

Prior findings: none; this is the first review of this pull request, not blocking-only. No embedded instructions found in the PR context.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

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

Security review: PR #14273 (refactor of label-unblocked.mjs)

I found no security issues. I read every hunk of the one changed file, .github/scripts/work-unblock/label-unblocked.mjs. It matches none of the listed trusted paths.

critical-findings: 0

What I checked

  • The rebuilt log-parsing patterns behave as before. These patterns read job logs to spot broker denials, kill-switch stops, mint start and end markers, failed steps, and the sweep's listed and held lines. The new stamped(rest) helper adds the same ^\d{4}-\d\d-\d\dT[\d:.]+Z prefix, and String.raw keeps the backslashes. Pattern by pattern:

    • denial(mode) builds the same check and token patterns, still capturing the reason word.
    • STOPPED, STEP_FAILED and MINT_START are unchanged, anchors included.
    • In mintEnd, ${id.replace(".", "\\.")} is evaluated as normal JavaScript inside String.raw, so the id escaping is the same as before. It still has no $ anchor, as before.
    • LISTED and HELD interpolate fixed strings with no regex metacharacters.

    So kill-switch and broker-refusal detection is neither loosened nor tightened.

  • The dropped arguments were never read. The functions no longer get had, and dropDeferral no longer gets github/repo. None of them read those values (link 1 below), so no hold write or keepHold path changes.

  • parkingStatus(code) returns the same values. It is code === null ? CONFIRMED : NEEDS_DECISION, the same expression the three call sites had inline (link 2), so refusals still park at the same Work status.

  • The import change is a merge only. The two imports from admit.mjs became one with the same names. Nothing new is imported.

Links:

  1. admit, parkDone, handBackParked, dropDeferral, refuseDeferred
  2. parkingStatus

Scope and inputs

  • Not affected: no trust control, token request, kill-switch action, merge hold, plugin manifest or instruction surface.
  • Pull request description: it contains no instructions aimed at this lane. The closing issue's body was left out by the wrapper.
  • Earlier reviews: none by this lane (0 earlier heads), so this was a full review, not blocking only.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for c693fa1

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-14273-c693fa156f332e3d1ddddd2321ccb5b5a7fcf453, 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 00ce635 Nov 8, 2026
63 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14152-42530357846-1 branch November 8, 2026 23:35
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 00ce635ca300ddd920c938e39bb153108f61cd8c; 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 label-unblocked.mjs .github script (part 1 of 2)

0 participants