Skip to content

test(repo-fleet-hygiene): add outcome eval cases and frozen trigger probes - #12051

Merged
kyle-sexton merged 9 commits into
mainfrom
test/6613-repo-fleet-hygiene-evals
Nov 1, 2026
Merged

kyle-sexton merged 9 commits into
mainfrom
test/6613-repo-fleet-hygiene-evals

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Refs: #6613
Refs: #6476

Summary

Adds outcome eval cases for the repo-fleet-hygiene plugin's audit, apply, setup and sync skills, and a frozen trigger-probe file for audit. The smoke pass caught two graders failing correct replies, and both are fixed here; review then caught one of those fixes passing a one-row reply, and that is fixed too. No skill text changes, and no concise rewrite ships. #6613 stays open for its measured pass.

Fix

  • plugins/repo-fleet-hygiene/evals/: six outcome cases, all deterministic, with offline pass and fail samples for every grader. evals/fixtures/fleet-repos.sh writes a made-up fleet into the workspace. Every remote is a bare repository under ./remotes, reached by a relative path, and the operator's global Git config is kept out, so nothing touches the network or a real checkout.
    • audit-fleet-plain-words: "find the merged branches and dead worktrees across ./fleet and clean them up". The run routes to the fleet audit, mutates nothing, reports the evidence gap, and hands deletion to apply.
    • audit-near-miss-one-repo: the same chores in a single checkout, a near miss. The fleet audit does not fire.
    • audit-rejects-unknown-flag: /repo-fleet-hygiene:audit fleet --prune-merged. The reply rejects the unknown flag.
    • apply-requires-plan-file: apply --apply --yes with no plan file. The reply names the plan file and the audit that produces it.
    • setup-skip-wants-extend: setup apply --skip third_party, "on top of the usual directories". The reply names the extend form, and no config write, edit or audit run happens.
    • sync-apply-needs-consent: sync fleet --apply. The run never passes an unconfirmed --yes and never syncs by hand. It shows the repository count and both action rows, each tied to its repository, then asks to go ahead.
  • plugins/repo-fleet-hygiene/probes/audit.json: 20 frozen trigger queries (10 positive, 10 negative; 12 train, 8 validation).
  • Two graders widened after the smoke pass (45f2252579), and shows-action-rows then tied each row to its repository (9b5b8756b8, 89daa4e753, d8e5bf7226). See Verification.
  • The fixture's config is indented with spaces, so the editorconfig check passes (9b5b8756b8).
  • The changelog fragment stays at bump: none: no skill text changed.

Verification

Smoke pass: claude plugin eval (Claude Code 2.1.316), Opus under test, Opus judge (no judge grader ran), --runs 1 -j 2 --scaffold --allow-tools Bash Write Edit --max-cost-usd 5, with a short private TMPDIR.

Validity: run-validity.py --scaffolded returned verdict: VALID. There were no permission denials and no errors, and every trace is on claude-opus-5-5. Two warnings: "skill fired" (slash-invoked cases carry no skill-fired grader; two no-trigger controls are exempt), and the ceiling (the baseline scored 1.00 on audit-near-miss-one-repo). The delta over the other five cases is +0.49.

Case With plugin Without plugin
apply-requires-plan-file 1.00 0.00
audit-fleet-plain-words 1.00 0.00
audit-near-miss-one-repo 1.00 1.00
audit-rejects-unknown-flag 0.00 (1.00 under the fixed grader, rescored offline) 0.00
setup-skip-wants-extend 1.00 0.75
sync-apply-needs-consent 0.80 (1.00 under the fixed grader, rescored offline) 0.60
  • The pass cost 1.67 USD at list price and took 115 seconds.
  • Failure classification: every failed grader was read against its trace (full last reply).
    • audit-rejects-unknown-flag / rejects-unknown-flag, with plugin: grader defect, fixed. The reply opened "--prune-merged isn't a flag this skill accepts" and ran nothing. The grader knew "isn't a recognized/supported flag" but not "isn't a flag this skill accepts". It now accepts that form.
    • sync-apply-needs-consent / shows-action-rows, with plugin: grader defect, fixed. The reply showed the dry-run plan as a table, with fleet/alpha "Switch to the default branch, then pull --ff-only" and fleet/beta "pull --ff-only". The grader required the literal row name checkout-default. It now also accepts "switch to / check out the default branch" (capitalized or not; the grader is case-sensitive).
    • Both observed replies are new pass samples. Both baseline replies still fail, and every sample keeps its verdict, under the Python and node regex engines.
    • Baseline misses are real, by content. With no plugin, the baseline pruned a merged branch by hand (audit-fleet-plain-words, audit-rejects-unknown-flag), named no plan file or audit (apply-requires-plan-file), and showed no action rows and asked nothing (sync-apply-needs-consent).
  • Review fixes (9b5b8756b8, 89daa4e753, d8e5bf7226): the widened shows-action-rows passed a reply showing only alpha's row, because that row's prose ("switch to the default branch, then pull --ff-only") held both halves of the old pair. The grader is now two lookaheads: alpha with its checkout action on one line, and beta with ff-only, either beta then ff-only with no alpha between, or ff-only then beta on a line that does not name alpha. Graded with node RegExp over the samples: must-pass table, reversed list, the observed smoke reply, a beta-first prose list, one-line two-row replies joined by ; or ,, and rows with a ; inside all match; must-fail empty, fleet/alpha: checkout-default, the one-row prose reply, one-row replies that name beta without an action of its own, an untied action list and the paraphrase all miss.
  • Frozen suite digest: git rev-parse d8e5bf7226:plugins/repo-fleet-hygiene/evals gives 365f946ac5ff3799443b7acbd7eb1b00d0c834b0, the suite with every grader fix. The smoke pass ran on dadb619ec2 (188921acb6).
  • Checks: /evals:validate 0 FAIL; measure-invocation.sh validate PASS; check-affected.sh --tests passed on each commit (pre-push hook); gitleaks git over the branch: no leaks.
  • Found, for the rewrite: setup/SKILL.md:17-22 and audit/SKILL.md:82-87 disagree on what happens with no config file.
  • Unmeasured: trigger passes on the probes (the description is unchanged); a second model.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 5 commits November 1, 2026 01:34
…s failed

rejects-unknown-flag now also accepts "isn't a flag this skill accepts",
and shows-action-rows accepts the checkout row written as "switch to the
default branch". Both observed replies are pass samples; both baseline
replies still fail, under Python and node.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 1, 2026 18:45
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T18:47:03.067895Z fb649e4 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: PR #12051, incremental since 89daa4e7

I found no security issues.

I read every hunk of both changed files in .claude-lane/incremental.diff:

  • plugins/repo-fleet-hygiene/evals/sync-apply-needs-consent/case.yaml: the shows-action-rows grader regex changed in two ways.

    • Semicolons no longer end a row: [^\n;] is back to [^\n].
    • Beta's row now stops at the word alpha instead of at a semicolon. The new form is beta(?:(?!alpha)[^\n])*?ff-only, or else a line that doesn't name alpha with ff-only before beta.

    The eval harness matches this regex against the reply under test, and nothing in it runs. The pattern has no multiline flag and is anchored at ^, so it is tried from one start position. The tempered-dot (?:(?!alpha)[^\n])*? costs at most polynomial work on one reply. Its only input is the model's last message, so no attacker can feed it.

  • .../samples/shows-action-rows.json: adds three pass samples (rows split by a comma, a semicolon inside beta's row, a semicolon inside alpha's row) and one fail sample (beta named first, with the only ff-only belonging to alpha). All four are static grader data.

Scope checks

  • Trusted paths: neither changed file matches a TRUSTED PATHS: glob.
  • Plugin manifests: no manifest changed, so there are no manifest lines.
  • Trust controls, workflows, merge holds and instruction surfaces: this increment touches none of them.
  • Embedded text: the PR context has no instructions aimed at this lane.
  • Prior findings: the earlier rounds had 0 findings, so there is nothing to restate. The round cap is not reached (0 of 3).

Spend: these evals use prepaid API credit, and only when an operator runs them by hand. The increment adds no CI trigger, so this is not a hold.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on fb649e4b19f440ad38e4f42f1f9e6823d27f4030; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review (incremental, 89daa4e..d8e5bf7)

No findings. I read every hunk of both files in scope: case.yaml and samples/shows-action-rows.json.

What changed. The shows-action-rows grader changed in three ways:

  • Alpha's lookahead is line-based again. A ; no longer ends a row.
  • In the beta … ff-only order, the match stops at the next alpha instead of at ;.
  • Only the ff-only … beta order still needs a line that does not name alpha.

The samples file gains three pass samples: the comma one-liner, a ; inside beta's row, and a ; inside alpha's row. It also gains one fail sample: beta named first, where the only ff-only belongs to alpha.

Sample trace (by hand, not run). Every sample gets the verdict the file claims:

  • Pass samples (all 8 match). For example, in the semicolon one-liner and the comma one-liner, beta: ff-only matches the first branch with no alpha between. In the table with already on \main`; `pull --ff-only`, beta's row matches across the ;. In …clean; switch to the default branch, alpha's lowercase switchmatches[Ss]witch\w*`.
  • Fail samples (all 7 miss). In fleet/beta is already current; fleet/alpha: Switch …ff-only, the scan from beta hits (?!alpha) at fleet/alpha before it reaches ff-only. The (?:^|\n) branch has only position 0 to start from (no m flag), and that line contains alpha. The parenthetical one-row reply has no ff-only after beta, so it still fails.

Correction to my last round. I said the proposed alternative would not pass the semicolon one-liner on its own. That was wrong. The owner's reply is right: the first branch matches beta: ff-only directly.

Prior findings and settled threads.

  • My advisory finding from round 2 (; as a row end rejected correct replies) was applied in d8e5bf72 and settled by the owner. The comma and semicolon-in-row cases I named are now pass samples.
  • My round-1 one-row finding stays settled.
  • This is round 3 of a cap of 3, and the file reports past the cap: no, so the cap did not apply.

Not verified by me. I have no shell, so I ran neither the regex nor validate-cases. The trace above is by hand. The owner's node RegExp run and the clean validate-cases result are what the author claims and I have not checked them.

Spend (not a finding). The eval case still uses prepaid API credit through claude plugin eval.

kyle-sexton and others added 3 commits November 1, 2026 15:45
The shows-action-rows grader passed a reply naming only fleet/alpha,
because alpha's prose row ("switch to the default branch, then pull
--ff-only") holds both halves of the old pair. Require alpha's
checkout row and beta's ff-only row on their own lines, and add the
one-row prose reply and an untied action list as fail samples.

Indent the fixture's fleet config with spaces so editorconfig passes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A reply showing only alpha's row with a parenthetical naming beta
("then pull --ff-only (fleet/beta is already current)") still passed
shows-action-rows. Require beta's ff-only in a line or
semicolon-separated segment that does not name alpha, and add that
reply as a fail sample and a one-line two-row reply as a pass sample.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton enabled auto-merge November 1, 2026 20:48
@kyle-sexton
kyle-sexton disabled auto-merge November 1, 2026 20:50

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on 89daa4e7535c2374cd61ee9c5be0600cff9e6098; the summary is in this lane's pull request comment.

claude-lane: claude-review

Treating ";" as a row end failed correct replies: two rows joined by a
comma on one line, or a semicolon inside a row. Beta's "beta ... ff-only"
order now stops at the next "alpha" instead; only the "ff-only ... beta"
order needs a line that does not name alpha. Alpha's row is line-based
again. Adds those three replies as pass samples and a beta-first one-row
reply as a fail sample.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton enabled auto-merge November 1, 2026 21:04
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 1, 2026
Merged via the queue into main with commit 636da98 Nov 1, 2026
69 checks passed
@kyle-sexton
kyle-sexton deleted the test/6613-repo-fleet-hygiene-evals branch November 1, 2026 21:11
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 3, survived 4, timeout 0, no coverage 0, invalid 0, not run 0.
Covered-code score 43%; mutation score 43%.

File Killed Survived Timeout No coverage Invalid Not run
plugins/harness-config/lib/persist-report.sh 3 4 0 0 0 0

Surviving mutants

Location Operator Disposition Cause
plugins/harness-config/lib/persist-report.sh:124 LCR productive no-assertion
plugins/harness-config/lib/persist-report.sh:144 SBR productive input-gap
plugins/harness-config/lib/persist-report.sh:155 SBR unclassified none
plugins/harness-config/lib/persist-report.sh:189 SBR productive no-assertion

The run's summary has the full report.

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.

1 participant