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
Commit 6ff24d9
Browse filesBrowse the repository at this point in the historyBrowse files
fix(contracts): normalize rejected cleanup in durable resource disposal (#4346)
* fix(contracts): normalize rejected cleanup in durable resource disposal
The shared asyncDispose adapter let a rejection from the cleanup
operation escape raw. Treat it as a cleanup-pending outcome so the
facet raises its typed error, and keep the original rejection as cause.
Fixes#4334
* fix(contracts): keep disposal normalization total for non-Error rejections
String() throws for values such as Object.create(null), which let a
TypeError escape disposal. Non-Error rejections now keep the facet's
default message and the raw value as cause.
Drop the unused cause parameter from the perf capture assertion: its
cleanup already converts rejections into a cleanup-pending outcome, so
forceCleanup() keeps returning outcomes. Remove the stale #4334 drift
note from the durable resource recovery contract.
* test(capture-kit): pin the default message for non-Error cleanup rejections
Copy file name to clipboardExpand all lines: packages/capture-kit/docs/durable-resource-recovery.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,6 @@ A durable start returns a process-local live handle and a bounded, JSON-safe, ve
4
4
The facet-specific handle provides idempotent `finish()` returning `FinishOutcome`, `forceCleanup()` returning `CleanupOutcome`, and an idempotent `[Symbol.asyncDispose]` adapter that carries no typed result.
5
5
The adapter resolves only for confirmed cleanup or already-missing outcomes.
6
6
Otherwise, it rejects with a normalized `ownership-lost` or `cleanup-pending` error.
7
-
Known drift: today a rejected cleanup operation escapes the shared adapter without normalization (#4334).
8
7
9
8
Each destructive finish or cleanup holds the authoritative ownership lease across fence validation, native side effect, and persisted transition, or uses a token atomically enforced by the native or provider operation.
0 commit comments