Found while validating PR #78 (#67). Pre-existing on main — reproduced identically on main and on the PR branch, against separately created, freshly migrated and seeded Postgres 16 containers, so it is not a regression from that work.
Symptom
npm run test:automation-runtime
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
0 !== 1
at main (scripts/test-automation-runtime.ts:123:10)
scripts/test-automation-runtime.ts:123 asserts result.delivered === 1 after processPendingAutomationRuns(). It returns 0.
The assertions before it pass, so the run and the webhook delivery are both enqueued correctly — exactly one automation_runs row and one webhook_deliveries row for the case. Only the processing step delivers nothing.
Reproduction
- Fresh
postgres:16-alpine and redis:7-alpine containers.
npm run db:migrate && npm run db:seed
DATABASE_URL=... REDIS_URL=... npm run test:automation-runtime
Observed on main at cb42368.
Why it matters
This is one of the suites agents are asked to run as a merge gate for automation and response-action work. While it fails on main, a genuine regression introduced by a future PR is indistinguishable from this baseline failure, so the gate is currently blind for this path.
Likely direction
Worth checking whether the test depends on an unstated local prerequisite (a listening webhook receiver, a BullMQ worker, or specific REDIS_URL semantics) rather than an actual defect in processPendingAutomationRuns. If it needs a prerequisite, the script should assert that prerequisite up front and fail with a clear message instead of a bare count mismatch.
Acceptance criteria
Found while validating PR #78 (#67). Pre-existing on
main— reproduced identically onmainand on the PR branch, against separately created, freshly migrated and seeded Postgres 16 containers, so it is not a regression from that work.Symptom
scripts/test-automation-runtime.ts:123assertsresult.delivered === 1afterprocessPendingAutomationRuns(). It returns0.The assertions before it pass, so the run and the webhook delivery are both enqueued correctly — exactly one
automation_runsrow and onewebhook_deliveriesrow for the case. Only the processing step delivers nothing.Reproduction
postgres:16-alpineandredis:7-alpinecontainers.npm run db:migrate && npm run db:seedDATABASE_URL=... REDIS_URL=... npm run test:automation-runtimeObserved on
mainatcb42368.Why it matters
This is one of the suites agents are asked to run as a merge gate for automation and response-action work. While it fails on
main, a genuine regression introduced by a future PR is indistinguishable from this baseline failure, so the gate is currently blind for this path.Likely direction
Worth checking whether the test depends on an unstated local prerequisite (a listening webhook receiver, a BullMQ worker, or specific
REDIS_URLsemantics) rather than an actual defect inprocessPendingAutomationRuns. If it needs a prerequisite, the script should assert that prerequisite up front and fail with a clear message instead of a bare count mismatch.Acceptance criteria
npm run test:automation-runtimeeither passes from a clean, documented starting state or fails with an explicit message naming the missing prerequisite.processPendingAutomationRunsis found, it is fixed with a regression test.