Skip to content

test(gate): gate-honesty suite — disable-must-fail wiring guard (P3) - #208

Merged
agjs merged 1 commit into
mainfrom
fix/gate-honesty-suite
Jul 27, 2026
Merged

test(gate): gate-honesty suite — disable-must-fail wiring guard (P3)#208
agjs merged 1 commit into
mainfrom
fix/gate-honesty-suite

Conversation

@agjs

@agjs agjs commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Observable-gates plan, P3 (4th in the series after #205/#206/#207). Locks in the controls we just built so they can't silently regress.

A CI-friendly disable-must-fail suite that drives the REAL composed boringstack gate with an adversarial input per control and asserts that control's rule fires — proving each observable control (P0a/P0b/P1) is wired into the pipeline and bites end-to-end, not merely unit-correct:

  • db:push headless rename crash (exit 0) → db-push
  • db:push clean but a plan column absent → db-schema-mismatch
  • feature routes absent from the served OpenAPI spec → reachability
  • SANITY: all-healthy inputs → gate green (so the red scenarios can't be red-by-default — otherwise disable-must-fail would be vacuous)

If a future change unwires or weakens a control (drops the oracle call, makes a stage non-blocking, removes it from composeBoringstackGate), its scenario stops producing the rule and the suite goes RED. Proven by an actual mutation: neutering the oracle guard turned the suite 3-pass/1-fail (the oracle test caught it), then reverted. Runs in the normal bun test packages CI — no server, DB, or browser; deterministic.

Also adds an injectable specFetcher to composeBoringstackGate (threaded to reachabilityStage) so the route-presence probe is drivable at the composed level. Full suite 3162/0; typecheck + lint clean.

…he observable controls (P3)

Observable-gates plan P3. A CI-friendly 'disable-must-fail' suite that drives the REAL
composed boringstack gate with an adversarial input per control and asserts that
control's rule fires — proving each observable control (P0a/P0b/P1) is WIRED INTO THE
PIPELINE and bites end-to-end, not merely unit-correct:
- db:push headless rename crash (exit 0) → rule 'db-push'
- db:push clean but a plan column absent → rule 'db-schema-mismatch'
- feature routes absent from the served OpenAPI spec → rule 'reachability'
- SANITY: all-healthy inputs → gate green (so the red scenarios can't be red-by-default)

If a future change unwires or weakens a control (drops the oracle call, makes a stage
non-blocking, removes it from composeBoringstackGate), its scenario stops producing the
rule and the suite goes RED. Proven by an actual mutation: neutering the oracle guard in
boringstackCommandStage turned the suite 3-pass/1-fail (the oracle test caught it);
reverted. Runs in the normal 'bun test packages' CI — no server, DB, or browser.

Adds an injectable specFetcher to composeBoringstackGate (threaded to reachabilityStage)
so the route-presence probe is deterministically drivable at the composed level. Full
suite green.
@agjs
agjs merged commit e28e8d6 into main Jul 27, 2026
8 checks passed
@agjs
agjs deleted the fix/gate-honesty-suite branch July 27, 2026 20:54
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