mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-23 15:33:35 +00:00
Replace the two-class completion lifecycle with one rule: once the program returns, every promise still running - race losers, fail-fast stragglers, and fire-and-forget calls alike - is interrupted rather than awaited. Work whose completion matters must be awaited by the program. Waiting for un-awaited work before interrupting observed leftovers could hold the execution open or deadlock it outright: a fire-and- forget chain awaiting a race loser, or queued work needing tool-call permits the losers occupied, blocked a drain that only the pending interruption could unblock. Rejections that settled un-awaited before the return still surface as Success.warnings diagnostics. Give warnings their own output byte budget equal to maxOutputBytes so a budget-consuming value can never starve runtime diagnostics, and state the lifetime rule in the model-facing instructions. Port ten curated Test262 combinator cases (duplicate members, already-settled inputs, ordering, resolve/reject flattening) and cover the timeout- during-cleanup path with a never-settling slow-cleanup harness tool. |
||
|---|---|---|
| .. | ||
| fixtures | ||
| array-callbacks-test262.test.ts | ||
| array-core-test262.test.ts | ||
| codemode.test.ts | ||
| enumeration.test.ts | ||
| LICENSE.test262 | ||
| openapi.test.ts | ||
| parity.test.ts | ||
| promise-test262.test.ts | ||
| promise.test.ts | ||
| signature.test.ts | ||
| stdlib.test.ts | ||
| string-core-test262.test.ts | ||
| string-regexp-test262.test.ts | ||
| string-search-test262.test.ts | ||