Repository navigation
Keep engine callbacks and physical enqueueing on the storage boundary - #965
Conversation
|
|
The explicit registered-consumer counterfactual now passes for
This invokes the existing policy validator's registered consumer and counterfactual implementation, selecting the replay evidence explicitly. It verifies one fixture. The hosted policy run passed but reported zero automatic counterfactual cases because the callback-only diff matched no replay guard; the earlier description of that hosted result was too broad and has been corrected. Protected merge |



Qualification of #893 found that selecting the correct connection is insufficient when two connections have open transactions. Laravel registers callbacks on the most recently opened transaction across connections. Lifecycle events and enqueue callbacks can therefore fire on the wrong commit, survive storage rollback, or disappear with an unrelated application rollback. The queue job's own
afterCommitflag can also defer physical enqueueing again after workflow storage has committed.Register engine callbacks inside a nested frame on their owning connection, using Laravel's existing transaction manager to retain outer-commit and savepoint-rollback handling. After the engine's storage boundary permits publication, enqueue task and service-call jobs without a second global deferral. Preserve tracing through deferred service-call publication. Keep existing direct job construction behavior.
Validation so far:
bf1f214f: ten new controls fail with 46 assertions and no errors. Eight cover both connection modes and both commit/rollback orders; two inspect real database queue rows.Delivered in Core 2.15.9, protected merge
84000d4e, exact reviewed tree690992d6aaa7fa435aff7c6e9552b21a84091cd5. All 30 main checks and all 17 published verification jobs pass. The complete local quality cycle passes: unit 5,279 / 74,821 (45 skips, 15 notices), coverage gate 77.60%, PostgreSQL feature 2,551 / 25,150 (18 skips), full style and static analysis.Fresh stock Composer acceptance matches all 1,007 runtime files and eight class origins, passes 22 / 156 on each of PostgreSQL and MySQL, and passes four independent-app-rollback probes. Explicit registered-consumer proof verifies one before/after fixture; the hosted policy alone matched no replay guard.
Docs #416 is deployed and the guide is verified live in all eight locales.
Refs #893; follows #964.