Files
triggerdotdev--trigger.dev/internal-packages
Dan Sutton f2ff1a97ac test(run-engine): integration tests for engine.createCancelledRun (Phase F3)
Three containerTest cases covering the novel C1 piece — the rest of
the Phase C work has unit-test coverage already.

1. Writes CANCELED PG row with snapshot fields, completedAt set to
   cancelledAt, error.raw set to cancelReason, runTags / taskIdentifier
   / payload preserved.
2. Emits runCancelled with full payload (id, friendlyId, status, error,
   organization / project / environment ids).
3. Idempotent on double-pop: second call after the first returns the
   existing row id (P2002 caught) and does not re-emit the event.

Real PG + Redis testcontainers. ~15s total.
2026-05-21 09:01:03 +01:00
..