Quiet web test lane warnings and align scheduler spec

This commit is contained in:
master
2026-04-06 00:51:50 +03:00
parent f8e4bf65fb
commit de5bc63f89
4 changed files with 180 additions and 42 deletions

View File

@@ -0,0 +1,65 @@
# Sprint 20260405-006 - FE Default Web Test Lane Repair
## Topic & Scope
- Restore the default Angular/Vitest Web unit-test lane so `npm test -- --watch=false` passes again.
- Rewrite stale specs to current shipped Web surfaces and route contracts instead of recreating removed component APIs or feature trees.
- Working directory: `src/Web/StellaOps.Web/`.
- Expected evidence: green default Web test lane, green active-surface lane, updated sprint execution log.
## Dependencies & Concurrency
- Depends on `SPRINT_20260405_002_FE_test_lane_repair_for_active_surfaces.md` for the focused shipped-surface lane.
- Safe to run after the Graph/JobEngine persistence work because this sprint is limited to Web tests and test-only scaffolding.
## Documentation Prerequisites
- `docs/modules/web/architecture.md`
- `docs/implplan/SPRINT_20260405_002_FE_test_lane_repair_for_active_surfaces.md`
## Delivery Tracker
### FE-TEST-008 - Rewrite stale spec expectations to current component APIs
Status: DONE
Dependency: none
Owners: Developer / Implementer, Test Automation
Task description:
- Repair the current compile failures caused by specs asserting removed instance methods and fields such as `setTab`, `onSearch`, `tabs`, `headerTitle`, `shellState`, and `withContext`.
- Keep runtime behavior unchanged; the fix is to update tests to current component state and route contracts.
Completion criteria:
- [x] The default lane no longer fails on removed instance APIs in current shipped components.
- [x] Navigation assertions compile under the current Vitest assertion types.
- [x] The rewritten specs validate current DOM, signal state, or route behavior instead of dead component helpers.
### FE-TEST-009 - Repoint removed feature-tree specs to current shipped surfaces
Status: DONE
Dependency: FE-TEST-008
Owners: Developer / Implementer, Test Automation
Task description:
- Replace specs that still import removed Web feature trees (`agents`, `signals`, older platform-ops/setup pages, deleted environments list page) with tests against the current topology, doctor, platform-ops, and route-redirect owners.
- Preserve useful user-facing intent where a legacy route is still intentionally redirected.
Completion criteria:
- [x] No default-lane spec imports a deleted Web component or service path.
- [x] Legacy `signals` and `platform-ops` coverage is expressed through current redirects and live owning pages.
- [x] The default lane passes without excluding the repaired spec families.
## Execution Log
| Date (UTC) | Update | Owner |
| --- | --- | --- |
| 2026-04-05 | Sprint created for broad default-lane Web test repair after focused active-surface lane completion. | Developer |
| 2026-04-05 | Lowered the Web Vitest heap ceiling to 3072 MB, switched the runner to `forks`, and reduced deterministic batch size to 12 files so the default lane can run within the available process and RAM limits. | Developer |
| 2026-04-05 | Rewrote stale default-lane specs to current route contracts and shipped component behavior across releases, setup/platform, topology, security-risk, trust-admin, pack-registry, quiet-lane, and legacy redirect coverage. | Developer |
| 2026-04-05 | Verification complete: `npm test -- --watch=false` finished through the deterministic 32-batch runner with all batches green, and `npm run test:active-surfaces` passed 25/25 after the final repairs. | Test Automation |
| 2026-04-05 | Removed deprecated `allowSignalWrites` usage across the Web app and centralized jsdom/browser-noise cleanup in `src/test-setup.ts` for `ResizeObserver`, `alert`, Angular sanitizer output, and synthetic navigation warnings. | Developer |
| 2026-04-05 | Re-verified the quieter lane with `npm run test:active-surfaces` and `npm test -- --batch-from=31 --batch-to=31`; both passed with the previous warning noise removed from those runs. | Test Automation |
| 2026-04-05 | Completed a final full deterministic 32-batch rerun with all batches green, then removed the remaining `NG0956` warning via stable `@for` tracking in the policy editor and suppressed known expected failure-path console noise in the shared test harness; targeted noisy-spec reruns and `npm run test:active-surfaces` both passed cleanly afterward. | Developer |
## Decisions & Risks
- This sprint does not reintroduce deleted production APIs to satisfy tests.
- When a legacy route still exists, tests should cover the redirect contract; when the old feature no longer ships, tests should move to the current owning page.
- Existing unrelated repo changes outside `src/Web/StellaOps.Web/` remain out of scope and untouched.
- The default lane is intentionally verified through the deterministic batch runner that backs `npm test -- --watch=false`; after each late-batch fix, only the affected batch and remaining tail were rerun to avoid redundant full rebuilds under the repo's current memory pressure.
- Angular sanitizer chatter, deprecated `allowSignalWrites`, and jsdom-only `alert()` / synthetic navigation warnings are now handled in code or the shared test harness so passing runs stay readable.
- The remaining quiet-lane filtering in `src/test-setup.ts` is intentionally limited to known expected failure-path console output from specs that already assert user-visible error handling.
## Next Checkpoints
- 2026-04-05: Sprint complete; archive after adjacent Web test-lane work is no longer active.