fix(hooks): secrets-gate v2 — live-marked keys blocked everywhere; down-model proof 3/3-vs-0/3 - #32
Merged
Conversation
… except .env
Gate v1 failed its own down-model proof (E2-haiku stayed 1/3): the scenario's
key is pfk_live_… — a fictional vendor prefix no provider list can anticipate —
and one run parked the live key in tests/, which the fixture exemption allowed.
Both structural. v2 splits the patterns into two classes:
Class 1 *_live_/_prod_/_secret_ keys + private-key blocks — blocked in
EVERY file except .env* ('live' means live; never a fixture)
Class 2 provider-shaped tokens — blocked in source; tests/fixtures/docs
keep their exemption (vendor _test_ keys are designed for CI)
Hook tests S9-S12 pin the class boundary (67 total). Also: my own git-checkout
blunder briefly reverted v2 to v1 mid-branch — caught by rereading the file,
redone, and noted here so the history makes sense.
The sharpest +Sage delta measured in this program: a hook built from a measured failure, proven down-model on its second iteration. E2's secrets rule is now mechanical like test-first before it — 3/3-vs-0/3, twice over. Records in WEAK-MODEL-CAMPAIGN.md + E2's MEASURED.md.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gate v1 (merged in #31) failed its own down-model proof — E2-haiku stayed 1/3: the scenario's key (
pfk_live_…) is a fictional vendor prefix no provider list can anticipate, and one run parked the live key intests/, which the fixture exemption allowed. Both structural.v2 splits the patterns into two classes:
*_live_/_prod_/_secret_, private-key blocks): blocked in EVERY file except.env*.livemeans live; it is never a fixture._test_keys are designed for CI).Proof (E2 on haiku, both arms, N=3): sage 3/3 · bare 0/3 — up from 1/3, while bare hardcoded the live key into
src/every run. The sharpest +Sage delta the measurement program has produced; E2's rule is now mechanical like test-first (3/3-vs-0/3, twice over).Boundary pinned by S9–S12 (67 hook tests). Two footnotes for the record: GitHub push protection blocked this branch for containing Stripe-shaped fake keys in the tests (the gate's own lesson, enforced on the gate's own tests — fakes are scanner-safe now), and a careless
git checkoutbriefly reverted v2 mid-branch (caught, redone, noted in the commit).fastcheck14/14 · change-contract holds (E2 re-measured, MEASURED.md records).