Skip to content

refactor(intake-triage): fold duplicated label, admission-error, result and edge steps into helpers - #14231

Merged
melodic-automation-lanes[bot] merged 3 commits into
mainfrom
work-resolve-issue/issue-14106-42514631938-1
Nov 8, 2026
Merged

melodic-automation-lanes[bot] merged 3 commits into
mainfrom
work-resolve-issue/issue-14106-42514631938-1

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14106

Summary

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

Simplified the intake-triage apply-verdict and edges scripts with behavior unchanged. apply-verdict.mjs now uses one labelNames helper for the two issue-label reads, one admissionError helper for the two admission catch blocks, one report closure for run()'s two log-and-return exits, and one rules() thunk for the admission-rules path. lineValue now returns early. In edges.mjs, addEdges has one wrote() helper for the two written/ids pushes and one done() that skips blockers past MAX_EDGES after the in-cap loop, in the same order as before, and the shadowed found in textBlockers is renamed. In run.sh, the env array that shadowed the env command is renamed to plugin_eval. build-suite.mjs is left as is: I found nothing in it to simplify without moving code between files, which the issue puts out of scope.

Not verified

  • node --test for apply-verdict.test.mjs, edges.test.mjs and build-suite.test.mjs was not run: this lane cannot run node, so it is left to the PR's CI
  • tidy skipped: the change is under .github/, a listed shared path for the tidy cutoffs
  • ci-status green on the PR is left to the PR's CI
  • build-suite.mjs left unchanged: no simplification found that stays inside the file without moving code between files, which the issue puts out of scope

Fix

  • .github/scripts/intake-triage/apply-verdict.mjs: labelNames and admissionError helpers, a report closure for run()'s two exits, a rules() thunk for the admission-rules path, and an early return in parseVerdict's lineValue
  • .github/scripts/intake-triage/edges.mjs: wrote() and done() helpers in addEdges (the past-cap skips now run after the in-cap loop, in the same order), and the shadowed regex match in textBlockers renamed
  • .github/scripts/intake-triage/reentry-eval/run.sh: the command array renamed from env to plugin_eval

Verification

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

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

The run reports:

  • .lane/checks/bin/check-changelog-fragments: all fragments valid (the change touches no plugin, so no fragment is owed)
  • .lane/checks/bin/check-changed-skills: no changed skills, nothing to gate
  • .lane/checks/bin/check-affected: 10 passed, 6 skipped over 3 changed files
  • fresh-context subagent review of the whole diff against HEAD: no behavior change found in any hunk (this covered thrown errors mid-loop, the order of the skipped/missed/written arrays, closures reading let variables when called, and TDZ); I applied two of its readability notes (renamed finished to…
  • grep across the repository for importers of apply-verdict.mjs and edges.mjs: every imported name is still exported; no test reads the source text of these files
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42514631938

Left out: the items under Not verified.

Related

#14106

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

Security review: PR #14231 (head 909af9b)

No security issues found. This review was blocking only: the lane already reviewed the earlier head ed6f558. The new head is a merge of main, and the PR's own diff is the same as at that head.

I read every hunk of all 3 changed files. The PR is a refactor of the intake-triage scripts, which write labels, Work status and blocked-by edges on issues. I checked each hunk to confirm the old behavior is kept:

  • apply-verdict.mjs
    • labelNames and admissionError produce the same values as the inline code they replace.
    • The early return in lineValue still cleans up model text only when exactly one line matches. The 40-character cut and the [^A-Za-z0-9 ,.:-] → ? filter are unchanged.
    • The report closure runs only after reasonsError and edges are set, and it takes admission as an argument.
    • The rules() thunk still reads admission-rules.json lazily, from BASE_PATH (the base checkout), inside the admitIssue and noteSplit closures.
  • edges.mjs
    • In addEdges, the loop now covers wanted.slice(0, MAX_EDGES). done() then adds the past-cap skips in the same order as before (edges.mjs#L192-L195).
    • The MAX_EDGES limit on edge writes is unchanged.
    • When miss rethrows, the past-cap skips are still left out, as before.
    • textBlockers only renames a variable.
  • reentry-eval/run.sh: the command array is renamed from env to plugin_eval. Quoting and arguments are unchanged.

Out of scope for this PR:

  • None of the changed files is on the trusted-path list.
  • The PR touches no trust control, merge hold, token scope, kill switch, plugin manifest or instruction surface.
  • The PR context file contains nothing addressed to this lane.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review: no blocking findings (blocking-only review)

This lane already reviewed an earlier head (ed6f5581), so this pass reports only blocking findings. The new head 909af9ba is a merge of main. I read every hunk in all 3 changed files and found nothing blocking. None of the 3 files is on a trusted path.

apply-verdict.mjs

  • lineValue: shown[prefix] is still set only when there is exactly one matching line.
  • labelNames and admissionError: these match the inline expressions they replace.
  • report (L756):
    • It is declared after plan, edges and reasonsError.
    • It reads them when it is called, so the value say(admission) sets in reasonsError still reaches the final return.
    • It logs the summary before returning, as both original exits did.
  • rules(): it is still called only inside the admit / noteSplit argument objects. A malformed rules file still stops only admission or the split note, not the verdict.

edges.mjs

  • done() (L192) records the skips for blockers past the cap after the in-cap work. The original also recorded them after every in-cap blocker, because they sat at higher indexes in wanted. So the order of result.skipped is unchanged.
  • Errors that are rethrown: when miss rethrows, the function still exits before any past-cap skip is recorded, as it did before.
  • wrote(): it replaces both push pairs exactly.

run.sh

  • The rename from env to plugin_eval is complete: no reference to the old array is left.

Closing issue #14106

  • Behavior unchanged: met, judged from reading the code. I ran nothing; the PR's node --test runs are claimed by the author and unverified.
  • Edits only the listed files: met.
  • Within 400 changed lines and 15 files: met.
  • ci-status green: left to CI, not confirmed here.

I found no embedded instructions in the PR context. There are no manifest changes and nothing that costs money.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor Author

Verification evidence for 909af9b

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-14231-909af9baf03e9108f9885b999ae87a7d96a77e5c, expires on 2026-12-08.

One comment per pull request, updated in place for each new head.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

A lane run on this pull request's head failed because the token broker refused it as workflow-modified: .github/workflows/pr-run-activity-write.yml changed on main after the run's event, and a rerun keeps the old file. pr-merge pushes an empty commit so the next pr-unblock run uses main's files. It does this once per version of that file, so if a run fails the same way again, a person looks at it. The push starts no run itself: the conflict-resolution run starts at the next push to main or half-hourly pr-unblock-dispatch tick, or when a listed person runs it by hand, and an address-feedback run can start after both review lanes review the new head, if an unresolved thread is left for it.

The token broker refused a lane run on the previous head as workflow-modified (.github/workflows/pr-run-activity-write.yml). This commit changes no file.
Lane-Activity: pr-unblock/resolve-conflicts
@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 8, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

Merged via the queue into main with commit 595fb90 Nov 8, 2026
60 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14106-42514631938-1 branch November 8, 2026 21:57
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 6, survived 1, timeout 0, no coverage 0, invalid 0, not run 0.
Covered-code score 86%; mutation score 86%.

File Killed Survived Timeout No coverage Invalid Not run
.github/scripts/intake-triage/apply-verdict.mjs 4 0 0 0 0 0
.github/scripts/intake-triage/edges.mjs 2 1 0 0 0 0

Surviving mutants

Location Operator Disposition Cause
.github/scripts/intake-triage/edges.mjs:79 LCR productive input-gap

The run's summary has the full report.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 595fb90696ee840a3e9a87ad4aec02dabad3b57d; 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 intake-triage .github script

0 participants