Skip to content

fix(hooks): secrets-gate v2 — live-marked keys blocked everywhere; down-model proof 3/3-vs-0/3 - #32

Merged
xoai merged 2 commits into
mainfrom
secrets-gate-v2
Jul 17, 2026
Merged

fix(hooks): secrets-gate v2 — live-marked keys blocked everywhere; down-model proof 3/3-vs-0/3#32
xoai merged 2 commits into
mainfrom
secrets-gate-v2

Conversation

@xoai

@xoai xoai commented Jul 17, 2026

Copy link
Copy Markdown
Owner

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 in tests/, which the fixture exemption allowed. Both structural.

v2 splits the patterns into two classes:

  • Class 1 — live-marked keys (*_live_/_prod_/_secret_, private-key blocks): blocked in EVERY file except .env*. live means live; it is never a fixture.
  • Class 2 — provider-shaped tokens: source-only; tests/fixtures/docs keep their exemption (vendor _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 checkout briefly reverted v2 mid-branch (caught, redone, noted in the commit).

fastcheck 14/14 · change-contract holds (E2 re-measured, MEASURED.md records).

xoai added 2 commits July 17, 2026 14:14
… 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.
@xoai
xoai merged commit 8719332 into main Jul 17, 2026
19 checks passed
@xoai
xoai deleted the secrets-gate-v2 branch July 17, 2026 12:50
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.

1 participant