Skip to content

fix(testing): cut ecosystem-specific examples from diagnose and plan - #17753

Merged
kyle-sexton merged 1 commit into
mainfrom
work-resolve-issue/issue-17741-44850308534-1
Nov 21, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
work-resolve-issue/issue-17741-44850308534-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #17741

Summary

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

Part 2 of 5 of #16755. Cuts the model-read .NET, xUnit, pytest, vitest, Go and Blazor specifics from testing:diagnose and testing:plan per ADR 0101. A row cell or template slot that would have been left empty gets neutral wording; everything else is deleted outright.

Row count: 5 (all R11; no R4 or R8 rows in this part, so nothing is pending a measured case).

  • F0436 (R11, K4): CUT. The .NET framework-traps gotcha bullet (MTP options, exit codes, global.json) was deleted from diagnose/SKILL.md. Its generic remainder is already in the skill: parallel races at investigate.md's table and "Process-global static state" section, and the consuming project's framework-trap notes in Purpose.
  • F0437 (R11, K4): CUT, with neutral wording in table cells. In investigate.md's classification table: the WebApplicationFactory cause now reads "Several fixture instances initializing the same singleton"; the --nologo/MTP parenthetical and the exit-code sentence and links are gone from the "Unknown option" row; the sync-over-async .Result/.Wait() check now reads "Check for a blocking wait on async work".
  • F0438 (R11, K5): CUT at a routing site. The xUnit --filter, pytest -k and vitest --testNamePattern examples, the pytest-randomly --randomly-seed and go test -shuffle examples, and their links are gone. The step keeps its generic routing ("with the framework's filter syntax", "Read the flag from the runner's own docs").
  • F0439 (R11, K7): CUT. The "illustrative (.NET)" dotnet test fence and its lead-in were deleted from loop.md Step 5. The step still routes to /toolchain:check, or the project's own test command.
  • F0440 (R11, K7): CUT, with neutral template placeholders. In plan/SKILL.md: the WebApplicationFactory, Testcontainers / Docker Compose, EF and Blazor parentheticals are gone from the file-type table; the ".NET/xUnit" placeholder note is gone; {Method}_Should{Behavior}_When{Condition} and {Subject}_{Behavior} became {test name}, and {Rule}_Should{Constraint} became {rule the structure must keep}. This is a routing site: the names still follow the project's pattern or the ecosystem idiom.
    GONE rows: none. All five cited texts were still on main and found by text (line numbers had shifted by about two since 5b66a7f).

Script readers: none. Searches run:

  • Grep testing/skills/(diagnose|plan)|skills/diagnose/context/(investigate|loop) over the repo (excluding .lane). Hits: docs/skill-cheat-sheet.md (links), docs/architecture/landscape.json (a generated citation-edge count), docs/upstream/addyosmani-agent-skills.md (prose), the plugins/testing/evals/dg-* tool-call matchers and samples, and plugins/testing/probes/{diagnose,plan}.json (trigger probes keyed on skill_dir; they read the description, which is unchanged).
  • Grep diagnose/(SKILL|context)|plan/SKILL|context/(investigate|loop)\.md over *.{py,mjs,js,sh,ts,cjs}. Hits only in the planning plugin's own plan and interview skills, not these files.
  • Grep…

Not verified

  • Per-skill before-and-after eval (sonnet, 3 runs a side) and the eval-hold record: left to the host session after the PR opens, per the issue.
  • CI-only checks (portability-lint, comment-lint, lychee, evals-quality, eval-cases and the other whole-repo scanners) did not run here; the PR's CI runs them.
  • check-affected skipped typos (not installed), comment-hygiene (its action fetch was denied by the sandbox network) and size-check (script absent in the lane). The PR's CI covers these.
  • ai-slop's deterministic detector (detect.sh) could not run in the tidy pass, because the lane's Bash allows only the named wrappers. The rubric read was done by hand and found nothing to fix.
  • tidy: ran every pass and made no edits. Passes 1-3 had nothing to do (the change is all markdown); passes 4-5 found nothing to fix in the listed lines.
  • build and tests: no test suite covers these markdown-only skill files locally; the PR's CI runs the suites.
  • docs/architecture/landscape.json still counts investigate.md among the files citing pytest-dev/pytest-randomly. It is generated by /architecture:map-landscape and is outside this part's area, so it is left for its next regeneration.
  • Not in this part's table, so left as they are: other .NET-flavoured text in investigate.md (NullReferenceException and DI container, FileNotFoundException for assembly, Thread.Sleep) and loop.md's Should_ReturnError_When_InputIsNull naming example.

Fix

  • plugins/testing/skills/diagnose/SKILL.md: deleted the .NET framework-traps gotcha bullet (F0436).
  • plugins/testing/skills/diagnose/context/investigate.md: removed WebApplicationFactory, MTP --nologo and exit-code links, and .Result/.Wait() from the classification table (F0437); removed xUnit, pytest and vitest filter examples and the pytest-randomly and go test -shuffle seed examples with their…
  • plugins/testing/skills/diagnose/context/loop.md: removed the illustrative dotnet test block from Step 5 (F0439).
  • plugins/testing/skills/plan/SKILL.md: removed WebApplicationFactory, Testcontainers/Docker Compose, EF and Blazor from the file-type table and the .NET/xUnit name placeholders from the plan template (F0440).
  • .changes/testing/work-resolve-issue-issue-17741-44850308534-1-d26c7d02.md: new patch changelog fragment for the testing plugin.

Verification

The runner ran each check from the base copy against 783c6d2:

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

The run reports:

  • check-changelog-fragments: all 3 fragments valid (run before and after tidy and after the review fix).
  • check-changed-skills: diagnose PASS (0 errors, 1 warning: description length 504 > 419, pre-existing); plan PASS (0 errors, 2 warnings: no Gotchas surface and a precompute heuristic, both pre-existing).
  • check-affected: 14 passed, 9 skipped over 5 changed files. Skips: typos not installed; comment-hygiene could not fetch its action (network denied); size-check script missing in the lane; validate-plugins sub-checks and changed-skills skipped by the check itself because they run code from the…
  • Script-reader searches (Grep over the repo, over scripts and test sources, and over .performance): no script reads the cut text.
  • Eval-case search over plugins/testing/evals for the cut tokens (Should, PascalCase, xUnit, Blazor, WebApplicationFactory, Testcontainers): no diagnose or plan grader quotes them.
  • Fresh-context review subagent over the whole diff: no HIGH or MEDIUM findings. One LOW changelog-wording finding was fixed; the other LOW notes were checked and left as they were (see not_done).
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/44850308534

Left out: the items under Not verified.

Related

#17741

Lane-Activity: work-resolve-issue/resolve-issue
@melodic-automation-lanes melodic-automation-lanes Bot added the do-not-merge Hard merge gate: do not merge while applied. label Nov 21, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Held for the before-and-after eval that cut item #17741 needs. The pr-merge release step lifts this hold when an eval-pair record exists for the current head.

@github-actions

Copy link
Copy Markdown
Contributor

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

Security review: PR #17753, head 783c6d2

No security issues found. This is the first review of this pull request (blocking only: no). I read every hunk of all 5 changed files.

What the change does

All 5 files are markdown in the testing plugin: the diagnose skill (SKILL.md, context/investigate.md, context/loop.md), the plan skill (SKILL.md), and one new changelog fragment. The change removes examples tied to particular ecosystems (.NET, xUnit, pytest, vitest, Go, Blazor, WebApplicationFactory, Testcontainers) and puts neutral wording in their place. No code, workflow, plugin manifest or userConfig key changes, and no file matches a trusted-path glob.

Deleted instructions

The diff deletes or narrows instructions a skill gives the model, so I checked it against the deleted-instruction lens instead of skipping it as prose-only. I read docs/contracts/instruction-exception-register/README.md. It names six protected classes: irreversible-action, secret-handling, data-integrity, external-publication, legal-compliance and agent-authority. None of the removed text falls in any of them:

  • The .NET "framework traps" bullet in diagnose/SKILL.md: advice on how to read test-runner exit codes. It is a correctness tip and guards no action.
  • The classification-table cells and the filter and seed flag examples in investigate.md: debugging hints only. The "read the flag from the runner's own docs" instruction stays.
  • The example dotnet test block in loop.md: the step still points to /toolchain:check for the real command.
  • The table entries and test-name placeholders in plan/SKILL.md: formatting examples.

No safety check, permission rule or confirmation step was removed or weakened. The remaining text still routes to the same commands, and no new command, path or URL reaches a tool input.

Text from the pull request

The PR context holds no text telling the review lane to pass the PR, skip a check, drop a finding or post somewhere else.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

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

Code review: no findings

This pull request changes Markdown only. It removes the ecosystem-specific examples from testing:diagnose (SKILL.md, context/investigate.md, context/loop.md) and from testing:plan (SKILL.md), and adds a patch changelog fragment. I read every hunk of all 5 changed files.

Closing issue #17741, checked row by row against the diff:

  • F0436: the .NET framework-traps gotcha bullet is deleted. Its generic parts are still in the skill: "framework traps" in Purpose (SKILL.md#L32), and the parallel-execution and singleton rows in investigate.md.
  • F0437: the table cells now use neutral wording. Each cell would have been empty after the cut, so neutral wording is allowed there.
  • F0438: the filter and seed flag examples are cut. The generic routing sentences stay, which R11 allows at a routing site.
  • F0439: the illustrative dotnet test fence is deleted. Step 5 still routes to /toolchain:check.
  • F0440: the table parentheticals and the .NET/xUnit name placeholders are replaced with neutral slots.

Nothing else in plugins/testing/skills/{diagnose,plan} depended on the removed text. I grepped for the cut tokens and the only hits were in other skills (run-e2e, audit, write), which the issue puts out of scope. The issue's remaining "Done when" items concern the PR body (row count, script-reader searches, eval-case statement) and the body states them. The body in the context file is cut off partway through, so I could not read whether it says, for each changed file, that the cut deletes part of the page and not the whole page. I am counting that item as unconfirmed, not failed.

Rules applied: .claude/rules/cost-claims.md and .claude/rules/skill-bodies-state-current-rules.md cover these files. The change adds no cost claim and no history narration, so neither rule is broken.

Loosened checks: the prompt has no loosened_check_* lines, so I used verdict fail with no consumer entries, and the decision-record citation requirement was not checked. No changed line weakens a check. Loosened checks would be marked: fail (default); patterns: 0.

Not run: the PR body says the author ran check-changelog-fragments and check-changed-skills. I did not run those or any other command, so I cannot confirm their results.

Verifier dropped 0 of 0 candidates.

@kyle-sexton

Copy link
Copy Markdown
Member

Targeted eval result: PASS

One targeted case per changed skill, run on the old text (before) and the new text (after), on sonnet at 3 runs a side, Claude Code 2.1.330 (Claude Code).

What this gate checks: that the new text does no worse than the old on these cases. By the owner's decision of 2026-11-17 the gate is this no-loss compare alone. There is no wrong-text side, so this case set has not been shown to detect wrong text: a PASS says the cases did not get worse, not that they would have noticed a bad edit.

Scope: pure cut (five R11 rows, no R8 row): tool examples, flags, links and an illustrative dotnet test block are removed; every rule beside them stays. Measured by p17753-dg-symptom-triage: F0437 (investigate table: WebApplicationFactory, --nologo/MTP, .Result/.Wait() examples cut; singleton-fixture, strip-option, hang-deadlock), F0438 (filter and seed flag examples cut; alone-shared-state, replay-seed), F0439 (loop.md dotnet test block cut; full-suite), F0436 (SKILL.md .NET gotcha, loaded; no grader on a Python service). Measured by p17753-pl-diff-test-types: F0440 (plan SKILL.md, loaded: WebApplicationFactory, Testcontainers/Docker Compose and Blazor examples and the .NET/xUnit name placeholders cut; middleware-integration, db-real-infra, ui-e2e, parser-property, entity-unit, name-project-idiom). Unmeasured by a grader: F0436.

  • New case p17753-dg-symptom-triage: the dg-* cases scaffold a failing suite and fix it (llm graders), and none reaches the symptom table's cut examples with a deterministic grader, so a rules-only case was written: six symptoms in a Python service, six regex graders, no Skill grader (slash prompt, R105).

  • New case p17753-pl-diff-test-types: the pl-* cases scaffold a branch and read git; a rules-only case was written instead: five changed TypeScript files classified by test type, six regex graders, no Skill grader (slash prompt, R105).

  • Loss-capable graders (an example beside their rule was cut): strip-option (--nologo example), hang-deadlock (.Result/.Wait()), singleton-fixture (WebApplicationFactory), replay-seed (pytest-randomly and go -shuffle examples), full-suite (dotnet test block), middleware-integration, db-real-infra (Testcontainers/Docker Compose), ui-e2e (Blazor), name-project-idiom (.NET/xUnit placeholders).

  • Unmeasured rows: F0436 (diagnose SKILL.md .NET gotcha; loaded, but no grader on a Python service reads it).

  • Control result (the issue's acceptance item): not run: the owner's decision of 2026-11-17 gates cut pull requests on the no-loss compare alone.

  • Before: 2a79a8517973efcadc5330fe2f9635d1ce11ab1c (merge base with main)

  • After: 783c6d2dfbedce6a2a3a44828e4b0da155d08f77 (pull request head; live head when this was written: 783c6d2dfbedce6a2a3a44828e4b0da155d08f77)

  • Loss: the mean case score falls by 0.15 or more, or any one grader passes in 2 or more fewer after runs than before runs.

Passing runs per grader, per side:

Case Grader Before After
p17753-dg-symptom-triage singleton-fixture 3/3 3/3
p17753-dg-symptom-triage strip-option 3/3 3/3
p17753-dg-symptom-triage hang-deadlock 3/3 3/3
p17753-dg-symptom-triage alone-shared-state 3/3 3/3
p17753-dg-symptom-triage replay-seed 3/3 3/3
p17753-dg-symptom-triage full-suite 3/3 3/3
p17753-dg-symptom-triage mean case score 1.000 1.000
p17753-pl-diff-test-types middleware-integration 3/3 3/3
p17753-pl-diff-test-types db-real-infra 3/3 3/3
p17753-pl-diff-test-types ui-e2e 3/3 3/3
p17753-pl-diff-test-types parser-property 3/3 3/3
p17753-pl-diff-test-types entity-unit 3/3 3/3
p17753-pl-diff-test-types name-project-idiom 3/3 3/3
p17753-pl-diff-test-types mean case score 1.000 1.000

Graders that cannot show a loss, because they failed on the old text in every run:

  • none: every grader passed in at least one run on the old text

Changed files the compare runs opened, per case and side:

  • p17753-dg-symptom-triage before: opened skills/diagnose/context/investigate.md in 3 of 3 runs; opened skills/diagnose/context/loop.md in 3 of 3 runs
  • p17753-dg-symptom-triage after: opened skills/diagnose/context/investigate.md in 3 of 3 runs; opened skills/diagnose/context/loop.md in 3 of 3 runs
  • p17753-pl-diff-test-types before: opened no changed file in 3 runs
  • p17753-pl-diff-test-types after: opened no changed file in 3 runs

Rows these runs measured (the row's file opened in at least 2 of 3 runs on each side, or loaded with the skill or agent):

  • F0436 (skills/diagnose/SKILL.md, case p17753-dg-symptom-triage): measured; the file is loaded with the skill or agent, never opened, so no open count applies
  • F0437 (skills/diagnose/context/investigate.md, case p17753-dg-symptom-triage): opened in 3 of 3 before, 3 of 3 after runs
  • F0438 (skills/diagnose/context/investigate.md, case p17753-dg-symptom-triage): opened in 3 of 3 before, 3 of 3 after runs
  • F0439 (skills/diagnose/context/loop.md, case p17753-dg-symptom-triage): opened in 3 of 3 before, 3 of 3 after runs
  • F0440 (skills/plan/SKILL.md, case p17753-pl-diff-test-types): measured; the file is loaded with the skill or agent, never opened, so no open count applies

Rows these runs did not measure:

  • none

Verdicts:

  • verdict p17753-dg-symptom-triage (diagnose): PASS (no loss: after 1.000, before 1.000)
  • verdict p17753-pl-diff-test-types (plan): PASS (no loss: after 1.000, before 1.000)

Cost: 1.23 USD (smoke and compare, the runs' costUsd).

The cases live outside the repository; their full text:

The 2 cases: prompt.md and case.yaml

p17753-dg-symptom-triage

prompt.md:

---
description: "Written for PR 17753 (rows F0436-F0439, R11 cuts in testing:diagnose and its investigate and loop pages). Asked, before running anything, how it would handle six test-failure symptoms in a Python service, the reply names the fixture cause of an already-initialized error, strips an unknown runner option, suspects a deadlock or blocking wait for a hang, reads pass-alone-fail-together as shared state, replays the printed seed first, and runs the affected project's full suite after the fix"
tags: [diagnose, routine]
max_turns: 20
timeout_seconds: 600
allowed_tools: [Skill, Read, Glob, Grep]
expected_outcome: "Nothing is run. The reply maps each symptom to the investigate table's cause and next step, replays the printed seed before anything else, and plans the full suite for the affected project after the fix. It ends with the six fixed lines."
---

/testing:diagnose

Before you run anything, tell me how you'd approach each of these failures in our `billing/` Python service (pytest, an async HTTP client, a session-scoped app fixture):

1. Several tests fail with "app already initialized" since someone added a second app fixture in another conftest.
2. CI's test step exits with "unknown option: --nologo" before any test runs.
3. One test hangs until the CI timeout.
4. `test_refund_partial` passes when run alone but fails in the full run.
5. The runner shuffles test order and the failure printed `Using --randomly-seed=81723`; what is your first step?
6. Once you've fixed the cause, what do you run before calling it done?

Check your answers against the diagnose skill's investigate and loop pages. Don't run, install or research anything online yet.

End with exactly these six lines:

SINGLETON_CAUSE: <the likely cause of symptom 1>
UNKNOWN_OPTION_FIX: <what you do about symptom 2>
HUNG_CAUSE: <the likely cause of symptom 3>
ALONE_PASSES_MEANS: <what symptom 4 points to>
SHUFFLE_FIRST_STEP: <your first step for symptom 5>
AFTER_FIX: <what you run before calling it done>

case.yaml:

schema_version: "1.1"
name: p17753-dg-symptom-triage
plugins: ["../.."]
graders:
  - name: 'singleton-fixture'
    type: 'regex'
    pattern: '^[\W_]*SINGLETON_CAUSE[*_]*:[^\n]*(?:fixture|instance)'
    flags: 'im'
    target: 'last_message'
  - name: 'strip-option'
    type: 'regex'
    pattern: '^[\W_]*UNKNOWN_OPTION_FIX[*_]*:[^\n]*(?:strip|remove|drop|delete)'
    flags: 'im'
    target: 'last_message'
  - name: 'hang-deadlock'
    type: 'regex'
    pattern: '^[\W_]*HUNG_CAUSE[*_]*:[^\n]*(?:deadlock|block|cancel)'
    flags: 'im'
    target: 'last_message'
  - name: 'alone-shared-state'
    type: 'regex'
    pattern: '^[\W_]*ALONE_PASSES_MEANS[*_]*:[^\n]*shared'
    flags: 'im'
    target: 'last_message'
  - name: 'replay-seed'
    type: 'regex'
    pattern: '^[\W_]*SHUFFLE_FIRST_STEP[*_]*:[^\n]*(?:seed|81723)'
    flags: 'im'
    target: 'last_message'
  - name: 'full-suite'
    type: 'regex'
    pattern: '^[\W_]*AFTER_FIX[*_]*:[^\n]*(?:\bfull\b|\bwhole\b|\bentire\b|\ball\b)'
    flags: 'im'
    target: 'last_message'

p17753-pl-diff-test-types

prompt.md:

---
description: "Written for PR 17753 (row F0440, R11 cut of the WebApplicationFactory, Testcontainers/Docker Compose and Blazor examples and the .NET/xUnit name placeholders in testing:plan). Asked to classify five changed files of a TypeScript service by required test type without running anything, the reply picks integration tests for middleware and a database client (against real infrastructure), E2E for a React component, property tests for a parser, and names tests in the project's own idiom"
tags: [plan, routine]
max_turns: 20
timeout_seconds: 600
allowed_tools: [Skill, Read, Glob, Grep]
expected_outcome: "Nothing is run. The reply classifies the middleware as integration through the HTTP-test harness, the database client as integration against real infrastructure, the React component as E2E through browser automation, the parser as property tests beside examples, and names a test in the project's existing describe/it idiom. It ends with the six fixed lines."
---

/testing:plan

Before you look at git, classify these changed files on our branch by the test type each needs; just plan, don't run anything. It's a TypeScript service: vitest, existing tests read like `it("rejects an expired token")`, and our local stack has a docker-compose file with Postgres.

- `src/middleware/rate-limit.ts` (Express middleware)
- `src/db/orders-repo.ts` (Postgres client queries)
- `web/components/CartSummary.tsx` (React component)
- `src/parse/csv-import.ts` (CSV parser)
- `src/domain/order.ts` (order entity with state transitions)

Don't install or research anything online.

End with exactly these six lines:

MIDDLEWARE: <test type>
DB_CLIENT: <test type and what it runs against>
UI_COMPONENT: <test type>
PARSER: <test type>
ENTITY: <test type>
SAMPLE_NAME: <one test name for the order entity>

case.yaml:

schema_version: "1.1"
name: p17753-pl-diff-test-types
plugins: ["../.."]
graders:
  - name: 'middleware-integration'
    type: 'regex'
    pattern: '^[\W_]*MIDDLEWARE[*_]*:[^\n]*integration'
    flags: 'im'
    target: 'last_message'
  - name: 'db-real-infra'
    type: 'regex'
    pattern: '^[\W_]*DB_CLIENT[*_]*:(?=[^\n]*integration)(?=[^\n]*(?:real|postgres|docker|container))'
    flags: 'im'
    target: 'last_message'
  - name: 'ui-e2e'
    type: 'regex'
    pattern: '^[\W_]*UI_COMPONENT[*_]*:[^\n]*(?:\bE2E\b|end[- ]to[- ]end)'
    flags: 'im'
    target: 'last_message'
  - name: 'parser-property'
    type: 'regex'
    pattern: '^[\W_]*PARSER[*_]*:[^\n]*propert'
    flags: 'im'
    target: 'last_message'
  - name: 'entity-unit'
    type: 'regex'
    pattern: '^[\W_]*ENTITY[*_]*:[^\n]*\bunit\b'
    flags: 'im'
    target: 'last_message'
  - name: 'name-project-idiom'
    type: 'regex'
    pattern: '^[\W_]*SAMPLE_NAME[*_]*:[\s*`]*(?:(?:it|test)\(\s*["''`])?[a-z]+ [a-z]+'
    flags: 'm'
    target: 'last_message'

Posted by an agent session.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The do-not-merge hold waited only on eval evidence (reason=eval), and a listed human posted a VALID no-loss eval-pair record for 783c6d2dfbedce6a2a3a44828e4b0da155d08f77: #17753 (comment). pr-merge removed do-not-merge. To hold again, add the label back with a new pr-hold reason line.

@melodic-automation-lanes melodic-automation-lanes Bot removed the do-not-merge Hard merge gate: do not merge while applied. label Nov 21, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit fdaf917 Nov 21, 2026
106 of 110 checks passed
@kyle-sexton
kyle-sexton deleted the work-resolve-issue/issue-17741-44850308534-1 branch November 21, 2026 07:17
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.

Cut the model-read ecosystem specifics from testing: diagnose and plan

1 participant