test: close affected-tests blind spots for seven unmapped scripts across five plugins - #3459
Conversation
…oss five plugins Seven executable scripts mapped to zero test suites under scripts/affected-tests.sh, the gap class behind the kindle-dedrm firewall defect (#3396). Each now has real sibling coverage, independently verified with adversarial review and mutation testing: - wizard 0.2.4: template.test.sh, 144 assertions over the wizard library - songwriting 1.4.15: datamuse.test.sh, 93 assertions, offline curl stub - prototype 0.9.6: three detect-ecosystems suites, 91 assertions - kindle-dedrm 0.7.9: sync-prep.test.sh, 73 assertions, print-only proof - instruction-placement 0.11.11: adherence-experiment.test.sh, 49 cases, plus fixes for a constant underscore-scoring criterion (published results column corrected) and an undocumented --filler flag Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XGLX1xYgy27JiRqLjoiH8T
|
Claude encountered an error after 29s —— View job Claude is working on this
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 76beda05b6
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
…nt-discovery-y2wg3r # Conflicts: # plugins/kindle-dedrm/CHANGELOG.md # plugins/prototype/.claude-plugin/plugin.json # plugins/prototype/CHANGELOG.md # plugins/songwriting/.claude-plugin/plugin.json # plugins/songwriting/CHANGELOG.md # plugins/wizard/CHANGELOG.md
|
Claude finished @kyle-sexton's task in 1m 30s —— View job Claude is working on this
Security reviewNo security issues found. Skip gate applies: this change has no security-relevant surface. What changed (verified via Specifically checked:
No secrets, injection surfaces, authz logic, or GitHub Actions permissions/triggers are touched by this diff. (Note: the two Codex review comments on this PR concern eval-scoring precision, not security — out of scope for this lane; |
|
Last security-reviewed head: |
|
Claude finished @kyle-sexton's task in 7m 43s —— View job Claude finished the code review
Note: the SummaryReviewed the full diff ( On the two open Codex review commentsCodex's two P2 comments (unanchored
Both appear to be exactly the two defects the PR body says were fixed ("the underscore scoring criterion was a constant... scoring now scans only the Scope covered
|
|
Claude has reviewed this PR 1 time. The lane skips further automatic reviews after 5; deleting this comment resets the count. |
… it found in the rubric (#3472) Rubric v3 shipped in #3471 with an obligation attached: its own rule blocks every precision figure, and with it every class's fix eligibility, until the golden set is re-scored against v3. That re-score is done here. - The re-score reproduces the recorded table exactly: 8 tp / 0 fp / 0 fn / 2 tn, thirty judges in independent processes, three per case, cases relabelled so no path reached a judge. Every panel unanimous, no verdict moved. No class becomes fix-eligible, because every class sits below min_n_per_class 10 -- the class-size block stands after the rubric-version one is lifted. - The rubric carried its own answer key. Its version-history paragraph recorded the expected tally, the panel size, and which case turns on which criterion, and the pipeline inlines the whole rubric into every judge prompt. All thirty judges read the prediction before grading, and the run withdrew its claim of a blind panel. The prediction now lives in the changelog; the rubric says a judge should be able to read all of it and still not know the answer. - A vendored-snapshot basis gains a tier rule: caps at source-fetched-similar, records source.route with each failed live fetch, never fix-eligible, because fix eligibility rests on current upstream state and a snapshot cannot establish it. - The not-found searched-surfaces listing is recorded as prose-only and unenforced, because emit-findings.sh carries no field for it. - The modal "may" is no longer read as a month name. Three sites, including the classifier a single-site fix would miss. Three reviewers then found that the "may" fix had traded over-reporting for under-reporting: a digitless "Verified this May" vanished upstream of the declined bucket, from both audit paths. Fixed by reading the capital M from the original line, which both scripts had been discarding via tolower(). The suites could not have caught it -- they asserted the two scripts agree, which passes when both are equally wrong -- so the new cases pin non-zero expected counts on each side. Every substantive change was checked by an independent fresh-context verifier. Two returned FAIL and were acted on. One, nested two tiers down and never briefed by this session, noticed the branch was 9 commits ahead rather than 1 -- which was hiding that the branch had never been reset after #3471 merged and would have deleted seven test suites added by #3459. Limits recorded rather than left to be discovered: the re-score panel was not blind, for the reason above; a second answer-key leak sits in a fixture and is deliberately unfixed because that line is inside the text the fingerprint compares, so the fix and a re-score are one atomic change; and a latent under-report from may_form()'s branch order is documented at the rule rather than chased, since the obvious one-line reorder only mirrors it.

No linked issue
Summary
A repo-wide
/improvement:findscan surfaced seven executable scripts across five plugins that mapped to zero test suites underscripts/affected-tests.sh. The repo contract (AGENTS.md) treats a zero-suite mapping as an error, and this is the same gap class that let the kindle-dedrm firewall truthiness defect (#3396) ship undetected: scripts whose only "coverage" was accidental substring selection of unrelated suites. Writing the tests also forced out two latent defects in the instruction-placement eval harness, fixed here.Fix
One sibling test suite per unmapped script, plus the two defect fixes:
template.test.sh(144 assertions) covering the wizard library's fail-closed prompt gates,_drain_ttypaste bypass,write_envquoting/atomicity/permissions,open_urlhttps-only dispatch, gh secret/variable helpers (secret never on argv), stage framing, and the EXIT trap.datamuse.test.sh(93 assertions), fully offline via a curl PATH-shim stub that fails hard if it does not shadow real curl. Covers the mode-to-relation table, TSV contract, family merge/dedupe/re-sort, LIMIT handling, and transport failures.detect-ecosystems.shand both skill wrappers (91 assertions): marker detection, glob-order pinning, near-miss plus non-marker manifests (so widening the marker list fails), symlink/anchoring/CLAUDE_PROJECT_DIRsemantics, and wrapper delegation contracts. The scripts themselves are unchanged.sync-prep.test.sh(73 assertions) proving the script is print-only: PATH shims shadowrm/pwsh/netshwith recording no-ops; "printed the command, ran nothing, deleted nothing" is asserted over a call log plus tree snapshot; the dry-run/live guard is tested in both directions (the firewall-bug class); the printed firewall rule name is checked againstfirewall.ps1's actual$RuleName.adherence-experiment.test.sh(49 cases via a stub CLI) plus two fixes the tests forced out: the underscore scoring criterion was a constant (it grepped the whole edited file, which always contains the seeded_unitPrice, so the published underscore/both columns measured nothing; scoring now scans only theInvoiceTotalbody with an under-crediting fallback), and the--fillerflag was undocumented.adherence-results.mdcarries a correction note; the experiment's conclusion is unchanged (it rests on the correctly-scoredsealedcolumn).Verification
scripts/affected-tests.sh --explain(each wasUNMAPPED, exit 1, before), and--runover the full diff passes (7 suites).shfmt -d, andscripts/check-shell-portability.shclean on all new suites; changelog parity (--check,--check-bump,--check-preserved) green; fixture-git-isolation, silent-skips, discriminating-skips, orphaned-fixtures, and purged-em-dashes gates green.uniquefromunique_by(.word)) and several LOW precision gaps, were closed with mutation-kill confirmation.Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01XGLX1xYgy27JiRqLjoiH8T
Generated by Claude Code