Skip to content

M5.5 Phase 6: replay a Gmail write session - #48

Merged
bketelsen merged 3 commits into
mainfrom
m55/phase6
Oct 15, 2026
Merged

bketelsen merged 3 commits into
mainfrom
m55/phase6

Conversation

@bketelsen

Copy link
Copy Markdown
Contributor

M5.5 Phase 6 (plan 0009), the part that can land now: a Gmail write session recorded and replayed in make check. The phase itself finishes after the week of your own edits with verify clean (through 2026-10-21). A daily read-only verify is scheduled for that week.

Scope

On your choice, there is no iCloud recording. The repo is public, and a scrubbed trace still keeps dates and counts, while the only iCloud account is yours. Only the throwaway Gmail account is recorded. The plan's done-when now says "Google's write session replays".

Changes

  • engine.Deps.NewUID names the objects maild creates: the UIDs and hrefs of new contacts, events and tasks, and the names that restores and splits take. Without it, names are random UUIDs, as before. Restore IDs stay random.

  • internal/davsession scripts the write session. Each step is one write through the engine and the pass that sends it:

    • a single event made, moved, deleted and restored;
    • a daily series changed in each scope, This Event restored at once;
    • an all-day event made and deleted;
    • a contact made, changed, given a photo, deleted and restored;
    • then everything deleted, and a last pass that changes nothing.

    It finds what it made again by times and IDs, which scrubbing keeps, never by names.

  • tools/davsession records a script against the provider as one of maild's accounts:

    • credentials come from a snapshot of maild's database and the keyring;
    • it syncs into a new store of its own, so the trace starts with a first sync;
    • pimsync's clock is stopped at the start, which goes in a # recorded line.
  • The trace: testdata/replay/google-writes.trace was recorded 2026-10-15 against the throwaway and scrubbed with davrec. Google answered all 208 requests as expected (including its CardDAV 400 on a sync without a token), and the session deleted everything it made.

  • Tests:

    • TestGoogleWriteReplay replays the trace exchange by exchange on the recording's clock, with NewUID taking the names of the recording's creating PUTs.
    • TestGoogleSessionOnDavtest runs the script against davtest, so a broken script fails before it reaches Google.
  • Docs: docs/design/testing.md describes scripted write sessions, and plan 0009 records Phase 6's scope and evidence so far.

Tests

make check passes.

Also

  • maild 7415e34 (with fix(pim): keep what Google's sync calls deleted but still serves #46's fix) is installed. Verify was clean on all three accounts on 2026-10-15; your main Gmail's calendar shows 1384 on each side.
  • davrec left one location in the trace, "Room 4", because ROOM is an iCalendar word (a CUTYPE value). It's the session's own text, so nothing personal leaked, but text made of such words passes the scrubber.

🤖 Generated with Claude Code

bketelsen and others added 3 commits October 14, 2026 23:17
The UIDs and hrefs of new contacts, events and tasks, and the new names
that restores and splits take, come from Deps.NewUID, else random UUIDs
as before. A replay test gives the names a recorded session used, so
its PUTs go to the recorded paths. Restore IDs never reach a server and
stay random.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
internal/davsession scripts the session: a single event made, moved,
deleted and restored; a daily series changed in each scope, This Event
restored at once; an all-day event; a contact changed, given a photo,
deleted and restored; then everything deleted. Each step is one write
and the pass that sends it. tools/davsession recorded it against the
throwaway Gmail account into a new store, on a stopped clock, and davrec
scrubbed the trace. TestGoogleWriteReplay replays it exchange by
exchange. TestGoogleSessionOnDavtest runs the script against davtest,
so a broken script fails before it reaches Google.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@bketelsen
bketelsen merged commit 0fce005 into main Oct 15, 2026
4 checks passed
@bketelsen
bketelsen deleted the m55/phase6 branch October 15, 2026 10:07
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