Skip to content

fix: Simplify .github: branch-cleanup, intake-reenter - #14198

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

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

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14103

Summary

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

Simplified two of the three listed files with behavior unchanged. cleanup.mjs now renders both summary tables through one TABLE_HEAD and candidateRow, prints the reason lists (kept, for a person, skipped at delete time) through one reasons() mapper, reads a branch tip through readTip, and tests DRY_RUN through isDryRun. It also drops a ?? null on ledger issue/pr that readList's issueRef already guarantees. reenter.mjs gets openIssue, positiveId and notFound in place of the three open-issue checks, the two id parses and the two 404 checks. rules.mjs is left as is: it is already a handful of single-purpose pure functions with nothing repeated, so a change there would only churn it. API call order and count, output text, exit codes and exports are unchanged.

Not verified

  • node --test for cleanup.test.mjs, reenter.test.mjs and prune-branches.test.mjs was not run: this lane runs no interpreter. Left to the PR's CI.
  • tidy skipped: the change sits under .github/, a listed shared path.
  • cant-fail-scan not run: it scans test files and no test file changed.
  • ci-status green on the PR is left to the PR's CI.

Fix

  • .github/scripts/branch-cleanup/cleanup.mjs: added readTip, TABLE_HEAD, candidateRow, reasons and isDryRun helpers and used them in stillDeletable, plan, remove and main; inlined the one-use config variable into cap; replaced count() with reported/kept arrays; dropped the redundant ?? null on the…
  • .github/scripts/intake-reenter/reenter.mjs: added openIssue, positiveId and notFound and used them in classify, liftReenters, fieldReleases, removeLabel, dropRecord, releaseField and main.

Verification

The runner ran each check from the base copy against 1c9297d:

  • 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

#14103

Merge-Risk: max=HIGH demote=true head=1c9297d2355247c2aa2ba30118198cc0f4b10482 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 1c9297d2355247c2aa2ba30118198cc0f4b10482: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #14198 (head 1c9297d)

I found no security issues. I read every hunk of both changed files. Neither file matches a trusted-path glob, and neither is a trust control this lane watches.

.github/scripts/branch-cleanup/cleanup.mjs. This is a refactor that keeps behaviour the same:

  • readTip builds the same git/ref/heads/${refPath(name)} path as the code it replaces, and the name is still URL-encoded one segment at a time.
  • isDryRun keeps the fail-safe default: anything other than the exact string "false" is still a dry run.
  • TABLE_HEAD, candidateRow and reasons print the same text as before, and table cells still escape |.
  • The dropped ?? null on the ledger's issue and pr loses nothing. remove takes planned from readList at line 309, and readList refuses any entry whose issue or pr fails issueRef, which accepts only null or a positive safe integer (cleanup.mjs:174, 291-292). So undefined never reaches the ledger.
  • The delete stage's checks are unchanged: tip still at the listed SHA, no open pull request from or into the branch, excluded names, and the cap.

.github/scripts/intake-reenter/reenter.mjs. This is also a refactor that keeps behaviour the same:

  • openIssue(issue) is !issue.pull_request && issue.state === "open", the exact negation of the three conditions it replaces.
  • positiveId uses the same regex ^[1-9][0-9]*$ and still falls back to null for SENDER_ID and LANES_APP_ID. A malformed ID still matches no trusted human or app.
  • notFound checks the same GitHubError 404 condition.
  • The trusted-actor checks (humans.has(senderId), authorAdmitted, loadTrustedList) are unchanged. Who can lift a hold or re-enter an issue is not widened.

Other notes

  • The pull request text has no embedded instructions aimed at this lane.
  • No plugin manifest, workflow permissions:, token request or kill-switch file changed.
  • Running the tests (node --test) was left to CI by the authoring lane; this review did not run them either.
  • The instruction-exception register was not needed: the diff deletes no standing instruction.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

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

Code review: no findings. I read both changed files in full (.github/scripts/branch-cleanup/cleanup.mjs and .github/scripts/intake-reenter/reenter.mjs). Neither matches a trusted-path glob.

What I checked, and each change behaves as before:

  • cleanup.mjs
    • readTip, TABLE_HEAD, candidateRow, reasons and isDryRun each build the same API path or the same text as the code they replace.
    • Each helper is a module-level const declared before the functions that call it, and nothing calls it at import time, so there is no ordering problem.
    • Inlining config into cap keeps the single loadConfig() call, and nothing else in plan read config.
    • The reported/kept arrays give the same counts and lists as the old count() and filter calls.
    • Dropping ?? null on the ledger issue/pr is safe. remove takes its candidates from readList (cleanup.mjs:309), and issueRef (cleanup.mjs:174) rejects any entry whose issue or pr is neither null nor a positive integer. An undefined value throws before the ledger entry is built.
  • reenter.mjs
    • openIssue, positiveId and notFound are exact replacements for the three open-issue checks, the two id parses and the two 404 checks. That includes the ?? "" fallback and the /^[1-9][0-9]*$/ regex.

Closing issue #14103, acceptance criteria:

  • Behavior unchanged: met, judged from the code. Existing tests cover these files (cleanup.test.mjs, reenter.test.mjs). I did not run them; this lane has no shell.
  • Edits only the listed files: met. rules.mjs is left as it was, and the PR body explains why.
  • Within 400 changed lines and 15 files: met.
  • ci-status green: I can't check this here; it is left to CI.

The PR body's verification steps are the author's claims; I did not confirm them.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 1c9297d

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-14198-1c9297d2355247c2aa2ba30118198cc0f4b10482, 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 8683e2f Nov 8, 2026
63 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14103-42508832185-1 branch November 8, 2026 19:00
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 8683e2f71d82eb1dccc7bb3da9fb048f5f8a0b51; 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 .github: branch-cleanup, intake-reenter

0 participants