handover

Handover: guest checkout

Read this first. It is self-contained. You should not need anything outside this file plus repo access to continue this work.

0. Orientation (one paragraph)

We are adding a guest checkout path so buyers can complete an order without creating an account. The database layer and the order-total logic are done and tested; the HTTP route that ties them together is stubbed but not wired. This document tells you exactly what is true, what to verify, and what to do next.

1. Identity (verify each; do not trust blindly)

| Fact | Value | Verify | |—|—|—| | Branch | feature/guest-checkout | git rev-parse --abbrev-ref HEAD | | True at commit | a1b2c3d4e5f6 | git log a1b2c3d4e5f6..HEAD --oneline (empty means nothing drifted) | | Open PR | https://github.com/acme/store/pull/812 (draft) | gh pr view 812 | | Worktree? | no | n/a | | Tickets | STORE-441, STORE-442 in progress | grep -n 'In progress' TASKS.md |

2. Current state as verifiable claims

| Claim | Verify | |—|—| | guest_orders table migration exists but has not been applied to preview | ls migrations/ | grep guest_orders | | Order-total logic handles guest tax the same as member tax | npm test -- order-total | | The /api/guest-order route returns a hardcoded stub | grep -n 'STUB' src/routes/guestOrder.ts | | Rate limiting on the route | [belief, unverified] — not yet added, confirm before launch |

3. Canonical sources (ranked; when they disagree, higher wins; code is truth)

  1. This file, for current status and the next action.
  2. docs/CHECKOUT_SPEC.md, for the intended behavior. Its section on saved payment methods is out of date since we descoped that (see section 4).
  3. The tests in test/guest-checkout/, for the contract the code actually meets.

4. What changed since the spec was written (do not rebuild these)

5. Negative knowledge (the irreducible core — if you must cut length, cut this last)

6. Next action

  1. Run the pending migration on the preview database, then point the /api/guest-order route at the new table (replace the stub). This is also the header first_action.
  2. Add rate limiting to the route (the one unverified claim in section 2).
  3. Flip PR 812 out of draft once verify_cmd passes.

7. Open questions / blocked on user

8. Verify the whole thing still holds

npm test -- guest-checkout && npm run typecheck