MotirBuilding in public
MOTIR · moooon
onMotir
You’re viewing a public project. Anyone can view it — no account needed. Sign in to submit, upvote, or comment on requests.View-only — you can’t edit work items
MOTIR-373

6.7.2 The combined Epic-6 journey E2E — build a filter, save it, back a widget, gate a viewer, fire a rule; the cross-story seams asserted end-to-end

Done
Description

Estimate: 35m · Depends on: 6.7.1, 6.1.6, 6.2, 6.3, 6.4, 6.5, 6.6

The chain-proof: tests/e2e/epic6-journey.spec.ts, one continuous flow on a fresh small project (not the corpus — this spec is about the seams, not scale), against the standing dev-server harness with the Inngest dev stub.

The build-up (admin): build an advanced filter with a negation row + a custom-field row (the 6.1 builder) → save + name it (6.2) → back a dashboard widget with the saved filter (6.3) → create an automation rule from the built-in action set (6.6) → transition a matching issue → assert the seams in one pass: the rule fires through the job lane exactly once, its action lands through the shipped services (History records it attributed to automation — the 5.5 feed shows it like a real actor; the 5.4 watcher email fires with the dedupe contract intact, actor excluded), and the saved-filter result set + the widget count both track the change.

The gate (non-admin): in a limited/private project (the shipped 6.4 levels), the viewer uses what the level grants, but EVERY Epic-6 admin surface — saved-filter management, dashboard editing, rule admin in the 6.5 hub — is hidden in the UI AND rejected 403 at the API (deep-link + direct request both). These surfaces post-date 6.4.8, so no shipped test covers them.

The unwind: delete the saved filter under the live widget → the designed stale-widget state (the 6.1 stale-referent durability rule one story up), never a crash; disable the rule → a further transition fires nothing; delete the rule → its History entries keep rendering via the deleted-referent fallback (the 5.5.1 grammar).

Vitest companion (tests/integration/epic6-journey.test.ts): the consolidated role × Epic-6-admin-endpoint permission matrix — driven from a route inventory so a new admin endpoint without a matrix row FAILS the suite (the totality-guard pattern) — plus the rule-firing transaction seams the E2E asserts weakly: exactly-once per event under retry, automation actor attribution on the revision rows, no orphan rows after rule delete.

Acceptance criteria

  • The E2E passes the full build-up + gate + unwind with every cross-story assert named above, green in CI's Playwright lane (harness + selector memories respected).
  • The gating asserts are exhaustive over the Epic-6 admin surfaces (UI hidden AND API 403, per surface); the notification assert is exact (one deduped watcher email, zero to the actor).
  • The Vitest matrix is inventory-driven (a new admin route without a row fails); the exactly-once + attribution + no-orphan properties hold at the service layer.
  • No duplication of per-story coverage (spec-header review note mapping each assert to the seam it owns); flake isolation respected.

Context refs

  • The owning closers — 6.1.6, 6.4.8, and the 6.2/6.3/6.5/6.6 closers as they land — what NOT to re-test; their specs as harness/selector exemplars
  • 6.7.1 helpers; the dev email console [EMAIL] grep contract; @inngest/test where the E2E can't reach
  • The seam contracts: the 6.1 stale-referent rule (6.2 saved filters inherit it), the 5.5.1 deleted-referent fallback, the 5.4 notification dedupe, the 6.4 access-level model
  • The E2E harness memories (standing dev server + Inngest stub, OOM-safe); the 2.6.1 route-inventory/totality-guard pattern