6.6.7 Story tests — engine matrix + loop/idempotency/auto-disable proofs + the author→fire→audit E2E + a11y sweep
Estimate: 30m · Depends on: 6.6.3, 6.6.5, 6.6.6
The story-closing verification (Principle #18; the epic-wide journey stays Story 6.7 — do not duplicate it).
Vitest (integration, real Postgres + the in-process job harness): the engine matrix — every (trigger × config-narrowing) × (condition pass / fail / empty / Epic-5 row) × (action) cell against seeded data, DRIVEN FROM the registries (a new entry without a matrix case fails the suite — the 6.1.6 totality-guard pattern), incl. ordered multi-action rules and per-action failure isolation; the loop-prevention proofs (self-trigger, A-triggers-B via provenance — neither cascades); idempotency (replay / retry per event × rule); failure ops (counter, auto-disable at 10, reset on success + re-enable, the first-failure-only email via the email harness); caps + retention (101st rule / 11th action / 21st row 422s; the sweep's >90d boundary); attribution (revision/comment rows carry the owner).
Playwright E2E (tests/e2e/automation.spec.ts): the recipe journey — create the Bug-to-Done rule in the editor (trigger config + condition row + two actions), fire it from the board, await the async effects (watcher + comment + Success audit row), assert the no-actions path on a non-matching item, drive a Failure (illegal transition target) through to the audit detail + banner, and verify the viewer lockout. a11y: the strict axe sweep over list, editor (every row kind open once), and audit log.
Acceptance criteria
- The registry-driven matrix is green and total; loop, idempotency, failure-ops, caps, retention, and attribution proofs all hold.
- The E2E journey passes green in CI's Playwright lane (async waits via the harness's job-completion signal, not sleeps); the sweep reports zero violations.
- The Story 6.6 verification recipe runs clean top to bottom;
pnpm test:coveragekeeps all 6.6 files ≥90%.
Context refs
- The 6.1.6 registry-driven-matrix pattern; the 1.6 in-process job-test harness + email harness
tests/integration/+tests/e2e/conventions; the E2E harness/OOM/selector memories- The Story 6.6 verification recipe — the checklist this automates
- Story 6.7 (the epic-wide remainder — filter compilation + permissions + automation firing TOGETHER stays there)