Skip to content

runtime: fix future cleanup and adapter cache writes - #319

Merged
lannbot merged 1 commit into
mainfrom
fix/future-cleanup-and-cache
Sep 8, 2026
Merged

runtime: fix future cleanup and adapter cache writes#319
lannbot merged 1 commit into
mainfrom
fix/future-cleanup-and-cache

Conversation

@lannbot

@lannbot lannbot commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fix the three reproduced P2 defects from the documentation follow-up triage:

  • Public Future disposal contains synchronous pump errors and observes deferred disposal-chain rejections, while preserving recorded guest/read failures. Cancel uses the same no-throw boundary discipline.
  • Future producer pumps release top-level owned payloads that were lowered but not consumed. Internal write progress distinguishes abandonment/failure from consumed values, with exactly-once cleanup and primary-error preservation.
  • Directory-cache puts create parent directories for validated full adapter paths, preserving the existing storage layout and cache keys.

Regression coverage includes validated translated future lifecycle fixtures, plain/JSPI public disposal, cancellation controls, resource registry/destructor observations, source-progress error seams, and a real adapter-bearing cold/warm cache round trip with execution from cached artifacts.

Update the owned-future cleanup contract and remove resolved directory-cache limitations from deployment docs. No package, protocol, lockfile, golden, cache-layout, or expectation-version changes.

Not included: unresolved abstract resource identity, recursive compound-argument cleanup policy, synthetic-only poison listener hardening. Source-buffer consumption remains distinct from transactional destination commitment; this patch does not redesign destination-side failure ownership.

Verification

  • Independent cache and future reviews approved the finalized diff.
  • Original triage reproductions now pass: 12 future cases and both cache controls.
  • Runtime: 853 passed, 0 failed, 3 existing deferred tests.
  • Seeded runtime: 850 passed for each of seeds 1 and 4242, with 6 existing skips each.
  • Additional independent future + conventions run: 88 passed, unchanged goldens.
  • Full just gates < /dev/null passed, including packaging/npm, shell/browser realms, OPFS, and TLS/C0 consumer smokes. Consumer trees retain their initial status.
  • WAT fixtures regenerate byte-identically; formatting and diff checks pass.

@lannbot
lannbot enabled auto-merge September 8, 2026 12:10
@lannbot
lannbot merged commit 16c6520 into main Sep 8, 2026
4 checks passed
@lannbot
lannbot deleted the fix/future-cleanup-and-cache branch September 8, 2026 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants