Repository navigation
Conversation
Use one trusted Playwright double-click gesture and assert exactly one successful token persistence write, the exact stored token, and app-shell visibility. Preserve production behavior. Final focused browser file passes all 8 tests on each owned immutable-image native backend; duplicate-write negative control fails as intended. Update session context and bounded execution RCA. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
pranems
left a comment
There was a problem hiding this comment.
Owner COMMENTED self-review of exact head 28f56ef. Parent directly reviewed this exact three-file source diff. One trusted dblclick replaces concurrent click actions and an ignored catch; successful localStorage writes must equal [TOKEN], the final stored token must equal TOKEN, and the app shell must be visible. Production, API/web source, configuration, thresholds, versions and snapshot content are unchanged. Focused whole token-gate file: 8 passed, 0 failed, 0 skipped per owned native backend. Duplicate-identical-write negative control: 7 passed, 1 expected assertion failure, 0 skipped. Normal Validate push: 32/32 gates passed, numeric exit 0; exact remote/upstream/head match. This is owner self-review plus parent source review, not independent approval. No quota/event-subscription retry, bypass, merge or deployment. Remaining exact-tip CI and eligible merge belong to parent; full zero-skip native browser acceptance and migration completion are not claimed. Design disposition accepted: cohesive test-only change. Self-improvement applied: permanent outcome assertion catches duplicate same-value writes.
Summary
Repair the token Save browser contract with one trusted double-click and an exact once-only successful localStorage write assertion.
The three-file change replaces concurrent locator clicks and an ignored exception in
web/e2e/token-gate.spec.ts. It observes the actual token storage key, requires the write sequence to equal[TOKEN], verifies the stored token, and requires the app shell to open.Session_starter.mdanddocs/CONTAINER_RUNTIME_REMOVAL_READINESS.mdrecord bounded evidence and remaining acceptance work.Production/API/web source, runtime configuration, test pools/isolation/deadlines/thresholds, versions and snapshots are unchanged. This is not a full browser, visual, deployed-dev or overall migration completion claim.
Linked Defect / Plan Reference
docs/CONTAINER_RUNTIME_REMOVAL_READINESS.md, "Token Save browser contract repair, 2026-11-24".TDD Process
api/src/security/)Preserved old exact-f8 native Prisma browser evidence is 327 passes, one action-delivery failure and 25 skips. The failure was a second locator action after the peer click dismissed the dialog, not proof of a production
pendingRefdefect. The duplicate same-value write negative control gives seven passes, one expected assertion failure and no skips. The final whole token-gate file gives eight passes, zero failures and zero skips on each owned native InMemory and Compose Prisma fixture. The permanent exact-write-sequence assertion distinguishes duplicate identical writes from the correct final storage value.Feature / Bug-Fix Commit Checklist (standing rule)
Every behavioral change must include all that apply. Tick or strike through with N/A + reason.
api/test/e2e/exercising the feature through HTTP. N/A for new API coverage; only the existing browser contract changes. Normal Validate hook API coverage is reported below.scripts/live-test.ps1runnable against local + Docker + Azure. N/A; no wire-visible change or new live-test section.docs/with architecture, RFC references, Mermaid diagrams, test coverage. Existing directly related readiness/RCA documentation updated; no new feature or diagram.docs/INDEX.md. N/A; no new document.[Unreleased]entry with full test counts and feature summary. N/A; test-only repair, no product release.Session_starter.mdanddocs/CONTEXT_INSTRUCTIONS.md. Starter updated; general context unchanged because product/version/runtime are unchanged.api/package.json(and any other version refs) when behavior changed. N/A; product behavior/version unchanged.Validation Output
Exact supplied commands and results:
npx playwright test e2e/token-gate.spec.ts --workers=1 --reporter=line,json --output=<owned output>: final complete file passes 8/8 on each backend, serially, against owned immutable-image fixtures. Original identities retained: 11 containers, 49 volumes, six networks; owned fixtures closed. No full browser rerun was performed at this delivery boundary.npx tsc --ignoreConfig --noEmit --strict --target ES2022 --module NodeNext --moduleResolution NodeNext --skipLibCheck --types node e2e\token-gate.spec.ts: passed, exit 0.pwsh -NoProfile -File scripts\audit-doc-freshness.ps1 -BaseRef f8c2ce1f2e325affd2e780d0fe5ee0aba330901c -Quiet: passed, exit 0.node scripts\audit-doc-content.mjs: passed, exit 0.PREPUSH_MODE=Validate,VITEST_MAX_WORKERS=1,NODE_DISABLE_COMPILE_CACHE=1, generation-only inertDATABASE_URL, thengit push --set-upstream origin refs/heads/vprane/scimserver/containers-token-save-browser-contract-20261124:refs/heads/vprane/scimserver/containers-token-save-browser-contract-20261124: passed, exit 0, all 32 unchanged gates green in 2322.7 seconds. Repository gate settings remain unchanged.Final hook receipt SHA256:
7B1B4B54E5C270D96973E63209162F0E92E9162EF8D403C8F7067025455402B2.The hook's existing API skips do not change the focused browser claim of 8/8 per backend with zero skips. The existing Jest worker-exit/timer warnings were observed; the hook's unit/E2E numeric exits were zero. Web Vitest's existing JSDOM scroll/navigation warnings were also observed; all tests passed. The normal test pass rewrote one snapshot's line endings; its normalized Git blob matched HEAD exactly before restoring only that owned rewrite. No snapshot content or baseline was regenerated.
Supplied private local final report SHA256:
F9871C2459B17FDBEDA1FC47FB99BB23ECE0BD32FEEA07FB969B234BDF401E40. Failed receipts are retained locally, not discarded. Delivery records preserve numeric exits and receipt hashes. Missing owned API dependencies first failed the normal hook (tscunavailable, exit 1); only thennpm ci --no-audit --no-fundrestored the API directory. The next normal hook exposed the missing generated Prisma client (build exit 2);npm run prisma:generatepassed without connecting to a database. Root/API/web lockfiles remained byte-identical. No local lockfile generation, foreign dependency copying or runtime restart occurred.Private observer evidence is tracked separately. Full zero-skip native browser acceptance and parent delivery/merge remain separate pending claims.
Standing Rules Acknowledgment
U+2014) anywhere in the diff. Verified viaSelect-String -Pattern ([char]0x2014).git commit --amendon history that has been pushed.api/src/security/forbidden-source-patterns.spec.tswill catch known anti-patterns.api/src/scripts/lint-migrations.tsenforces this. N/A; no migrations changed.Destructive Migration Override (skip if not applicable)
ALLOW_DESTRUCTIVE_MIGRATION=1in the CI environment for this PR. N/A; no destructive migration or override.Reviewer Hint
Diff areas worth special attention from the reviewer:
web/e2e/token-gate.spec.ts, the double-click Save test: one trusteddblclick, only successful writes to the real localStorage key are observed, exact sequence assertion plus final stored value and app-shell outcome.