Files
triggerdotdev--trigger.dev/apps
Dan Sutton 2e2fff2c99 test(webapp): bring mollifier integration tests on phase-3 in line with phase-3 semantics
The three "dual-write" tests inherited from phase-1 were asserting
invariants that phase-3 deliberately abandoned when the mollify path
moved from "buffer.accept + engine.trigger" to "buffer.accept +
synthetic result, drainer replays later":

  - `mollify action triggers dual-write` — rewritten to assert the new
    contract: synthetic `MollifySyntheticResult` (run.friendlyId,
    isCached:false, notice.code = "mollifier.queued"), buffer.accept
    fires with the canonical engine.trigger snapshot, NO Postgres row
    (the run materialises only when the drainer replays).
  - `engine.trigger throwing AFTER buffer.accept` — deleted. Phase-3
    never invokes engine.trigger on the mollify path, so the scenario
    is structurally impossible.
  - `debounce match produces an orphan buffer entry` — deleted. Phase-3's
    C1 debounce bypass at the gate (returns pass_through for debounce
    triggers) means the mollify branch is never entered for debounced
    requests. The C1 invariant is pinned at mollifierGate.test.ts:440;
    duplicating it at the trigger-task layer adds nothing.

Net: 6 mollifier integration tests → 4, all 4 passing, no coverage
gap (gate-level + drainer-handler-level tests own the deleted
scenarios' invariants).
2026-05-18 12:47:52 +01:00
..