agentleFS
narenaryannarenaryan/agent-skills/skills/engineering/patch-reproducer-validity/SKILL.md

patch-reproducer-validity

Skill0 starsChanged 39 days agoMITView on GitHub

Use when a bug fix passes its reproducer, a patch may break working behavior, or a review must distinguish introduced regressions from incomplete fixes, pre-existing defects, and incomparable runs.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run the original isolated cases: python3 skills/engineering/patch-reproducer-validity/reproduce.py.

    line 35

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Validate Patch Reproducers

Fix efficacy and regression freedom are separate claims. A test that changes from red to green can prove a particular repair while another supported behavior changes from green to red.

Paired evidence

Interpret each case against an independent contract, not merely differences in output. Hold fixture, assertion, entrypoint, and unrelated configuration/dependencies constant; record intentional dependency/configuration changes as part of the patch.

BaselineCandidateBounded conclusion
Fails contractPassesThis case is repaired
PassesFails contractIntroduced-regression candidate; verify reachability and attribution
Fails contractFails contractCompare failure identity/impact: incomplete repair or pre-existing defect can coexist with a new or worsened failure
PassesPassesNo failure observed in this case, not proof of regression freedom
Either arm: setup failure, unstable results, or incomparable context—Inconclusive; preserve the claim and missing evidence

Recipe

  1. State the observable contract and trust boundary: input/state, expected result, and wrong result. Derive the oracle from a specification, invariant, or hand-checked example. Confirm supported configuration and a real caller path; private-helper misuse alone proves no user-visible regression. Attacker-controlled malformed input still matters when a security invariant promises safe rejection. Check whether an intentional contract change was actually approved.
  2. Run the unchanged reproducer on the pre-change revision and candidate. Capture revision IDs, invocation, raw output, fixture/environment fingerprints, and assertion reached. A build error is not a functional reproduction. Build compatibility itself can be the contract, but requires matched supported toolchains and the relevant build diagnostic.
  3. For the reported defect, require intended baseline failure and candidate success. If the historical revision cannot run, use a narrow reversion or mutant in a disposable copy and label it substitute evidence, not historical reproduction. Never ship the deliberate fault. A hang needs a bounded, contract-specific timeout assertion.
  4. Separately probe behaviors affected by the diff: boundary inputs, error handling, callers, and security protections. For a new-regression claim, show baseline success and candidate failure through the same meaningful interface. Where practical, revert the implicated change in isolation and replay; unrelated dependency or fixture changes otherwise confound attribution.
  5. Challenge the repaired condition with a narrow mutant; a survivor may expose a weak oracle, but equivalent or unobservable mutants are not automatically missing tests. For concurrent/timing failures, control schedule or clock where supported; a seed alone does not fix interleavings. Mixed outcomes remain inconclusive, not “retry until green.”
  6. Retain regression tests and run relevant surrounding tests; report repaired cases, introduced regressions, unresolved defects, and verification gaps separately. Keep pre-existing defects visible without blaming this patch. Evidence does not authorize rollout or close an RBVM finding; those require their own gates.

Worked example

Synthetic positional pagination promises [11, 12] for offset 10, limit 2, and [] for limit 0. A patch repairs [11] to [11, 12] but removes the zero-limit guard and returns [11]. The target fix passes while a distinct regression is proven. bool(result) misses the original defect.

Run the original isolated cases: python3 skills/engineering/patch-reproducer-validity/reproduce.py. Sources and limits distinguish local model evidence from project validation.

Pitfalls

  • Treating setup failure, a changed oracle, or weaker assertions as red/green proof.
  • Requiring production deployment for a library test, or claiming a mocked helper proves an end-to-end path.
  • Calling an unchanged defect newly introduced, or dismissing attacker-reachable failures as unsupported input.
  • Treating coverage, mutation score, or one repaired case as permission to ship.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.