test: multi-engine convergence harness with side-effect counting #397

Open
opened 2026-08-10 19:28:52 +00:00 by KofTwentyTwo · 0 comments
KofTwentyTwo commented 2026-08-10 19:28:52 +00:00 (Migrated from github.com)

Without this, the largest defect in the design passes its own verification.

Final-state placement convergence is blind to duplicate side effects — ten forwards and one forward produce identical placement sets. N=2 also shows only a single duplicate, which reads as an off-by-one rather than a pattern.

Requirements

  • N ≥ 3 engine instances against one shared stateful server (#384 provides the IMAP side; all three ServerProfiles must be exercised, since Gmail and Exchange take different ladder rungs).
  • Side-effect-counting mocks — an SMTP mock that counts sends and a webhook mock that counts POSTs. Assertion form: exactly one forward across the fleet, not placements match.
  • An interleaving harness that can hold engine A's mutation in flight while engine B acts on stale state — the only way to test conflict handling at all.
  • Assert convergence of placements and flags, after interleaved moves, deletes, and flag changes.
  • Offline throughout: CLAUDE.md forbids live network in tests.

Depends on #384. Should land alongside #390 and #391 rather than after them.

Design: ADR 0002 · review evidence (PR #385)

**Without this, the largest defect in the design passes its own verification.** Final-state placement convergence is **blind to duplicate side effects** — ten forwards and one forward produce identical placement sets. N=2 also shows only a single duplicate, which reads as an off-by-one rather than a pattern. ### Requirements - **N ≥ 3 engine instances** against one shared stateful server (#384 provides the IMAP side; all three `ServerProfile`s must be exercised, since Gmail and Exchange take different ladder rungs). - **Side-effect-counting mocks** — an SMTP mock that counts sends and a webhook mock that counts POSTs. Assertion form: *exactly one forward across the fleet*, not *placements match*. - **An interleaving harness** that can hold engine A's mutation in flight while engine B acts on stale state — the only way to test conflict handling at all. - Assert convergence of placements **and** flags, after interleaved moves, deletes, and flag changes. - Offline throughout: `CLAUDE.md` forbids live network in tests. Depends on #384. Should land alongside #390 and #391 rather than after them. Design: [ADR 0002](https://github.com/KofTwentyTwo/nuncio/blob/dev/docs/adr/0002-multi-engine-sync-model.md) · [review evidence](https://github.com/KofTwentyTwo/nuncio/blob/dev/docs/reviews/2026-08-10-multi-engine-design-review.md) (PR #385)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/nuncio#397