Repository navigation
Conversation
MV3 browser-extension skeleton from the PRD: every feature has a wired, callable entry point. Service bodies are NotImplementedError stubs; types, wiring, and the build are real. - Extension (WXT + TS strict + React + Tailwind + Zustand): side panel UI, ephemeral service worker with a typed handler-map router, services for cookies, profiles, capture/switch/snapshot, Playwright + Puppeteer/Selenium/ cURL export, permissions, encryption, licensing, telemetry, team; 8 views. - Cloudflare Worker: Stripe Checkout + Ed25519 license minting. - .NET 10 backend: Team (P2) zero-knowledge sync API. Reflects two specialised-review rounds: - Minimal install permissions; no host_permissions (web storage injected via chrome.scripting.executeScript, no content script); side-panel-first. - Source-available LICENSE (FSL-1.1-Apache-2.0) per PRD decision #2. - Redacting logger + sanitized errors; settings/onboarding/theme wired; per-store switch results, snapshots, usage-milestone upsell; telemetry + Pro gating call sites; reproducible npm ci (esbuild override). - Tooling: ESLint + Prettier + .editorconfig + global.json + CI. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Spec-by-test: tests encode the PRD contract for every feature so they fail cleanly against the stubs (NotImplementedError/assertion) and pass only when a feature is implemented correctly. 988 tests across cookies, profiles/switch, export, crypto, storage, permissions, licensing, worker, telemetry, router, and UI. 362 pass now (wiring/UI/telemetry/settings already implemented). Infrastructure: - Realistic in-memory chrome.* fake (cookies/storage/permissions/tabs/ scripting/runtime/sidePanel) with fault injection, in tests/harness. - vitest + jsdom + @testing-library + fake-indexeddb; tests/CONTRACTS.md as the cross-cutting contract source of truth. - Testability seams: licenseVerifier.setLicensePublicKey, background messageHandler extraction, clipboard lib, worker LicensePayload.validUntil. Every group was independently verified by implementing it in a throwaway worktree and proving the tests go green; mutation testing confirmed the already-green groups catch bugs. Hardening of weak/edge tests follows. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Completes the spec-by-test suite. Every red group was proven satisfiable by implementing it in a throwaway worktree; already-green groups were mutation- tested. Weak/tautological tests were strengthened and coverage gaps filled. Added: - tests/manifest: permission-posture contract (no host_permissions/<all_urls>/ content_scripts/default_popup; minimal permissions). - tests/team: auth, zero-knowledge sync (no plaintext crosses the wire), vaults/ roles/revocation — verified, 7 mutations caught. - backend/Sessionist.Api.Tests: 40 .NET contract tests (xUnit + WebApplication- Factory) for the Team backend (red until implemented; /health green). - e2e/: 43 Playwright specs + zero-dep demo app covering §10 flows, the §13.6 matrix, and the §13.7 storageState round-trip capstone. - Hardening across cookies/profiles/export/crypto/permissions/licensing/UI: fixed broken tests, strengthened tautological ones, closed mutation gaps (telemetry opt-out, clipboard, curl origin, CHIPS removal fidelity, key persistence reload, real Stripe-webhook HMAC, interop expiry). Totals: ~1108 vitest + 40 .NET + 43 Playwright. compile/lint/format/build green; suite red-by-design until features land. CI runs the suite (continue-on-error). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
For every domain, implemented the feature in a throwaway worktree and ran an aggressive loop-until-dry mutation sweep — introducing bugs across every branch, boundary, operator, default, await, argument, and validation — adding a killing test for each survivor until no non-equivalent mutation remained. Then enumerated the full edge space from the PRD/CONTRACTS and filled every gap. Growth (vitest): cookies 210->246, profiles 168->260, export 113->173, crypto+storage 138->239, permissions 58->68, licensing+worker 85->143, telemetry+router 93->107, UI 185->327, team 57->134 (+ manifest 8, sanity 5). Backend xUnit ->98, Playwright E2E ->72 specs (8 files, full §10/§13.6/§13.7 flow coverage). Total ~1710 vitest + 98 .NET + 72 E2E. Real survivors caught & killed this pass: selenium lang arg hardcoded, sendResponse double-call, includeSubdomains column, CHIPS partitioned removal, key-persistence reload, 8 vacuous team rejection tests, backend cross-user isolation + plaintext-in-response leaks. Cross-realm ArrayBuffer instanceof fixed. compile/lint(0 errors)/format/build green; 0 infra-broken; suite red-by-design until features land. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
estimateSizeBytes/quotaStatus are now real pure functions; saveProfile refuses over-cap profiles with a UserFacingError. Closes the one untestable gap the exhaustive pass flagged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- §19: UpgradeView no longer claims 'Unlimited session profiles' (qualified).
- §14.3: ErrorBoundary renders error.name only, never the message (no secret leak).
- §9.1: lock-a-cookie entry point — cookies/lock + cookies/unlock messages,
router handlers, cookieService.lockCookie/unlockCookie, UI lock toggle.
- §9.1: cookie form now edits SameSite + expiry (not just name/value/flags).
- §9.2: ProfilesView surfaces unsupportedStores ('not captured') per profile.
- §9.3: ExportView wires scanForSecrets per-field redaction warnings.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- 55 cross-service integration tests (capture↔repo↔export↔switch↔snapshot via the router) catching inter-service contract drift unit tests miss. - Cookie lock feature tests (lock/unlock persist, list locked-flag, delete honoring, router wiring) — all mutations caught. - Worker /checkout Stripe contract tests (PRO_PRICE_ID, success/cancel URLs, client_reference_id, bearer auth, error paths) — 11 mutations caught; fixed 3 that dereferenced a null capture against the stub. - UI gap tests: §19 wording-rules guard (new), ErrorBoundary no-secret-leak (new), cookie lock toggle + SameSite/expiry form fields + free-tier-usable, ProfilesView unsupportedStores + per-store switch rows, ExportView redaction warnings, SiteAccess per-origin copy. Total ~1900 vitest + 98 .NET + 72 E2E. compile/lint(0)/format/build green; 0 infra-broken; mutation sweeps converged (only equivalent/impossible mutations remain). suite red-by-design until features land. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Final completeness re-audit confirmed all prior gaps closed and found one:
views render an {error && …} branch but no test asserted it paints. Added
tests/ui/errorStates.test.tsx (ProfilesView/CookieEditor/SiteAccess/Settings/
Export) — a deleted error branch now fails the suite (§9.8/§13.4).
The capture-error test exposed a real bug: after a failed capture, refresh()
fired sibling successes that cleared the shared error, silently swallowing
storage/quota failures. Fixed ProfilesView.submitCapture to keep the error
visible and the form open on failure.
vitest 1906 (0 infra-broken) + .NET 98 + E2E 72. compile/lint/format/build green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…2 passphrase (T1)
…nium snippets (T3)
… implemented) The sanity 'unimplemented service' block and 3 messageHandler error-path tests asserted cookies/list throws NotImplementedError — true only while stubbed. cookies/list is the P0 free-forever core feature and is now implemented, so these were rebound to trigger a genuine chrome.cookies.getAll failure via the harness fault-injection control, preserving (and strengthening) the original error-envelope / no-secret-leak / exactly-once-sendResponse assertions. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…arn-saves per contract (T9)
…+ disclosed limits (T12)
…ion (profiles/list now implemented) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rds the message (review)
…T16)
- switchToProfile: snapshot-first-and-persisted, clear, apply, reload; per-store
results; succeeded iff no store failed; IndexedDB always not-captured;
non-active multi-domain origins reported not-captured; UserFacingError on missing id.
- restoreAdditive: additive apply (no clear).
- seam fix: router profiles/capture now persists via saveCapturedProfile.
- harness fidelity: partitionEq treats 'x' and {topLevelSite:'x'} as equal.
- Fix TS5.7 BufferSource / noUncheckedIndexedAccess strictness across crypto, licenseVerifier, webStorageCapture, profileRepository (type-only; runtime unchanged, all 1907 tests green). - Worker: replace Node Buffer with Web-standard atob/btoa base64url so it is tsc-clean under @cloudflare/workers-types and portable (no nodejs_compat). - Apply Prettier formatting across implemented service files. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…iew) - Worker /checkout no longer echoes internal exception text to the caller. - Remove unused listCookies import in switchEngine (0 production lint warnings). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sessionist MVP — service layer implementation (TDD)
Implements the full P0/P1/P2 service layer for the Sessionist MV3 extension so the pre-existing failing test suite passes. All 1907 vitest tests pass; tsc (extension + worker), ESLint (0 errors), Prettier, and
wxt buildare all green.The UI, router, messaging, settings, telemetry, and manifest were already implemented; this PR fills in every stubbed service the test suite specifies, plus the Cloudflare Worker.
What landed (by area)
storageStateJSON with correct cookie mapping (expires, sameSite Lax/Strict/None), origin grouping, sessionStorage/IndexedDB excluded; redaction + Puppeteer/Selenium/cURL snippets.<all_urls>/*://*/*), granted-origins persisted + revocable.How it was built
Decomposed into 16 dependency-ordered pieces built in isolated git worktrees, each: planned → adversarially reviewed → implemented against the test spec → reviewed for correctness/security/test-gaming → integrated with a full-suite checkpoint (zero regressions at each wave).
Reviewer-driven hardening (beyond green tests)
chrome.storage.localis JSON-only and would silently drop it).httpsURL so Secure cookies are actually removed in real Chrome.webStorageCapturefails loud (UserFacingError) instead of returningundefined.UserFacingErrorso the router forwards a useful message (no secret leakage).Buffer) → portable + tsc-clean under@cloudflare/workers-types.Test-suite notes (transparent)
fakeChromepartitionEqnow treats'x'and{topLevelSite:'x'}as equal — a harness-fidelity fix required so the cookie unit tests (object partitionKey) and the CHIPS integration test (string partitionKey) are both satisfiable.Known follow-ups (not blocking; out of MVP scope)
WXT_LICENSE_PUBLIC_KEYmust be injected at release/build time for the in-browser verifier (release-checklist item).partitionKeyis modeled as atopLevelSitestring per the test contract; mapping to Chrome's{topLevelSite}object at thecookies.setboundary is a production hardening item.Verification
🤖 Generated with Claude Code