From b59acadff1d79f5b9de867f255ef7dc34097b7d3 Mon Sep 17 00:00:00 2001 From: Daniel Petty Date: Tue, 22 Sep 2026 15:04:07 +0000 Subject: [PATCH] docs(roadmap): prompt benchmarking and synthetic corpora for evaluation Five items covering how prompts and the review loop get measured rather than argued about. Prompt benchmarking is the blocker for the rest. Every prompt edit in this project has shipped on an argument that no decision was lost, including the 32% compression in this release, where the evidence is a keyword coverage test rather than any observed change in output. The item states the hard part plainly: the feedback dataset's 1066 `VERIFIED` records were labelled by the same verifier under test, and two calibration sessions put the false positive rate among high-severity findings near 40% and 85%, so `VERIFIED` is a prior rather than a label. The 122 human-verified records are the only trustworthy seed. Generator-side rule pruning depends on that benchmark. The shared review prompt duplicates about a dozen invalidation rules the verifier already applies, but suppressing a false positive at generation time is cheaper than generating and then invalidating it, and nothing measures which way the trade falls. Doing it by argument is how the duplication arose. Synthetic defect corpora address the circularity directly: inject a known defect at a known line and recall becomes measured rather than inferred. The constraint is recorded with it -- an injection the generator knows how to make is one the prompt can be tuned to find, so it measures regression, not capability. Structured fuzzing comes from this release's own evidence. Nearly every boundary defect found by hand -- `relative_to` accepting `..`, `fnmatch` reading `[host]:port` as a character class, `lstrip("./")` stripping a character set, porcelain output shifted by a stripped space -- is what a property test generates in seconds. The properties have to come from the specifications, not from what the implementation happens to do. Prompt adversaries close the last gap: reviewed code is attacker-controlled whenever this tool is pointed at an arbitrary repository, and nothing tests whether embedded instructions can steer a review. --- docs/ROADMAP.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index 04059bf7ea..8afdb0a4e5 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -187,6 +187,26 @@ High-density product roadmap, engineering milestones, and open-source integratio - [ ] **Local-Path Provisioner Volume Reclaim Failures (P2 - Medium)**: - *Context & Rationale*: `VolumeFailedDelete` with `create process timeout after 120 seconds` leaves the helper pod `Terminating` indefinitely — three days, in the observed case — and the `PersistentVolume` is never reclaimed. Storage leaks silently and the only evidence is an event nobody is watching. - *Constraint*: Reclamation deletes data. Any automated remediation must confirm the volume is genuinely orphaned rather than merely slow to detach, so the first deliverable is detection and reporting, not deletion. +- [ ] **Model-in-the-Loop Prompt Benchmarking (P1 - High)**: + - *Context & Rationale*: `devops ai prompt-eval` now measures the deterministic suppression layer against recorded verdicts, which is honest but covers only the checks that run before a model is asked. Nothing measures a prompt. The two hot-path prompts were compressed by 32% in v0.2.22 on the argument that no decision was lost, and that argument rests on a keyword coverage test rather than on any observed change in output. Every prompt edit since this project began has shipped the same way. + - *Deliverable*: Replay a fixed corpus of reviewed segments through a candidate prompt and the current one, with a pinned model and temperature, and report the difference in findings produced, findings later invalidated, and tokens spent. A prompt change becomes a measured trade rather than an assertion. + - *Constraint*: The corpus has to carry ground truth that was not produced by the loop being measured. The feedback dataset's 1066 `VERIFIED` records were labelled by the same verifier under test, and two calibration sessions found roughly 40% and 85% of high-severity findings in those sessions to be false positives — so `VERIFIED` is not a label, it is a prior. The 122 human-verified records are the only trustworthy seed, and the corpus needs to grow from there. +- [ ] **Generator-Side Rule Pruning Measured Against Verifier Overlap (P2 - Medium)**: + - *Context & Rationale*: The shared review prompt carries roughly a dozen host-specific invalidation rules that the verifier prompt also applies to every finding. The duplication costs tokens on every persona and every segment. Removing them is not obviously right: suppressing a false positive at generation time is cheaper than generating it and invalidating it afterwards, and nothing currently measures which way the trade falls. + - *Deliverable*: With the benchmark above in place, remove each duplicated rule in turn and measure findings generated, findings invalidated, and total tokens across both stages. Keep the rules whose removal costs more in verification than it saves in generation. + - *Constraint*: Depends on the benchmark. Doing this by argument is how the duplication arose. +- [ ] **Synthetic Defect Corpora for Review Evaluation (P1 - High)**: + - *Context & Rationale*: Evaluating a reviewer needs code whose defects are known exactly. Real repositories do not supply that — a finding is only ever labelled by another judgement, which is the circularity the benchmark above runs into. Code can instead be generated with a defect deliberately injected at a known line, giving a recall figure that is measured rather than inferred. + - *Deliverable*: A generator that takes a clean source file and an injection template — drop a bounds check, widen a path join, remove an `await`, unpin a tag — and emits the mutated file with the injected line recorded. Recall is the share of injections reported at the right location; precision is what the reviewer reports beyond them. + - *Constraint*: An injection the generator knows how to make is an injection the prompt can be tuned to find, and tuning against a synthetic corpus produces a reviewer good at synthetic defects. It measures regression, not capability, and the distinction has to stay visible in how the numbers are reported. +- [ ] **Structured Fuzzing of Parsers and Schema Boundaries (P2 - Medium)**: + - *Context & Rationale*: The failures found by hand this release were nearly all boundary cases in parsing and path handling: `Path.relative_to` accepting `..`, `fnmatch` reading `[host]:port` as a character class, `lstrip("./")` stripping a character set, porcelain output shifted by one stripped space. Each was found by reading code. Each is the kind of input a property test generates in seconds. + - *Deliverable*: Property-based tests over the parsing surfaces — ignore rules, `known_hosts` entries, service URLs, SARIF documents, git porcelain output, review JSON — asserting the invariants those parsers claim rather than specific outputs. Generated corpora persist so a discovered failure becomes a regression case. + - *Constraint*: A property test that asserts what the implementation does rather than what the format requires passes forever and finds nothing. Each property has to come from the specification: gitignore(5), the `sshd` manual, SARIF 2.1.0. +- [ ] **Synthetic Prompt Adversaries for Injection Resistance (P2 - Medium)**: + - *Context & Rationale*: `sanitize_prompt_injection` strips delimiter tags, and reviewed code is attacker-controlled in the general case — this tool is pointed at arbitrary repositories. Nothing tests whether a source file containing crafted instructions can steer a review, and the sanitizer's coverage is asserted by its own unit tests against the patterns its author thought of. + - *Deliverable*: A corpus of source files carrying embedded instructions — in comments, docstrings, string literals, filenames — run through the review pipeline with an assertion that the findings describe the code rather than following the embedded text. + - *Constraint*: This measures resistance to the attacks in the corpus and says nothing about the ones not in it. The corpus is a regression suite, not a security proof, and reporting it as the latter would be worse than not having it. - [ ] **In-Flight Work, PR Stagnation & Blocker Radar (`devops gh pm inflight`) (P1 - High)**: - *Context & Rationale*: Continuous surveillance of active in-flight work across the repository to eliminate PR starvation, review stagnation, and merge conflict decay. - *FIFO PR Queue Surveillance*: Enforces strict chronological (oldest to newest / FIFO) PR processing and surfaces older open PRs that are being starved or blocked by newer work.