Files
git.stella-ops.org/docs/implplan
master 4fea1ec728 fix(web-tests): ProxyZone bootstrap for Vitest to unblock ~200 fakeAsync specs
Partial closeout of SPRINT_20260420_003 FE-STAB2-005/009. Sprint NOT
archived — per-spec repairs remain for signal-input JIT NG0303/NG0950,
TestBed lifecycle/provider drift, and expectation drift families. Both
tasks flipped DOING → BLOCKED with justification in the sprint file and
Decisions & Risks. Follow-up sprint FE-STAB3-* needed; see
SPRINT_20260422_006_FE_web_test_infrastructure_followup (created in the
companion commit).

Root cause: zone.js/testing's jasmine patch short-circuits under Vitest
because neither `jasmine` nor `jest` globals exist at zone-testing load
time. Result: `fakeAsync()` bodies threw
  "Expected to be running in 'ProxyZone'"
across ~200 spec files — nearly every fakeAsync spec red.

Infrastructure fix (1 new file + 1-line import):
- src/Web/StellaOps.Web/src/test-setup.jasmine-bootstrap.ts (new, ~140
  lines): wraps Vitest's it/test/beforeEach/afterEach/beforeAll/afterAll
  globals to fork a fresh ProxyZone per test body; seeds a minimal
  `jasmine` global before zone.js/testing loads so the jasmine patch
  doesn't short-circuit.
- src/Web/StellaOps.Web/src/test-setup.ts: single
  `import './test-setup.jasmine-bootstrap';` prepended.

Verified green post-fix (targeted reruns):
- simulation-console 53/53
- batch-evaluation 40/40
- promotion-gate 52/52
- policy-merge-preview 39/39
- policy-exception 43/43
- policy-lint 38/38
- policy-diff-viewer 28/28
- conflict-detection 44/44
- fakeAsync sanity probe: pass
- ~450 tests now green in previously-blocked clusters.

Residual families (BLOCKED, per-spec repair scope — tracked in follow-up):
- Signal-input JIT: setup-wizard/step-content, deploy-diff, sbom-diff,
  evidence-drawer, verdict-proof-panel, patch-diff-viewer, vex-trust-chip
- TestBed lifecycle/provider drift: findings-container needs SCORING_API
- Expectation drift: simulation-history navigate/header/empty-state

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 18:16:28 +03:00
..
2026-02-01 21:37:40 +02:00