Skip to content

feat(testing): plan fuzz targets and consumer-driven contract tests in testing:plan - #15678

Merged
melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-15676-43298690306-1
Nov 12, 2026
Merged

melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-15676-43298690306-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #15676

Summary

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

/testing:plan's classification table gets two rows: a fuzz target for a parser, decoder or handler whose input is untrusted, and a consumer-driven contract test for a client of a service whose provider runs the verification, or an endpoint another service consumes. A public third-party API is routed to testing:test-value's canned-response guidance instead, since that skill already records that such contract tests need the provider to run them. The plan template gains matching Fuzz targets and Contract tests sections. A sentence after the table leaves out each section whose row no changed code matches, including under "Not testing". Each row names the capability only, with no tool, library or language.

Dogfood: I applied the new rows by reading three changes in this repository. (1) plugins/guardrails/hooks/block-cd-prefix.sh reads a PreToolUse hook payload from stdin (hook::buffer_stdin_to, then jq over .tool_input.command). That is untrusted input, so the fuzz row fires: the entry point is the hook script, the seed corpus is valid Bash tool payloads, and the asserted outcome is no hang and no outcome other than allow or the documented block. (2) plugins/work-items/tools/work-item-tracker/adapters/github/common.sh and its siblings call gh api, making them a client of GitHub's public API, whose provider runs no consumer contracts. So the contract row does not fire, and the plan routes the adapter's canned responses to testing:test-value instead. Applying the first wording of the row surfaced this case, and the row was narrowed because of it. (3) This change itself touches only a SKILL.md and a changelog fragment, so neither row fires and neither section appears in its plan.

Not verified

  • Dogfood was a reading of the plan rows against three existing changes, not a /testing:plan run driven through /app-control:drive; this lane cannot launch Claude Code
  • tidy ai-slop pass: detect.sh, digest-guard.sh and read-verification.sh are not among the commands this lane may run, so the deterministic detector, concurrent-edit guard and level read were skipped; the rubric was applied by reading. Proposal left: the two new template lines use the ' — ' separator…
  • typos, markdownlint and the CI-only scanners (purged-em-dashes, lychee, test-plan-corpus and others) were not run here; left to the PR's CI
  • /testing:plan's Output section still names a handoff only for unit, integration and E2E gaps; no skill writes fuzz or contract tests yet (the gap #15667 found), so no handoff was added

Fix

  • plugins/testing/skills/plan/SKILL.md: two table rows (fuzz target, consumer-driven contract test), a scoping sentence after the table, and two plan-template sections
  • .changes/testing/work-resolve-issue-issue-15676-43298690306-1-8b60f55d.md: minor changelog fragment for the testing plugin

Verification

The runner ran each check from the base copy against 40ad774:

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

The run reports:

  • check-changelog-fragments: all 20 fragments valid
  • check-changed-skills: plugins/testing/skills/plan PASS, 0 errors, 3 warnings (no Gotchas surface and the precompute heuristic, both already present; body grew 133 to 144 lines, under the 500 cap)
  • check-affected: 12 passed, 7 skipped (no shell or Python changed, typos not installed, tree-code checks reported by the check), rest CI only
  • fresh-context review subagent over the diff: 4 findings (public third-party API conflict with testing:test-value SKILL.md:76-77; 'no crash' vs documented rejection; parser scope ambiguity; 'leave both out' ambiguity), all confirmed and fixed
  • dogfood by reading plugins/guardrails/hooks/block-cd-prefix.sh:49-57 and the work-items GitHub adapter's gh api calls: fuzz row fires for the hook, contract row routes the GitHub API client to test-value
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/43298690306

Left out: the items under Not verified.

Related

#15676

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

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: PR #15678 (incremental, 40ad774 → 85385f9)

No security issues found. This was a blocking-only review: the lane already reviewed an earlier head, so it reports only CRITICAL and IMPORTANT findings.

I read every hunk of all 11 files listed in .claude-lane/incremental-files.txt. Every one is eval test data under plugins/testing/evals/:

  • pl-branch-test-plan
    • Three new regex graders and one LLM grader.
    • Pass and fail samples for each new grader.
    • An expanded prompt.md: the description, expected_outcome and the staged file list. Its allowed_tools, max_turns and timeout_seconds are unchanged.
    • scaffold.sh additions.
  • pl-clean-tree-no-gaps
    • One new not_contains regex grader in case.yaml.
    • Its sample file.

What I checked:

  • Trusted paths and trust controls. None of the changed files matches a TRUSTED PATHS: glob. The change touches no trust control, merge hold, token scope, kill switch, workflow or plugin manifest.
  • scaffold.sh execution surface. The new hunks only add three quoted heredocs (<<'PY'), which write fixture files src/hook_payload.py, src/billing_client.py and src/weather_client.py, plus a new commit message. The quoted delimiters mean the shell expands nothing. The script never runs the fixtures; the eval only asks the model to plan tests for them. The URLs in the fixtures (http://billing-service.internal, https://api.weather.example/v1) are inert defaults in the staged text, and the scaffold contacts neither. The script still runs under set -euo pipefail, uses the same throwaway [email protected] identity, and keeps its .git/info/exclude line.
  • Eval tool grants. allowed_tools stays [Read, Glob, Grep, Skill, Bash] and the turn and timeout limits are unchanged, so the eval's session gets no new permissions.
  • Graders. The regex and LLM grader definitions only score the model's last message. They run no command and send nothing off the machine.
  • Instruction-surface lens. No standing instruction is deleted, narrowed or softened. I did not consult the protected-class register because nothing was removed.
  • PR context. The description contains no embedded instructions aimed at the review lane.

Spend: the expanded eval adds a little prepaid model usage per eval run (one extra LLM grader call and a longer plan reply). This is not a billing change.

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 40ad774c1c314ca320bda7553bc61aeb58a43e16; the summary is in this lane's pull request comment.

claude-lane: claude-review

Comment thread plugins/testing/skills/plan/SKILL.md Resolved
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review: PR #15678, incremental (40ad774 → 85385f9)

No blocking findings. This lane already reviewed an earlier head, so this pass reported blocking findings only. I read every hunk of all 11 files in .claude-lane/incremental.diff.

What changed. The push adds evals for issue #15676's acceptance criteria. This lane's earlier finding (discussion_r4555954151, now resolved) said no eval covered them.

  • pl-branch-test-plan
    • The scaffold now adds three files:
      • src/hook_payload.py, which reads untrusted stdin;
      • src/billing_client.py, a client of a service whose provider verifies its consumers' contracts;
      • src/weather_client.py, a client of a public third-party API.
    • The prompt's diff stat and expected_outcome list all three.
    • Three new regex graders:
      • fuzz-the-hook-parser
      • contract-test-for-billing
      • weather-to-test-value
    • One new llm grader, fuzz-and-contract-rows. It also requires that WeatherClient gets no contract test.
  • pl-clean-tree-no-gaps gets a not_contains grader, no-fuzz-or-contract-section. It covers the leave-out rule at plugins/testing/skills/plan/SKILL.md:70-71, including the "do not list it under Not testing" part.

Checks I made by reading (I did not run anything):

  • Sample traces. I worked each regex grader's pass and fail samples against its pattern by hand. Every pass sample matches and every fail sample misses. That includes the hard cases: a ### Fuzz targets / ### Contract tests heading whose only bullet is - none, with the function listed under a later heading. The heading branch's line loop cannot step past a later # heading, so those correctly fail.
  • Format. The graders follow the existing property-tests-for-parser.md pattern shape and the meets-legacy-plan-1.md llm-grader frontmatter. match: not_contains is already used in other evals' case.yaml files.
  • Fit with the skill. The llm grader's acceptance of "WeatherClient gets no contract test because its provider runs no verification" agrees with the contract row at SKILL.md:68. The not_contains grader agrees with the leave-out sentence at SKILL.md:70-71.

Not verified. No eval runs and no CI sample validation. The address-feedback reply says CI's eval-suite validator will check the samples; I have not confirmed that. My sample results above come from tracing the patterns by hand.

Closing issue #15676. Each criterion the earlier finding called untested now has a grader that fails if it breaks:

  • fuzz row: fuzz-the-hook-parser plus the llm grader;
  • contract row and the third-party exclusion: contract-test-for-billing, weather-to-test-value and the llm grader;
  • leave-out rule: no-fuzz-or-contract-section.

Embedded text. None of the context files contained instructions aimed at this lane.

Spend. Prepaid eval usage only, no billed resource: each pl-branch-test-plan eval run now reads three more scaffold files and runs one more llm grader.

Lane-Activity: pr-unblock/address-feedback
Lane-Thread: PRRT_kwDOTCGFQM620O-_
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 1 of max 4 on 85385f9.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 85385f9

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-15678-85385f9b56a176e68edc79fbad1aa27a222d7999, expires on 2026-12-12.

One comment per pull request, updated in place for each new head.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=MEDIUM demote=false head=85385f9b56a176e68edc79fbad1aa27a222d7999 rubric=8.4.13 rater=claude-opus-5-5 checker=claude-opus-5-5

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit ca08029 Nov 12, 2026
52 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-15676-43298690306-1 branch November 12, 2026 21:09
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit ca0802997f535b237d18ec3ecd0dbdd9d2305cb4; 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.

Add a fuzz-target row and a consumer-driven contract-test row to the testing plan

0 participants