Skip to content

feat: use readable payload and signature names in signed envelopes - #46

Merged
leviFrosty merged 2 commits into
mainfrom
docs/readable-api-keys
Oct 16, 2026
Merged

leviFrosty merged 2 commits into
mainfrom
docs/readable-api-keys

Conversation

@leviFrosty

Copy link
Copy Markdown
Owner

Summary

  • Signed Buddies and accounts envelopes now use payload and signature instead of p and s.
  • Header names move to x-buddies-payload / x-buddies-signature and x-ww-payload / x-ww-signature.
  • Unsigned ops (invite/fetch, invite/claim, blob/get) take { "payload": … }.
  • Legacy p/s, x-buddies-p/-s, and x-ww-p/-s are still accepted for shipped app builds. When both spellings are present, the long name wins.
  • Docs updated to match: OpenAPI (signedBody tables), docs/buddies-protocol.md, README, and AGENTS.md. AGENTS.md gains an "API design: readable, standard REST" section, and the README gains an open-source/open-API note.
  • Sentry header scrubbing now drops the new x-buddies-* and x-ww-* header names.
  • Verification scripts and the fuzzer use the new names and keep legacy-name cases for the aliases.

Testing

  • Not run in this session. I reviewed the diff stat and patch only, with no test or typecheck output.
  • Unit tests updated in the diff: src/buddies/envelope.test.ts, live.test.ts, relay.test.ts, blobs.test.ts, src/accounts/accounts.test.ts, backup.test.ts (adds a legacy x-ww-p/x-ww-s acceptance case), handoff.test.ts, and src/sentry.test.ts.
  • E2E updated: src/e2e/accounts.e2e.test.ts.
  • To run before merge:
    • pnpm test
    • pnpm exec tsc --noEmit
    • wrangler deploy --dry-run and wrangler deploy --env dev --dry-run
    • pnpm test:e2e (via the verify-ww-api loop)
    • pnpm fuzz:buddies
  • Still needed: confirm that a shipped app build sending p/s still works against the dev worker. Use a real device if App Attest is involved.

- Buddies and accounts signed envelopes now use `payload` and `signature` instead of `p` and `s`
- Headers renamed to `x-buddies-payload`/`x-buddies-signature` and `x-ww-payload`/`x-ww-signature`
- Legacy `p`/`s` fields and `x-buddies-p`/`-s`, `x-ww-p`/`-s` headers still accepted for shipped builds; the long name wins if both are sent
- OpenAPI docs, protocol doc, README, AGENTS.md, and verify scripts updated to the new names
- AGENTS.md and README gain API naming guidance: spell out names, never add new short names
@leviFrosty
leviFrosty force-pushed the docs/readable-api-keys branch from a90a9f6 to 5ddcf5d Compare October 16, 2026 04:02
@leviFrosty
leviFrosty merged commit fb6fb28 into main Oct 16, 2026
1 check passed
leviFrosty added a commit that referenced this pull request Oct 18, 2026
- feat: Supporter status on the server account, kept by RevenueCat webhooks (#51)
- feat: account activity log and signed-in devices (#50)
- feat: attested account sessions with bearer tokens for Buddies and Notes Import (#49)
- feat: move attestation to /attestation/v1 and add readable link paths (#47)
- feat: use readable payload and signature names in signed envelopes (#46)
- docs: trim one-time setup steps from the agent guide (#48)
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