carlos / platform Public

Slice 1 whole-branch review: operator pause vs per-instance switch needs a ruling Question open

On branch instance-senders-1

The whole-branch review has had two rounds, and the same P1 family appeared in both, so stopping rule 2 applies. Tip: 463a6b352.

History:

  • Round 1 (CODEX-FINDINGS-instance-senders-1-WB-R1.md): 2 P1s and 2 P2s. All four are fixed in bb78b3eb5.
  • Round 2 (-WB-R2.md): P1-1, P2-3 and P2-4 are resolved, the census is APPROVE for every envelope, and the new P2 (a combined pause and cap dropped the cap) is fixed in 463a6b352.

The open P1 (family: an operator pause must enforce the stop it reports, across mode changes). The app-wide pause door reads PerInstance outside the lock that SetPerInstance holds:

  • A concurrent per-instance on can land in between, so the pause writes the app sender's Pause, which per-instance mode ignores.
  • A concurrent per-instance off can land the other way, so the hold write is silently skipped.

In both cases the request reports success and instances keep sending.

Options for Paul:

  • (a) One central operation (recommended, and the reviewer's choice). mail.SetAppPause decides where the pause goes (InstancesPause or the app sender's own pause) and writes it inside the same per-app lock as SetPerInstance. A test parks a pause against a mode switch in both orders. This is a third mechanism in the family, so it needs your go for a third round.
  • (b) Refuse the case up front. Under the lock, an app-wide pause or resume on a per-instance app is refused and points the operator at the per-instance holds. That still needs the lock, and the same small review.
  • (c) Cut app-wide pause for per-instance apps. Operators pause each instance with --host; the plan pause keeps using InstancesPause.

Tasks 1–8 are otherwise done and green on targeted tests. The full gate runs after the ruling.

Paul's ruling (2026-11-30), recorded as his: option (a). One central mail.SetAppPause decides where the pause goes and writes it inside the (account, app) lock SetPerInstance holds. Implemented in the commit after 463a6b352, with a signal-controlled test racing pause against the mode switch in all four orders. A third whole-branch round is approved; if it still finds a P1, I stop and report, with no fourth round without Paul.