Repository navigation
Description
Delivery phase
Phase 1 - frontend with mock services
Goal
Provide all simulated authentication states needed for a complete frontend demo without contacting Firebase.
Context and authority
Milestone F2; read AGENTS.md, docs/team/product-manager.md, docs/product/LCA_diff_PRD.md, docs/engineering/roadmap.md, and docs/engineering/LCA_diff_Implementation_Specification.md §§6.1, 6.8, 8.1; roadmap F2. Current planning baseline is on docs/agent-workflow, pending review/merge into main; proposed ADRs are not accepted authority. Implement mock auth adapter under apps/frontend/src/services/mock/; add deterministic synthetic account/session fixtures and boundary tests. These application paths are planned until created. Exclude all archive/reference folders.
Requirements and constraints
Use the existing auth interface, deterministic identities and controllable asynchronous outcomes. Model initial resolution, verified/unverified login, registration, verification/resend guidance, password reset, logout, expiry/revocation and refresh failure. Persist only safe simulated session information needed for demo restore, not entered passwords, secrets or provider tokens. Explicitly label this as local simulation.
One session-sized task/PR including verification and handoff. Run all development, installation and checks in containers; install nothing on the host. No real backend, Firebase project, cloud credentials or proprietary inputs. If the current PRD/spec must change, prepare an ADR and updates to both current documents in the same PR.
Acceptance criteria
- AC1 - Tests exercise anonymous/resolving, verified, unverified, registration, duplicate-account/error and reset/verification success/failure paths through the auth boundary.
- AC2 - Auth observers emit coherent state changes for login/logout, verification, restored session, failed refresh, expiry/revocation and switching synthetic accounts.
- AC3 - A previously valid simulated session can restore after reload without requiring a Firebase project or external email delivery; password reset and verification have clear deterministic demo completion steps.
- AC4 - No submitted password or real token/secret is stored in browser storage/logs; pending auth operations support repeatable errors/latency and safe cancellation where applicable.
- AC5 - No mock auth operation grants access through an unverified state; service-level protected-call guards expose typed auth failures for integration tests.
Out of scope and follow-ups
Presentation/forms are #13; auth controller, query-cache clearance and shell guarding are #14. Production Firebase/Admin verification remains B2/I1.
Verification plan
Inside ./dev shell, run format:check/lint/typecheck/test:unit/build. Use deterministic timers/storage doubles for observer ordering, refresh failure and restore cases; inspect safe storage contents. UI E2E coverage is #15.
Engineer records branch/SHA and exact results, leaves issue open, and hands off to QA. QA verifies every criterion at that SHA and reports PASS/FAIL/BLOCKED; mock evidence is not proof of real security/integration.
Dependencies and readiness
Blocked by #10. No implementation until dependencies and the M1 environment runtime gate are satisfied. This body is groomed planning material, not PM READY while blockers remain. Coordinator/PM rechecks merged dependencies and session-sized scope before starting.
Current readiness — supersedes historical planning baseline/blockers above
PM: READY for Phase 1/F2. F1 #10 is closed following independent QA PASS, passing final PR/full-suite CI and the maintainer's explicit PR #44 merge (96129438d254fe897a3094f7e6923e4ec6cfb2e7). M1 is merged in PR #35 and #2 is closed; rootless Docker/Compose are available. The merged current PRD/specification, ADRs 0001–0003 and existing F1 auth/service contracts are the working baseline; historical planning-branch statements above are superseded. AC1–5 are unchanged.
Implement the deterministic mock adapter and synthetic auth scenarios behind the existing AuthService boundary, replacing the technical placeholder at composition. Keep scenario controls in services/mock or explicitly injected test configuration; components must not import fixtures or bypass auth. Preserve asynchronous typed-result, cancellation and observer conventions. Expose clear deterministic verification/reset completion steps for later #13 UI integration, with no actual email/Firebase/backend. Store only versioned safe synthetic session/account markers needed for restore; never submitted passwords or provider tokens. Unverified/restoring/failed states cannot grant protected service access. No UI forms or session/query-cache controller work here (#13/#14 own those).
Verification: guarded rootless container environment check; frozen frontend npm ci; format:check/lint/typecheck/test:unit/build. Meaningful deterministic timer/storage/service-boundary tests cover all AC1–5, including observer ordering, canceled/late auth actions, restored/malformed sessions, account switching, failed refresh, expiry/revocation, typed protected-call failures and storage inspection. Existing Chromium/Firefox foundation smoke should remain passing when composition changes. Engineering records exact commands/SHA and hands off to independent QA; no merge/close before QA, CI and maintainer-approved merge. No PRD/spec deviation or ADR is required for this bounded implementation.
Activity
DavidVFitzGerald commentedon Nov 13, 2026
PM: BLOCKED
Groomed using docs/team/product-manager.md for F2, Phase 1 — frontend with mock services. Documentation review: PASS for scope, required sections, specification coverage and acyclic dependency links; this is not application QA or implementation readiness.
Blocking predecessor issues: #10. The M1 runtime gate (#2) and merged bootstrap/M2 configuration (#3) also remain required. PM must recheck merged dependencies and current interfaces before changing this to READY.
Engineer implements one issue, commits regularly and hands the delivered SHA plus exact container checks to independent QA; do not close before QA, review and approved merge. No backend/Firebase/cloud credentials or host installations are required for Phase 1.
DavidVFitzGerald commentedon Nov 14, 2026
PM: READY — Phase 1/F2, AC1–5 unchanged. F1 #10 is complete after PR #44 merge (9612943), independent QA PASS and successful required CI. M1 PR #35/#2 satisfied; rootless Docker and Compose confirmed available. Implement deterministic mock account/session scenarios against the existing AuthService boundary per specification §§6.1,6.8,8.1. #11 owns shell, #13 forms and #14 session/query-cache hardening. No new product decision/ADR required. Exact bounded scope and container verification are appended to the issue body. Handoff: Software Engineer, then independent QA at delivered SHA.
DavidVFitzGerald commentedon Nov 14, 2026
Engineering: READY FOR QA
Delivered
8fc0de230c7b04036cc7fb5c51e899666ae56549, branchfeat/f2-mock-auth, PR #46: #46.AC1–5 implemented: deterministic async account actions/observer lifecycle, verified and unverified sessions, registration/duplicates/reset/verification, safe active-session reload marker, expiry/revocation/refresh failure, cancellation/obsolete auth rejection, and typed raw-service guards. No app forms/controller or backend added. Demo credentials and verification/reset completion steps are in apps/frontend/src/services/README.md; active-marker-only persistence and disposable account reset after signout/reload are explicit.
Container verification from
/tmp/lca-diff-f2-auth:Environment/preflight PASS (eight scenarios, unchanged rootless/capability restrictions); frozen npm ci PASS (230 packages); format/lint/type PASS; unit PASS (134 tests/seven files, 30 auth scenarios); production build PASS; foundation Chromium and Firefox PASS (two tests). Final unit checks repeated after adding the last late-response regression and preserving the existing authenticated query-cancellation case. No host installs, secrets or lockfile drift.
git diff --checkPASS; worktree clean.Verification details: docs/engineering/f2-auth-verification.md. These service/component tests do not prove real identity/token/backend security; full account browser journeys remain #13/#15, expanded guard/controller behavior #14, real auth B2/I1. No PRD/spec deviation or ADR required. Next: independent QA at the delivered SHA, hosted quality CI, then maintainer review/merge. Leave issue open.
DavidVFitzGerald commentedon Nov 14, 2026
QA: PASS
Reviewed SHA
8fc0de230c7b04036cc7fb5c51e899666ae56549, branchfeat/f2-mock-auth, PR #46. Phase 1/F2, deterministic local auth/service adapter; no implementation, committed tests or acceptance criteria changed during independent QA.Independent commands from
/tmp/lca-diff-f2-auth:All PASS. Rootless parent UID/GID1000, all capabilities dropped/no-new-privileges, frozen uv and eight preflight regressions verified. Frozen npm install added 230 packages; lock/manifests unchanged. Unit suite: 134 tests/seven files. Production build and two existing browser smoke cases PASS (one Chromium, one Firefox), with no protected requests/runtime errors. Node24.22.3/npm11.19.1/Playwright1.65.1 unchanged from foundation.
Supplemental QA-only source-browser probe, kept outside tracked implementation:
VITE_SERVICE_MODE=mock npm --prefix apps/frontend run dev, thennode /tmp/lca-f2-auth-extra-qa.mjsin the same container. Eight additional edge probes PASS independently in each of Chromium/Firefox, covering the sequencing/abort/restore/copy/storage/all-operation denial scenarios above. No runtime errors. Delivered working tree is clean.Hosted required
qualityPASS: https://github.com/DavidVFitzGerald/LCA-diff/actions/runs/43592498569. Historical folders excluded; no PRD/specification deviation requiring an ADR. Forms and complete application lifecycle remain #13/#14/#15. Safari, real Firebase/API/mail, token refresh/revocation, authorization and licensed-data security are untested and not claimed. Next action: coordinator/maintainer review and explicit merge; keep #12 open until approved merge. F2 milestone is not complete.feat: add deterministic mock account and session lifecycle (Refs #12)
DavidVFitzGerald commentedon Nov 14, 2026
Coordinator: merged/closed. Maintainer confirmed PR #46 merged; GitHub records d05e682 at 2026-11-14T12:25:44Z. Independent QA PASS at delivered SHA 8fc0de2: #12 (comment). Required quality run 43592498569 SUCCESS. AC1–5 deterministic mock adapter slice is complete; forms/session/consolidated acceptance remain #13–#15. No real Firebase/mail/token/backend authorization completion claimed.