Skip to content

refactor(ci): simplify the plugin-eval scripts - #14158

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

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

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14115

Summary

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

Applied behavior-preserving simplifications to five of the seven plugin-eval scripts: a range list replaces a line-by-line Set in deterministic-suite's grader cut, refusals() in select-plugins folds its two duplicated read-then-check branches into one inspect helper, hill-climb-publish shares one raw-diff line helper, eval-handoff passes the loaded launcher through instead of rebuilding it, and summarize drops a repeated init?.skills lookup and the result_ name. policy-probe.mjs and hill-climb-edit.mjs were reviewed under the same four checks and left unchanged, since no edit made them shorter or clearer. Net 36 insertions and 60 deletions, with no output, exit code, flag or exported name changed.

Not verified

  • The node test suites beside these scripts (*.test.mjs) were not run by name in this lane, which allows no interpreter; check-affected passed but its output does not list which checks ran, so the suites are left to the PR's CI.
  • Tidy not run: every changed file is under .github/, a shared path the tidy cutoffs exclude.
  • The literal U+FEFF character in select-plugins.mjs frontmatter() was left as is: the edit to the \uFEFF escape that its sibling body() uses could not be applied, because the literal character did not survive in the edit input.
  • ci-status green on the PR is left to the PR's CI.

Fix

  • .github/scripts/plugin-eval/deterministic-suite.mjs: stripCaseYaml cuts by a list of [start, end) ranges (all paid: the header through the last item) in place of building a Set line by line; main reads evalDirOf once instead of twice.
  • .github/scripts/plugin-eval/eval-handoff.mjs: main passes loadLauncher's object to judgeLegStreams directly instead of destructuring and rebuilding it.
  • .github/scripts/plugin-eval/hill-climb-publish.mjs: a rawLines helper replaces the raw-diff split-and-filter expression that diffRefusal and push each repeated.
  • .github/scripts/plugin-eval/select-plugins.mjs: refusals uses one inspect helper and a single push in place of two copies of the read/undefined-check/refusal block; caseRefusal drops a base === null guard, since caseKeys(path, null) already returns an empty Map for both prompt.md and case.yaml.
  • .github/scripts/plugin-eval/summarize.mjs: health reads the init message's skills once; the local result_ is renamed overall.

Verification

The runner ran each check from the base copy against 5cd20e0:

  • 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

#14115

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

Security review: PR #14158 (refactor(ci): simplify the plugin-eval scripts)

I found no security issues.

I read every hunk of all 5 changed files under .github/scripts/plugin-eval/. None of them is on the trusted-path list. Two of the changes touch refusal gates and one touches the cost cut, so I checked that each behaves exactly as before:

  • select-plugins.mjs refusals(): the new inspect helper reads head and then base, in the same order as before. It still returns "cannot be read to inspect" when either side is undefined, and it pushes the same reason for each branch: outside the suite paths, not a case file, not markdown, a case or prose refusal. A case file that is not a case definition still pushes nothing. No refusal path is dropped.
  • select-plugins.mjs caseRefusal(): removing the base === null guard is safe. frontmatter(null) turns the input into "" and returns an empty Map (L128-L139). For case.yaml, caseKeys wraps the input as ---\n\n---\n, which also gives an empty Map. A ?? new Map() fallback is still there as well. The new-file check is unchanged.
  • deterministic-suite.mjs stripCaseYaml(): the paid-grader cut is unchanged. graderItems finds items only after header, in order (L91-L116). So when every item is paid, the single [header, lastEnd) range covers the old union of item ranges plus the header range. When only some are paid, the old cut is the same set of paid item ranges. The PAID.test(stripped) check and the parser cross-check that follow still run.
  • hill-climb-publish.mjs: rawLines is the same split-and-filter expression that diffRefusal and push each used before. The push refusal checks are unchanged.
  • eval-handoff.mjs: loadLauncher returns exactly { judgeLeg, linesToMessages, isCreditStop } (L145), so passing that object straight through gives judgeLegStreams the same input.
  • summarize.mjs: only a local variable is renamed and the init skills lookup is read once instead of twice. The annotation still escapes its text through property() and data().

Other checks:

  • The diff touches no trust control, token request, kill switch, merge hold, plugin manifest or standing instruction.
  • The PR description contains no embedded instructions aimed at this lane.
  • Nothing in this PR spends money or credits.
  • This was a full review, not a blocking-only one: the prior-findings file shows 0 earlier heads reviewed.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

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

Code review: PR #14158, refactor(ci): simplify the plugin-eval scripts

No findings. I read every hunk of all 5 changed files. Each one behaves the same as before.

What I checked:

  • deterministic-suite.mjs, stripCaseYaml: When every grader is paid, the old code cut the paid items plus the header through the end of the last item. graderItems only collects items after the header (first > header) and before items.at(-1)[1], so those items already sit inside that one range. The single range gives the same cut. When only some graders are paid, the range list cuts exactly the lines the old Set did. main now calls evalDirOf once instead of twice, with the same result.
  • eval-handoff.mjs: loadLauncher returns exactly { judgeLeg, linesToMessages, isCreditStop }, so passing that object straight to judgeLegStreams is the same as taking it apart and rebuilding it.
  • hill-climb-publish.mjs: rawLines is the same split-and-filter expression both call sites used.
  • select-plugins.mjs, caseRefusal: caseKeys(path, null) gives an empty Map for both .md and case.yaml paths (frontmatter on "" and on "---\n\n---\n"). The ?? new Map() fallback also still covers a null return, so dropping the base === null guard changes nothing.
  • select-plugins.mjs, refusals: The new code reads head then base in the same order as before, and only on the same branches. It pushes the same reasons. A case file that is not a case definition still produces no refusal. proseRefusal(base, head) matches how inspect calls it.
  • summarize.mjs: Reading skills once is the same as the repeated init?.skills. Renaming result_ to overall is local only; the returned result key is unchanged.

Closing issue #14115, acceptance criteria:

  • Behavior unchanged: met, as checked above. Each changed script has a test suite next to it (deterministic-suite.test.mjs, eval-handoff.test.mjs, hill-climb-publish.test.mjs, select-plugins.test.mjs, summarize.test.mjs). I did not run them; I have no shell. The author says the caseKeys(path, null) path is covered at select-plugins.test.mjs:331 and :345; I did not check that.
  • Diff edits only the listed files: met. All 5 files are on the issue's list.
  • Within 400 lines and 15 files: met (5 files, about 96 changed lines).
  • ci-status green: left to CI; I could not verify it.

Spend: none. This change does not affect any billed resource or how many lane runs happen.

Other notes:

  • This lane has not reviewed an earlier head of this PR, so this was a full review, not a blocking-only one.
  • No plugin manifest changed, so no manifest checks applied.
  • I found no embedded instructions in the PR context.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 5cd20e0

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-14158-5cd20e01c8d617d7b5d802bc19c101dc2ec00ea5, 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 9667762 Nov 8, 2026
63 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14115-42496100573-1 branch November 8, 2026 16:47
@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/plugin-eval/deterministic-suite.mjs 3 0 0 0 0 0
.github/scripts/plugin-eval/hill-climb-publish.mjs 1 0 0 0 0 0
.github/scripts/plugin-eval/select-plugins.mjs 1 1 0 0 0 0
.github/scripts/plugin-eval/summarize.mjs 1 0 0 0 0 0

Surviving mutants

Location Operator Disposition Cause
.github/scripts/plugin-eval/select-plugins.mjs:357 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 9667762c0803d96f5a36d50edbf6578844cadc2f; 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: plugin-eval

0 participants