Skip to content

feat: promote terraform and database detectors to stable - #96

Merged
arminazimi merged 1 commit into
mainfrom
feat/56-stable-terraform-database
Nov 14, 2026
Merged

arminazimi merged 1 commit into
mainfrom
feat/56-stable-terraform-database

Conversation

@arminazimi

Copy link
Copy Markdown
Contributor

Closes #56

What changed

Promote the terraform and database detectors from experimental to stable under decision 0013. Both now meet the stable evidence rows: at least 20 repositories with findings, 60 expected findings, 4 zero-finding repositories, and a blind share of at least two thirds. The selection rules were written into docs/validation/ecosystems.md on 2026-11-14 before the searches ran.

Blind selection (2026-11-14):

  • Terraform finding queries were gh search code --limit 40 for required_version, cluster_version, min_master_version, and kubernetes_version (--extension tf), then filename .terraform-version. No extra finding pins were needed: corpus-wide Terraform findings already met the stable rows.
  • Terraform zero-finding search was terraform aws module example (stars 10..2000, not archived). That query returned two repositories and was exhausted, so the walk continued on terraform aws example with the same filters. Kept empty pins: RJPearson94/terraform-aws-open-next-examples, kung-foo/multiregion-terraform, nicksantamaria/example-terraform-aws-vpc-peering. BabyJ723/blast-ON scanned empty and was skipped because the default branch is only LICENSE.
  • Database finding queries were postgres:12, postgres:13, postgres:11, and mysql:5.7 in Compose filenames, then engine_version with "5.7, "12., and "13. (--extension tf; those three returned no hits), then POSTGRES_12 and MYSQL_5_7. Kept the first Compose repositories under 12,000 KB whose offline scan reported a database.* finding, stopping at 25 new expected database findings.
  • Database zero-finding queries were postgres:16, postgres:17, and mysql:8.4 in Compose filenames. Kept J-Schoepplenberg/royce (postgres:16), alex-kosarev/sc24 (postgres:16), and fuma-nama/fuma (postgres:16.4).

Terraform

  • Repos added: 3 zero-finding (RJPearson94/terraform-aws-open-next-examples, kung-foo/multiregion-terraform, nicksantamaria/example-terraform-aws-vpc-peering)
  • Findings added: 0 (countEvidence expected findings stay 498)
  • Zero-finding repositories: 4
  • Repositories with findings: 20
  • Blind share: 10/15 (0.667)
  • Offline --ecosystem terraform: precision 1, recall 1 (14 true positives, 0 false positives, 0 false negatives)
  • Full offline run: precision 1, recall 1 (499 true positives, 0 false positives, 0 false negatives)

Database

  • Repos added: 18 blind (15 with findings, 3 empty)
  • Findings added: 25 database.* expected findings (countEvidence 36 → 61)
  • Zero-finding repositories: 4
  • Repositories with findings: 39
  • Blind share: 26/30 (0.867)
  • Offline --ecosystem database: precision 1, recall 1 (40 true positives, 0 false positives, 0 false negatives)
  • Full offline run: precision 1, recall 1 (61 true positives, 0 false positives, 0 false negatives)

No detector code changes. Transitive npm lockfile findings are not corpus expectations, matching the corpus harness.

Quality bar

Read docs/QUALITY.md before you change code, data, or docs. CI enforces its nine criteria: add no new debt, and allowlist existing debt only with an expiry.

Checks CI cannot make

  • Tests added or updated for changed behavior
  • Changelog fragment added in changes/ for user-visible changes (not for docs, test, ci, chore, build, refactor, or style)

Verification

  • npm run check passed locally (4639 tests, 0 failures).
  • npm run validate:public-repos -- --offline --ecosystem terraform — terraform precision 1, recall 1.
  • npm run validate:public-repos -- --offline --ecosystem database — database precision 1, recall 1.
  • Full offline corpus: 1638 of 1639 repositories, wall 390 s, every scored detector precision 1 and recall 1, including terraform (499/0/0) and database (61/0/0). antono4/openmind was left out of that run because GitHub returns 404 for the pinned repository (pre-existing rust pin). It is still in the corpus.

Notes for reviewers

The ordered candidate lists are the pins under benchmarks/public-repositories/terraform/ (9238–9240) and benchmarks/public-repositories/database/ (9241–9258), plus the rules in docs/validation/ecosystems.md. Ground truth notes quote the line at the pinned commit and cite the vendor lifecycle page. lastFullRun was not rewritten (npm run record:corpus-run was not run).

Made with Cursor

Add blind corpus pins so both detectors meet the stable evidence minimums, and record that level.

Co-authored-by: Cursor <cursoragent@cursor.com>
@arminazimi
arminazimi force-pushed the feat/56-stable-terraform-database branch from ef9e2f5 to 3c4ec3e Compare November 14, 2026 18:41
@arminazimi
arminazimi added this pull request to the merge queue Nov 14, 2026
Merged via the queue into main with commit 24ba62a Nov 14, 2026
24 checks passed
@arminazimi
arminazimi deleted the feat/56-stable-terraform-database branch November 15, 2026 18: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.

Stable: terraform and database detectors

1 participant