Skip to content

refactor: remove the extension-local payment-card vault - #29

Merged
gcharang merged 2 commits into
devfrom
remove-card-vault
Dec 2, 2026
Merged

gcharang merged 2 commits into
devfrom
remove-card-vault

Conversation

@gcharang

@gcharang gcharang commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Removes the extension-local payment-card vault. Understudy stores no website password, API token or payment data, in the extension or in the service: a user signs in to each website in their own Chrome profile and agents reuse that session; a signed-out site needs the user to sign in again. A consumer may store a username, never a password (owner decision, 2 December 2026).

The vault never shipped: npm's latest is @understudy/protocol 0.8.0 (0.9.0 with the card contracts waits in #25), and the Chrome Web Store record is 0.1.2, still in review. So there is no compatibility shim; the pending changeset and the unreleased 0.2.0 changelog entries drop the vault instead.

What changes

  • Protocol: CardAliasSchema, list_cards, submit_card, cards_result, card_submission_result, the local-card-vault-v1 capability and the sensitive_mode failure reasons are gone; a test proves list_cards and submit_card frames are now rejected.
  • Extension: src/payment/ and the side panel's card enrolment and deletion UI are deleted, with their messages and background handlers. The payment sensitive mode is removed from the session runtime, session manager, profile client and CDP driver. The exact-origin navigation gate in handleFetchRequestPaused still refuses every top-level URL isAllowedTopLevelUrl refuses; only the payment-specific condition goes. A stored assignment marked sensitive by a development build is released through the existing window-release path.
  • Start-up cleanup: every service-worker start calls indexedDB.deleteDatabase("understudy-payment-card-vault") as the first statement of main(), fire-and-forget, outside the store start-up gate; it never rejects and logs a fixed message on error or blocked. A development build that enrolled a card leaves no encrypted card data behind.
  • Backend: the browser_list_cards and browser_submit_card MCP tools, their outcome texts, the capability check in SessionAgent and the card bookkeeping in AccountAgent are removed; the dashboard's storage disclosure names device credentials and profile configuration only.
  • Docs: docs/local-card-vault-security-requirements.md is deleted; READMEs, RUNBOOK, WEBSTORE, both CLAUDE.md maps, the skill, the technical plan, the rollout runbook and DEFERRED.md (which now records the decision) no longer describe a vault.

Deployment notes

  • Merging into dev deploys the staging Worker (deploy.yml). The capability list is a closed enum, so a staging extension built before this change has its device hello closed with 1008 until it is reloaded. Before merging, confirm no staging soak is running; after the staging deploy, reload the staging extensions.
  • Production is unaffected until the next dev → master release.
  • At the next store submission, check that the listing's data-use answers no longer declare financial or payment information.

Test plan

  • CI (ci.yml): install, build packages, typecheck, test, build
  • After the staging deploy: reload a staging extension, pair it, run one semantic capture and one click on an allowed origin

🤖 Generated with Claude Code

gcharang and others added 2 commits December 2, 2026 22:54
Understudy stores no website password, token or payment data: users
sign in to each site in their own browser and agents reuse that
session. The card vault (PAN and CVV in IndexedDB), its protocol-3
commands and capability, the MCP card tools, the payment sensitive
mode and their docs go; the unreleased changeset and 0.2.0 changelog
entries drop the vault. Each service-worker start deletes the old
card database without blocking start-up.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The model-facing texts again say NEVER to type passwords, API keys,
card numbers, card security codes or other credentials, and an
approval covers only the exact action it names. A click write now
covers what the card tests guarded: one execution per grant, an
evicted write marked unknown and never retried, a completed result
replayed on open, and the journal's filter of obsolete records.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@gcharang
gcharang merged commit 171b319 into dev Dec 2, 2026
1 check passed
@gcharang
gcharang deleted the remove-card-vault branch December 2, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant