test(gate): gate-honesty suite — disable-must-fail wiring guard (P3) - #208
Merged
Conversation
…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.
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.
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-pushdb-schema-mismatchreachabilityIf 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 normalbun test packagesCI — no server, DB, or browser; deterministic.Also adds an injectable
specFetchertocomposeBoringstackGate(threaded toreachabilityStage) so the route-presence probe is drivable at the composed level. Full suite 3162/0; typecheck + lint clean.