Skip to content

impl(pm-stack): ReconcileDO + writer-of-record lease, laptop lease guard, flip runbook (component A slice 6, from #9079) #12831

Open

Description

@dezren39

Design: doc/2026-11-23T03-22-03Z_design_pm-service-workers-edition/2026-11-23T03-22-03Z_design_pm-service-workers-edition.md (PR #12823, merged) — component A of epic #9078, under #9079.

Slice 6 — ReconcileDO + writer-of-record lease

Per design §5 (recommendation PROPOSED in the design; this slice implements it once ratified — if ratification goes another way, this slice is re-scoped on #9079 first): hosted reconcile port in ReconcileDO (same checks, additive-labels rule, and Metadata mirroring as project-reconcile.sh, by specification + conformance fixtures), the per-board writer-of-record lease row {board_id, writer, epoch, heartbeat_at} with epoch re-checks before each mutation batch, the laptop project-reconcile.sh startup lease guard (writer=hosted → read-only verifier mode, drift reports still produced), and the flip/rollback runbook. First flip: one satellite board.

Acceptance

  • Two writers can never both mutate a board in a drill: the non-record writer aborts at its lease check; a mid-run flip stops the running writer at its next epoch re-check.
  • Flip + rollback executed on one satellite board per the runbook, with the verify-only first run recorded.
  • A write from a non-record writer is detectable in reconcile findings via Metadata provenance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/pm-stackpm-stack (Pad/Grist) in developing-today/code

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions