Skip to content

refactor(work-resolve-issue): simplify check-blockers, limits and post-statuses - #14176

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

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

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14145

Summary

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

Three of the four listed work-resolve-issue scripts are now shorter, with outputs, exit codes, logged text, flags and exports unchanged. limits.mjs routes its four 'valid set value over its default' resolvers through one private overDefaults helper and its two config-file reads through one readConfig helper. check-blockers.mjs builds one closedByTrusted closure instead of two (it is stateless, so the API calls are the same) and folds four log-write-return-0 stops into a skip helper. post-statuses.mjs moves the per-iteration rank helper to module scope and parses ISSUE_NUMBER once. prune-branches.mjs was reviewed and left unchanged: its query builder and loop are already tight, and the remaining tweaks would only shuffle lines without making it clearer.

Not verified

  • node test suites (check-blockers.test.mjs, post-statuses.test.mjs, and the callers' tests that import limits.mjs) were not run here: the lane cannot run node, so they are left to the PR's CI
  • tidy skipped: the change is under .github/, a listed shared path, so it is not tidied
  • prune-branches.mjs left unchanged: on review, no simplification made it clearer while keeping its GraphQL query text identical
  • ci-status green is a PR check, left to the PR's CI
  • changes left uncommitted in the working tree as the runner instructs; the runner builds the patch

Fix

  • .github/scripts/work-resolve-issue/check-blockers.mjs: one shared closedByTrusted instance for clearedPastReport and finishedParent; a local skip(message, outputs) helper replaces four log/write/return-0 blocks with the same log text, output keys and order
  • .github/scripts/work-resolve-issue/limits.mjs: private overDefaults and readConfig helpers back resolveLimits, resolveStrandedBackoff, resolveAdmission, resolveWip, readLimits and readWip; a finite helper shared by positive and the admission-min-per-hour check; every export keeps its name and…
  • .github/scripts/work-resolve-issue/post-statuses.mjs: rank hoisted out of the step loop to module scope; Number(env.ISSUE_NUMBER) computed once after validation

Verification

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

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

The run reports:

  • check-changelog-fragments: all 7 fragments under .changes/ valid
  • check-changed-skills: no changed skills, nothing to gate
  • check-affected: 8 passed, 8 skipped over 3 changed files
  • git-read diff --numstat HEAD: 3 files, 43 added and 53 removed lines
  • fresh-context review subagent over the whole diff: no behavior differences found (checked call order, call counts, output keys, null/non-object JSON inputs, hoisting, export binding kinds); its two readability points were applied (the separate recheck write and the events comment's position were…
  • Grep: no test or script reads these files' source text; closedByTrusted (admit.mjs:2440) only builds a stateless closure, so sharing one instance makes the same API calls
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42501009330

Left out: the items under Not verified.

Related

#14145

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

Security review: PR #14176 (head 6880240)

No security issues found. I read every hunk of all 3 changed files. .github/scripts/work-resolve-issue/limits.mjs is on a trusted path, so I read its whole change and checked what it gates.

limits.mjs (trusted path, feeds the stop/limit and admission pacing logic). I checked that the refactor keeps the same behaviour:

  • overDefaults(defaults, set, valid) returns valid(set?.[key], key) ? set[key] : value, which matches each old per-resolver map.
  • The validators are unchanged:
    • integer limits use >= 0 for ZERO_ALLOWED keys and >= 1 otherwise;
    • stranded backoff is 1..STRANDED_BACKOFF_MAX;
    • admission-factor must be > 0 and <= 1;
    • admission-min-per-hour must be finite and 0..100, and finite is the old inline check pulled out into a helper.
  • readConfig still falls back to undefined when the file is missing or isn't valid JSON, and null?.limits / null?.wip also give undefined. Both readers still end up on the defaults.
  • Moving resolveWip out of the old try doesn't open a new way to throw, because the validators only check JSON values.

No cap, ceiling or fallback is wider than at base.

check-blockers.mjs.

  • The two closedByTrusted(...) calls are now one shared closure. At admit.mjs#L2440 it builds a closure with no cache that re-reads the issue on every call. Sharing it therefore makes the same trust checks and the same API calls.
  • The skip helper's default outputs { proceed: "false", untrusted: "false" } match the three stops that used them. The outside-author and untrusted-provenance stops still pass untrusted: "true" (and outsider: "true") explicitly.
  • Every stop still returns before any proceed: "true" path.

The untrusted-provenance and outsider holds are not weakened.

post-statuses.mjs. Moving rank to module scope and parsing Number(env.ISSUE_NUMBER) once are pure refactors. The isLaneBranch check on REUSE_BRANCH and the readBranch checks use the same value as before.

The PR description contains no embedded directives. Prior findings: none (0 earlier heads reviewed, not blocking-only).

critical-findings: 0

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

claude-review reviewed 6880240684f8cd611e705ecdf27f84a1ee6daa5c: 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. The refactor looks behavior-preserving.

check-blockers.mjs

  • Sharing one closedByTrusted closure is safe. The factory at admit.mjs:2440 only builds isApp and an async trusted. It makes no API call when built and keeps no state between calls, so clearedPastReport and finishedParent make the same requests as before.
  • The skip helper keeps the log-then-write order, the four messages word for word, the output objects (including the outsider key) and return 0.

limits.mjs

  • overDefaults(defaults, set, valid) returns valid(set?.[key], key) ? set[key] : value. That matches all four old resolvers, including null, primitive and non-object inputs.
  • readConfig turns a missing file or bad JSON into undefined, and undefined?.limits / undefined?.wip fall back to the defaults as before.
  • readWip used to wrap resolveWip in the try too. The validators in WIP_VALID cannot throw on values parsed from JSON, so moving it out changes nothing.
  • finite gives admission-min-per-hour the same check as before.

post-statuses.mjs

  • rank moved to module scope unchanged.
  • Number(env.ISSUE_NUMBER) now runs once, before the REUSE_BRANCH check. Number cannot throw on a string, so the new position is harmless.

Closing issue #14145 acceptance criteria

  • Behavior unchanged: met, by reading the code. The existing check-blockers.test.mjs and post-statuses.test.mjs, plus the tests that import limits.mjs, would catch a change in output. I did not run them; this review had no shell.
  • Only listed files edited: met. All 3 files are on the issue's list, and prune-branches.mjs was left unchanged with a stated reason.
  • Size limit (400 lines, 15 files): met. The diff has 3 files, +43/−53.
  • ci-status green: I can't check this here; it is left to the PR's CI. The PR's own verification claims (fragment and skill checks passing, a subagent review) come from the author and I have not confirmed them.

No plugin manifests changed. No settled threads or prior findings apply, and the PR context contains no embedded instructions.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 6880240

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-14176-6880240684f8cd611e705ecdf27f84a1ee6daa5c, 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 6789090 Nov 8, 2026
66 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14145-42501009330-1 branch November 8, 2026 17:38
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: work-resolve-issue (1 of 2)

0 participants