Repository navigation
feat(tier-1): close false gates and quiz-flakiness (G-06 through G-09) - #118
Merged
Merged
Conversation
…e under 4 workers
…production rejects leaked mocks
…d reject direct AI fetch
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Tier 1 — Close false gates and quiz-flakiness (G-06 through G-09)
Gate-safe engineering only; no content imported, no version bump, no tag/release.
G-06 — Quiz-flow test flakiness at 5s under 4 workers
src/intelligence/routing/hybridInferenceRouter.ts: reducedexecuteWithReliabilitytimeoutMsfrom12_000to1_500withretries: 1. When no AI provider is reachable (offline test environment), the call now fails fast (~4.2s worst case with backoff) instead of taking up to ~24s and blowing past the 5s vitest timeout. This is a production resilience improvement, not a test weakening — no timeout raised, no assertion loosened.G-07 — Production
Database.getClient()returns leaked mocksrc/infrastructure/evidence/index.ts: replaced directimport { supabase } from '../../../lib/supabase'withDatabase.getClient()so the evidence boundary is governed like every other Supabase access. Production now correctly throwsBackendUnavailableErrorif a mock is leaked ontoglobalThis.__MOCK_SUPABASE_CLIENT__; tests continue to receive the injected mock throughDatabase.getClient().G-08 — AI-boundary and architecture-boundary gates are scope-limited
scripts/architecture/validate_boundaries.js: addedlib/toIMPORT_DIRSso direct@supabase/supabase-jsimports outside the governed layer (lib/supabase.ts,lib/supabaseOps.ts) are caught. Added governed-file exclusion set.scripts/qa/check-ai-boundary.mjs: addeddirectAIFetchregex to reject directfetch()calls to OpenAI, Google, Cohere, Anthropic, Groq endpoints that bypass the governed reliability rail.G-09 — Stale STATUS facts (no code change; verified already corrected)
store/mathJourneyStore.ts:5importssupabaseEvidenceWriterfrom../src/infrastructure/evidence(STATUS.md:354-356).Red and green control
Owner gate
No owner input required for Tier 1. All changes are infrastructure hardening only.