You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(server): cancellation can leave committed child events unpublished #475
A provider or child task can commit its terminal event and then be cancelled before subscribers receive it. The database records completion, but a parent task or connected client can continue to show running work.
Source confirmation: at LastCode c909106a31be7aa452a31fce86bd32d47716fadb, apps/server/src/orchestration-v2/EventSink.ts:276 uses Effect.suspend around sql.withTransaction(...).pipe(Effect.tap(publish)). Only acquiring the publication lane is uninterruptible; publication after commit is still interruptible. Upstream fixes this exact boundary in 30fd973de3eda7e40ea3617baf93bc3f8ac324a9 (upstream change). That fix is absent from this LastCode baseline.
Deterministic reproduction for a repair PR:
Subscribe to committed/live events and arrange a barrier immediately after the transaction commits, before publication.
Write a terminal child-run event, reach the barrier, then interrupt the writer.
Read the persisted event and wait for the subscriber notification. The persisted event exists, while publication can be lost.
Expected: once a transaction commits, all subscribers receive its events in commit order before writer cancellation completes. Cancellation before commit must still roll back.
Adapt the upstream uninterruptible commit/publication boundary while preserving LastCode run-outcome recording and ownership guards. Add the upstream-style barrier test to FoundationPersistence.test.ts and retain delegated completion/restart coverage in DelegatedCompletionDelivery.test.ts.
This issue is confirmed by source and upstream regression/fix evidence. No tests or installed-app reproduction were executed during this research pass. The installed version label was supplied by the user and was not independently validated.
Activity