Skip to content

feat(tier-1): close false gates and quiz-flakiness (G-06 through G-09) - #118

Merged
dmuhoro merged 3 commits into
mainfrom
feat/tier-1-false-gates-and-quiz-flakiness
Dec 1, 2026
Merged

dmuhoro merged 3 commits into
mainfrom
feat/tier-1-false-gates-and-quiz-flakiness

Conversation

@dmuhoro

@dmuhoro dmuhoro commented Dec 1, 2026

Copy link
Copy Markdown
Owner

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: reduced executeWithReliability timeoutMs from 12_000 to 1_500 with retries: 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 mock

  • src/infrastructure/evidence/index.ts: replaced direct import { supabase } from '../../../lib/supabase' with Database.getClient() so the evidence boundary is governed like every other Supabase access. Production now correctly throws BackendUnavailableError if a mock is leaked onto globalThis.__MOCK_SUPABASE_CLIENT__; tests continue to receive the injected mock through Database.getClient().

G-08 — AI-boundary and architecture-boundary gates are scope-limited

  • scripts/architecture/validate_boundaries.js: added lib/ to IMPORT_DIRS so direct @supabase/supabase-js imports outside the governed layer (lib/supabase.ts, lib/supabaseOps.ts) are caught. Added governed-file exclusion set.
  • scripts/qa/check-ai-boundary.mjs: added directAIFetch regex to reject direct fetch() 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)

  • Evidence module "unreferenced" — false: store/mathJourneyStore.ts:5 imports supabaseEvidenceWriter from ../src/infrastructure/evidence (STATUS.md:354-356).
  • 85/492 test count — not present; historical counts clearly marked as historical.
  • "All Phase 2 unwired dead code" — false: 35/40 screens wired (STATUS.md:166, 278-281).

Red and green control

  • G-06 red control (temporary probe): confirmed 12s × 2 retry graph exceeds 5s vitest window. Probe not shipped.
  • Green: full local gate — typecheck 0, lint 0 errors (129 pre-existing warnings), 132 files / 738 tests, boundaries 0 violations, i18n 87 screens, no-raw-hex 330 files, architecture audit 0 violations, QA all systems verified, web export exported, audit 0 critical, guard:secrets passed, guard:public-env passed, guard:dist passed.

Owner gate

No owner input required for Tier 1. All changes are infrastructure hardening only.

@vercel

vercel Bot commented Dec 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
easytutor Ready Ready Preview Dec 1, 2026 3:36pm UTC

@dmuhoro
dmuhoro merged commit d4ec8c6 into main Dec 1, 2026
6 checks passed

This branch was successfully deployed

1 active deployment
Preview – easytutor — 22078613 Deployed Dec 1, 2026 by vercel[bot]
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