[E2E P0] Harness & telemetry foundation #313

Closed
opened 2026-07-01 21:16:35 +00:00 by spikerj · 4 comments
Owner

Phase P0 of epic #307.

Scope: page-object base, route manifest + coverage reporter, JaegerClient/SeqClient, failure-time telemetry fixture, CI wiring (promote e2e-smoke beyond continue-on-error for the anonymous suite).

Status: largely DONE in spikersoft-angular PR #90:

  • Route manifest (e2e/support/route-manifest.ts)
  • Telemetry clients + captureTelemetry() (e2e/telemetry/)
  • Console-error + telemetry-on-failure fixtures (e2e/support/fixtures.ts)
  • HTTPS origin https://localhost:4200 (matches Keycloak + CORS allowlists; API-connected runs)
  • Environment decision: live-is-test, safe-mode split deferred (per epic)
  • Wire JAEGER_QUERY_URL / SEQ_URL / SEQ_API_KEY env values into CI + local runs
  • Coverage reporter that diffs the manifest against live routes
  • CI: make the anonymous suite a blocking job (replace continue-on-error smoke)
Phase P0 of epic #307. **Scope:** page-object base, route manifest + coverage reporter, `JaegerClient`/`SeqClient`, failure-time telemetry fixture, CI wiring (promote `e2e-smoke` beyond continue-on-error for the anonymous suite). **Status: largely DONE** in spikersoft-angular PR #90: - [x] Route manifest (`e2e/support/route-manifest.ts`) - [x] Telemetry clients + `captureTelemetry()` (`e2e/telemetry/`) - [x] Console-error + telemetry-on-failure fixtures (`e2e/support/fixtures.ts`) - [x] HTTPS origin `https://localhost:4200` (matches Keycloak + CORS allowlists; API-connected runs) - [x] Environment decision: live-is-test, safe-mode split deferred (per epic) - [ ] Wire `JAEGER_QUERY_URL` / `SEQ_URL` / `SEQ_API_KEY` env values into CI + local runs - [ ] Coverage reporter that diffs the manifest against live routes - [ ] CI: make the anonymous suite a blocking job (replace continue-on-error smoke)
spikerj added the enhancement label 2026-07-01 21:16:35 +00:00
Author
Owner

Progress — angular PR #105 (implements all three remaining items)

  • Coverage reportere2e/support/route-coverage.ts + route-coverage.spec.ts: TS-AST parse of src/routes.ts diffed against the manifest; suite fails on drift, attaches route-coverage.json. First run surfaced 46 unclassified routes (now reconciled; manifest = 97 routes, public walk 25→31, all green 53/53).
  • Telemetry env wiring — CI job env (Jaeger via node IP, SEQ_API_KEY repo secret — needs creating in repo settings) + local gitignored .env.e2e auto-loaded by playwright.config.ts.
  • Blocking CI — new e2e-anonymous job (all specs except video-call smoke); build_and_publish_frontend hard-gates on it.

Finding filed from the first reporter run: #340 (/keycloak-admin has AuthGuard but no RoleGuard).

Will close after PR #105 merges.

### Progress — angular PR #105 (implements all three remaining items) - [x] **Coverage reporter** — `e2e/support/route-coverage.ts` + `route-coverage.spec.ts`: TS-AST parse of `src/routes.ts` diffed against the manifest; suite fails on drift, attaches `route-coverage.json`. First run surfaced **46 unclassified routes** (now reconciled; manifest = 97 routes, public walk 25→31, all green 53/53). - [x] **Telemetry env wiring** — CI job env (Jaeger via node IP, `SEQ_API_KEY` repo secret — *needs creating in repo settings*) + local gitignored `.env.e2e` auto-loaded by playwright.config.ts. - [x] **Blocking CI** — new `e2e-anonymous` job (all specs except video-call smoke); `build_and_publish_frontend` hard-gates on it. Finding filed from the first reporter run: #340 (`/keycloak-admin` has AuthGuard but no RoleGuard). Will close after PR #105 merges.
Author
Owner

All three remaining items landed in spikersoft-angular PR #105 (merged to master as b667560): coverage reporter + drift gate, telemetry env wiring (CI job env + local .env.e2e), and the blocking e2e-anonymous job gating build_and_publish_frontend. PR #106 (merged) subsequently hardened the walk to hard-fail on unexpected console errors. P0 scope is complete — closing.

Reminder from the PR #105 notes: the SEQ_API_KEY repo secret still needs to be created in spikersoft-angular repo settings for CI telemetry capture to be active (suite is green without it; telemetry attachment is simply inert).

All three remaining items landed in spikersoft-angular PR #105 (merged to `master` as b667560): coverage reporter + drift gate, telemetry env wiring (CI job env + local `.env.e2e`), and the blocking `e2e-anonymous` job gating `build_and_publish_frontend`. PR #106 (merged) subsequently hardened the walk to hard-fail on unexpected console errors. P0 scope is complete — closing. Reminder from the PR #105 notes: the `SEQ_API_KEY` repo secret still needs to be created in spikersoft-angular repo settings for CI telemetry capture to be active (suite is green without it; telemetry attachment is simply inert).
Author
Owner

Fixed in spikersoft-angular PR #131 (fix/status-route-public-377, open — awaiting your merge; angular master is branch-protected).

Root cause was more than the reported symptom: the #377 merge left a duplicate /status route — the new public StatusPanelComponent (canActivate: [], @spikersoft/feature-status) was added above the old auth StatusChecksComponent (canActivate: [AuthGuard]), which was left in place and shadowed. The route-coverage parser saw both declarations; the auth one mismatched. Intended access is public (per #377: "public, read-only school-operator status surface… no auth, no actions, separate from the #297 admin console"). Fix: removed the shadowed auth /status route (StatusChecksComponent itself untouched, just no longer routed at /status) and reclassified the manifest /statuspublic. route-coverage.spec.ts passes 1/1 with no other accessMismatches; lint clean. Will close on merge.

Fixed in spikersoft-angular **PR #131** (`fix/status-route-public-377`, open — awaiting your merge; angular master is branch-protected). Root cause was more than the reported symptom: the #377 merge left a **duplicate `/status` route** — the new public `StatusPanelComponent` (`canActivate: []`, `@spikersoft/feature-status`) was added above the *old* auth `StatusChecksComponent` (`canActivate: [AuthGuard]`), which was left in place and shadowed. The route-coverage parser saw both declarations; the auth one mismatched. Intended access is **public** (per #377: "public, read-only school-operator status surface… no auth, no actions, separate from the #297 admin console"). Fix: removed the shadowed auth `/status` route (`StatusChecksComponent` itself untouched, just no longer routed at `/status`) and reclassified the manifest `/status` → `public`. `route-coverage.spec.ts` passes 1/1 with **no other accessMismatches**; lint clean. Will close on merge.
Author
Owner

Follow-up on the route-coverage.spec.ts red seen in the pipeline (~2026-07-05): the reporter flagged /status as declared: public (routes.ts canActivate: []) vs manifest: auth. Root cause was a shadowed duplicate /status entry in e2e/support/route-manifest.ts classified as auth.

Resolved on master by 40ec480"fix(routes): make /status public per #377, drop shadowed auth duplicate." origin/master now has exactly one /status manifest entry (access: "public"), matching the public route → the coverage test passes on current master.

The failing run executed against a commit before 40ec480 and only just reported — a superseded master build that wasn't cancelled. Once the cancel-in-progress concurrency (per-latest-master CI pause) is in place, superseded runs like this get killed on the next push instead of burning CI and reporting already-fixed failures. No further code change needed for the /status mismatch.

Follow-up on the `route-coverage.spec.ts` red seen in the pipeline (~2026-07-05): the reporter flagged `/status` as `declared: public` (routes.ts `canActivate: []`) vs `manifest: auth`. Root cause was a **shadowed duplicate `/status` entry** in `e2e/support/route-manifest.ts` classified as `auth`. **Resolved on master by `40ec480`** — *"fix(routes): make /status public per #377, drop shadowed auth duplicate."* origin/master now has exactly one `/status` manifest entry (`access: "public"`), matching the public route → the coverage test passes on current master. The failing run executed against a commit **before** `40ec480` and only just reported — a superseded master build that wasn't cancelled. Once the `cancel-in-progress` concurrency (per-latest-master CI pause) is in place, superseded runs like this get killed on the next push instead of burning CI and reporting already-fixed failures. No further code change needed for the `/status` mismatch.
Sign in to join this conversation.