Files
reverse-engineering-anything/scripts
morluto a6cbe8b12a feat(providers): bound runOwned work and close by one deadline (#10996)
* feat(providers): bound runOwned work and close by one deadline

* fix(providers): read an expired budget at settle time and keep a caller abort during cleanup

* fix(providers): follow a late close rejection's owner and keep captured output through budget replacements

* fix(providers): track budget expiry apart from the caller, keep replaced work's cleanup, treat empty leases as none

* fix(providers): classify thrown abort reasons, keep recorded failures and follow a late close owner's resources

Work that throws its signal's abort reason (throwIfAborted) is now a
cancellation, so an elapsed budget becomes a timeout and a caller abort stays a
cancellation. A budget cancellation replaced by a timeout or a caller
cancellation keeps the secondary failures it recorded. A late close rejection
that names its own owner now also supplies the retained failure's resources.

* fix(providers): classify only the budget's own abort reason, and follow only a late rejection that reports its own cleanup

A caller's abort reason is opaque, so a thrown value equal to it stays the
work's failure with the caller's cancellation retained; only the budget's typed
OwnerCancellation.deadlineElapsed marks a thrown abort as the budget's. A late
close rejection without unreleased cleanup of its own (such as a cancellation)
no longer confirms release or replaces the fallback resource.

* fix(providers): follow a late close owner that already released, by cleanup ownership not completion

AnalysisError.carriesCleanup owns whether an error ever owned cleanup, apart
from whether it finished. runOwned's late close rejection uses it, so a
producer error released by a concurrent retry still confirms release, while a
cancellation without cleanup keeps the close's lease pending. Uninstall and
SetupCleanupOwner used the same four-clause predicate locally; they now read
the owner.
2026-11-15 19:36:38 +08:00
..