Skip to content

refactor(skill-quality): simplify check-evals-quality and check-listing-budget scripts - #15168

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-14752-42883487551-1
Nov 10, 2026
Merged

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

Conversation

@melodic-automation-lanes

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

Copy link
Copy Markdown
Contributor

Closes #14752

Summary

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

Simplified the two skill-quality scripts without changing their behavior. In check-evals-quality.sh the jq program gains two defs (sole_criterion, criteria) that replace four repeated selector blocks, Q8 binds the trimmed expected_output length once instead of computing it twice, and the bash loop shares two small helpers (set_fixture_roots, fixture_missing) between the FILE and PROSE branches. In check-listing-budget.sh the CHARS_PER_TOKEN validation moves into add_reconstructed_row, its only consumer, replacing two duplicated calls, and the report loop compares each budget once instead of twice. The header comments, which are the --help text, are untouched.

Not verified

  • check-evals-quality.test.sh and check-listing-budget.test.sh were not run: this lane runs no interpreter or test runner; left to the PR's CI
  • check-listing-budget.sh was not executed here (no wrapper for it); its change was verified by reading and by the subagent review only; CI's listing-budget-configured and the test suite exercise it
  • shellcheck was not run on the two scripts (not available in this lane); left to the PR's CI
  • tidy skipped passes 4 and 5 (write-for-humans, ai-slop fix) on the changelog fragment: its text is mandated verbatim by the issue's acceptance criteria. Pass 2 proposal, not applied: the comment '# True when path $1 exists under neither fixture root.' above fixture_missing restates its one-line…
  • ci-status green is a PR check, left to the PR's CI
  • the runner's untracked root dotfiles (.bashrc, .gitconfig, .idea, .vscode, etc.) were excluded from the tidy measurement as not part of this change

Fix

  • plugins/skill-quality/scripts/check-evals-quality.sh: jq defs sole_criterion and criteria replace the repeated selectors in Q3, Q7, Q8 and Q10; Q8 binds $len once; set_fixture_roots and fixture_missing helpers replace the duplicated dirname and existence-test lines in the FILE and PROSE branches
  • plugins/skill-quality/scripts/check-listing-budget.sh: CHARS_PER_TOKEN validation moved into add_reconstructed_row (same cases, same error order); report loop computes the over-budget comparison once per row
  • .changes/skill-quality/work-resolve-issue-issue-14752-42883487551-1-3a8d7729.md: patch fragment from new-changelog-fragment, body '### Changed' with 'Internal simplification, no behavior change.'

Verification

The runner ran each check from the base copy against 418ee88:

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

The run reports:

  • check-evals-quality wrapper on 8 real eval sets (ai-slop/audit, code-tidying/tidy-diff, discovery/research, harness-config/audit, knowledge/distill, performance/climb, pixel-art/ui, docs-hygiene/compress): PASS with 6 Q4 prose warnings, including the '../' traversal token path
  • check-evals-quality wrapper on a scratch fixture built to trigger Q1-Q11 plus FILE missing, '..' and absolute entries: exit 1, 13 FAIL and 13 WARN lines, each matching what the original logic produces (Q8 skips the whitespace-only case and reports the empty one as 0-char; Q10 skips an item Q7 flags)
  • check-changelog-fragments: all 9 fragments valid (run before and after tidy)
  • check-changed-skills: no changed skills, nothing to gate (run before and after tidy)
  • check-affected: 13 passed, 6 skipped over 3 changed files (run before and after tidy)
  • fresh-context subagent review of the whole diff: no behavior difference or bug found; confirmed error order for bad CHARS_PER_TOKEN/CONTEXT_TOKENS combinations, jq def scoping, and that verdict/OVER_ROWS are read nowhere else
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42883487551

Left out: the items under Not verified.

Related

#14752

Merge-Risk: max=MEDIUM demote=false head=418ee888bd30ca312e7a73dff17aa516a716a2a8 rubric=8.3.5 rater=claude-opus-5-5 checker=claude-opus-5-5

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

Copy link
Copy Markdown
Contributor

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

Security review: PR #15168

No security issues found. I read every hunk of all 3 changed files.

This pull request refactors two local lint scripts in plugins/skill-quality/scripts/ and adds a changelog fragment. It does not touch any trusted path, trust control, merge hold, workflow, token request, plugin manifest or instruction surface.

What I checked:

  • check-evals-quality.sh, fixture-path escape checks.
    • FILE branch: the absolute-path, drive-letter and .. rejection still runs before the existence test. Only the existence test moved, into fixture_missing. It reads the same skill_dir and evals_dir values, which set_fixture_roots "$a" now sets just before it.
    • PROSE branch: the "/$c/" == *"/../"* traversal check still comes first in the ||, so a .. token is reported before any filesystem test runs.
    • Variables in the new helpers are quoted the same way as the inline code they replace. No new eval or unquoted expansion is added.
  • check-evals-quality.sh, jq defs. sole_criterion, criteria and the $len binding only rename existing selectors. jq still takes no outside input as program text.
  • check-listing-budget.sh. The CHARS_PER_TOKEN positive-number check moved into add_reconstructed_row, so it still runs before every awk call that uses the value. The value reaches awk only through -v, never as program text. The report loop now sets the verdict and counts over-budget rows once per row, which only affects the report.
  • Changelog fragment. Prose only.

The PR context has no embedded directives aimed at the review.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

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

Code review: PR #15168 (refactor of the two skill-quality scripts)

I found no problems. I read every hunk of all 3 changed files, plus the surrounding code at head in both scripts. None of the changed files matches a trusted-path glob.

check-evals-quality.sh

  • The new jq defs sole_criterion and criteria sit at the top of the program, next to items and caseref. They reference nothing declared later, so scoping is fine. Each one expands to exactly the selector it replaces in Q3, Q7, Q8 and Q10.
  • In caseref as $c | criteria | select(...), jq binds the same way as the old inline form, so . is still each criterion string.
  • In Q8, (...) as $len | select($len < $min) | caseref as $c keeps the case as ., so caseref still reads the case. The message now prints $len, which is the same trimmed length the old code worked out twice.
  • set_fixture_roots and fixture_missing set and read the same global evals_dir/skill_dir the inline code used. Both error and warning messages still interpolate those globals after the call. fixture_missing is the same [[ ! -e … && ! -e … ]] test, and it is only used in if conditions under set -uo pipefail (no -e).
  • None of the new comments inside the single-quoted JQ_PROG contains an apostrophe, so the shell quoting is intact.

check-listing-budget.sh

  • require_positive_number CHECK_SKILL_LISTING_CHARS_PER_TOKEN now runs inside add_reconstructed_row. That function is only called directly, never inside $(...), so the check's exit 2 still ends the script.
  • The error order is unchanged in both callers:
    • CONTEXT_TOKENS branch: the int check runs first, and the to_decimal call that now comes before the chars/token check can't fail on an already-checked int.
    • Band branch: the check now runs twice, but the first call exits on bad input and the second gives the same result.
  • In the report loop, verdict is now set when BAND is 0 too, but nothing reads it on that path (it is only used at line 605). OVER_ROWS is counted the same way.

Closing issue #14752 acceptance criteria

  • Behavior unchanged: met, by my reading. The PR adds no test, so if this criterion broke, only the existing check-evals-quality.test.sh / check-listing-budget.test.sh suites could catch it. I didn't run those suites (no shell in this lane). The PR body's runs are claimed by the author and I haven't verified them.
  • Diff touches only the listed files plus a fragment: met.
  • Under 400 lines and 15 files: met.
  • Fragment: met. It has bump: patch, a ### Changed heading, and the exact required line.
  • ci-status green: I can't judge this here; it's for the PR's CI.

There are no plugin manifest changes and no prior findings. This review was not limited to blocking findings.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 418ee88

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-15168-418ee888bd30ca312e7a73dff17aa516a716a2a8, expires on 2026-12-10.

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 10, 2026
Merged via the queue into main with commit 2765225 Nov 10, 2026
63 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14752-42883487551-1 branch November 10, 2026 21:01
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 27652257e89ba37027c524164fd1d6748f79b768; 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 scripts skill-quality plugin code (1 of 2)

0 participants