Seeded corpus

Code with known defects planted in it, and code with none. It tests whether the AI reviewer still catches what the standards say it should.

ℹ

For product engineers who want to see what each rule catches in real code, and for the platform team testing a reviewer or a standards change.

Why it exists

A reviewer can fail in two ways. It can stop catching bugs, which looks exactly like a quiet week. Or it can flag everything, which looks like diligence. Ordinary telemetry cannot tell either apart from a reviewer that works.

The seeded corpus can, because the right answers are known in advance. It measures two things:

  • Recall: of the defects planted, how many the reviewer flagged at the right severity or higher. 337 seeded defects across 20 stacks measure this. The pass condition is that every BLOCKER is caught.
  • False positives: comments on code that has nothing wrong with it. seeded/clean measures this. The pass condition is zero comments.

Nothing here is ever merged. A run opens a throwaway pull request on a pilot repository, scores the review, and closes it. You can do that by hand, and seed-canary.yml does it every week.

All corpora

CorpusDefectsBLOCKERWhat it plants
cleanNone—Correct code carrying no defects. Measures precision: the pass condition is zero comments, and a reviewer that flags anything here fails.
javascript97Seeded JavaScript defects — prototype pollution, dynamic code execution, floating promises.
react1710Seeded React defects — hook discipline, state mutation, render-cycle bugs.
react-native116Seeded React Native defects — list performance and the JS/UI thread boundary.
angular239Seeded Angular defects — a disabled sanitiser, dead subscriptions, an open redirect, work in a template binding.
vue217Seeded Vue defects — reactivity lost on destructure, v-html, module-scope state shared across SSR requests.
svelte3313Seeded Svelte and SvelteKit defects — {@html}, private env in shared code, secrets in a universal load.
dom208Seeded browser defects — innerHTML sinks, postMessage with no origin check, listeners that outlive the widget.
nodejs119Seeded NestJS defects — unvalidated DTOs, request state on singletons, a blocked event loop.
microservices95Seeded cross-cutting service defects — missing timeouts, non-idempotent consumers, PII in traces.
java1610Seeded Spring Boot defects — entities out of controllers, N+1 queries, self-invoked @Transactional.
go2012Seeded Go defects — ignored errors, leaked goroutines, missing context propagation.
python2011Seeded Python defects — mutable defaults, bare excepts, string-interpolated SQL.
csharp179Seeded .NET defects — async void, sync-over-async deadlocks, per-request HttpClient.
kotlin1710Seeded Kotlin defects — GlobalScope launches, swallowed CancellationException, leaked Context.
swift1610Seeded Swift defects — UI off the main actor, uncancelled Tasks, retain cycles, force unwraps.
terraform146Seeded Terraform defects — committed secrets, public exposure, a rename with no moved block.
typescript164Seeded TypeScript defects — widen-then-assert, unjustified double assertions, unknown leaking past the boundary.
effect94Seeded Effect defects — tag branching in a broad catch, hand-built tagged errors, a service imported around its Layer.
express1611Seeded Express defects — wildcard CORS with credentials, unbounded bodies, unhandled async rejections, path traversal.
nextjs2214Seeded Next.js defects — Server Actions with no auth, secrets in public env, per-user data in a cached render.

Adding a defect

Add the defective code to the stack's file under seeded/, with one marker comment above it naming the rule it breaks. The scorer reads the markers straight from the source, so there is no separate answer key to keep in step:

marker format
SEED <n> [BLOCKER|HIGH|SUGGESTION] (<stack>/<rule-slug>) <short description>

Then run node scripts/validate.mjs. CI runs it too, and fails if a marker cites a rule that does not exist, claims a higher severity than the rule carries, or reuses a number. It also fails if a stack has fewer than four BLOCKER seeds, or if seeded/clean contains a marker.