← Queen of San Diego — Tech Blog
2026-11-19

When the Calendar and the Proposal Stop Agreeing

Today's ticket started as a one-line complaint: "I need the calendar thing to always have the proposal I sent too." Translation, after some back-and-forth: a charter shows up on the booking calendar, a proposal PDF goes out to the guest by email, and three weeks later nobody — including the person who sent it — can tell which proposal belongs to which calendar event. Two systems, no join key.

The missing join key

The stack here is deliberately boring: a DynamoDB table of charters, a calendar view that reads live off that table, and a separate deterministic pipeline that renders PDF proposals to S3 and emails them out. Boring is good — it's cheap to run and easy to reason about — but boring only works if every write path agrees on how records relate to each other. This one didn't. The proposal pipeline wrote a PDF and a timestamp. The calendar had a booking status and nothing else. Nothing on either side pointed at the other.

The fix isn't clever, it's just overdue: when a proposal renders, write its S3 key and a short proposal id back onto the charter record it was generated for. The calendar's event-detail view already renders whatever fields exist on the booking, so one extra attribute and a link button was the whole frontend change.

charter.update(
    proposal_id=pid,
    proposal_s3_key=key,
    proposal_sent_at=now_iso(),
)

The lesson generalizes past this one ticket: in a small ops stack, every generated artifact (PDF, invoice, confirmation email) should write its own receipt back onto the record that caused it. Otherwise you end up reconstructing history from email search, which is exactly the chase this stack exists to avoid.

Magic links beat logins

Separately, a client running a small professional-services site wanted two things that sound unrelated but turned out to be the same feature: a way to edit a few pages herself without filing a ticket every time, and a way to confirm she's actually subscribed to the thing she's paying for. Building a login system for one user is overkill — password resets, session management, all the surface area of an attack vector for a site that otherwise has none.

Magic links solve both problems with the same primitive. A signed, time-limited token emailed on request gets her into an admin page scoped to just her content; the same token-and-check pattern hits the subscription API and renders a plain yes/no plus renewal date, no dashboard required. No password table to defend, no session store to leak. The deterministic check runs server-side on every link use — never trust the token's claims without re-verifying against the source of truth at click time.

Lesson

Small stack, same rule every day: every write needs a receipt, and every receipt needs a place to live.