Skip to content

fix(core): preserve atomic input and teardown state - #852

Merged
Exoridus merged 2 commits into
nextfrom
sweep/v020-integration-lifecycle
Oct 18, 2026
Merged

Exoridus merged 2 commits into
nextfrom
sweep/v020-integration-lifecycle

Conversation

@Exoridus

@Exoridus Exoridus commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Pausing from a fixed-step callback could clear discrete input counts before later readers in the same step observed them. A lifecycle abort listener could also reenter application destruction before the shared destroy promise was stored, starting duplicate teardown. Preserve the delivered tick snapshot until the step expires and publish the shared teardown promise before callbacks can reenter.

Focused regressions reproduce both failures before the fixes. The final clean commit passes 230 tests across input delivery, shutdown outcomes, teardown ownership, frame boundaries, cleanup isolation and preparation cancellation. The tests retain next-step expiry, shared promise identity, once-only cleanup and dependency-lifetime assertions.

Stack base: sweep/v020-19-collection-batching at ed2adcfda8eaa0aab599fcc6ac5974d9f3cbd6c9. Head: 34662c81a66800aa0f7919d6d774cc87f0304116. This reconciles input and teardown above the preceding scoped PRs.

Validation: pnpm exec vitest run --project=exojs test/input/input-tick-delivery.test.ts test/core/application-destroy-outcome.test.ts test/core/application-teardown.test.ts test/core/scene-frame-boundary.test.ts test/core/lifecycle-cleanup-isolation.test.ts test/core/application-lifecycle-guards.test.ts test/core/scene-prepare-cancellation.test.ts. Broader candidate qualification and exact-SHA CI evidence are recorded below.

This stacked base requires explicit workflow dispatch because the repository pull-request trigger covers main and next only. Exact-head CI is recorded below.

Published validation evidence

  • Exact head 34662c81a66800aa0f7919d6d774cc87f0304116: CI run 38845665397, completed / success.

Combined stack: d195528c3e265e7d23ba2198813a6324a28c6476, tree c64f60bfd5d5e5a4210281ff6b3bfe120482fac1. Integration qualification: CANDIDATE_QUALIFIED. These combined results belong to that SHA, not to each earlier stack head.

Combined mandatory evidence: 18/18 final CI jobs; normal local pre-push gates and seven selected lanes; Firefox WebGL2; 162 parity checks; 108 full-example smoke passes with one intentionally WebGPU-only skip; all six generated starter builds; 13 hashed candidate tarballs and strict public-package consumers. Existing package versions remain 0.19.1; artifacts are unpublished candidate builds.

Local Firefox WebGPU executed and failed: Core 3 failures, media 4 failures, isolated row timeout. Mesh and video-copy failures also reproduce on the verified base; two full-suite Core timeouts do not reproduce in fresh named runs. CI Firefox WebGPU is separately UNSUPPORTED_HOST. These informational outcomes remain failures/unsupported, not passes. Tiled 1.12.2 authentic exports remain unverified; strict NodeNext declarations remain unsupported.

Firefox WebGPU follows the existing informational policy. An unsupported host is not an executed rendering pass. This branch is unmerged; no release or package publication is implied.

@codecov

codecov Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 543 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
exo-esm-esm 1.4MB 61 bytes (0.0%) ⬆️
exo-esm-modules-esm 3.99MB 116 bytes (0.0%) ⬆️
exo-iife-min-Exo-iife 1.4MB 61 bytes (0.0%) ⬆️
exo-full-iife-Exo-iife 6.53MB 122 bytes (0.0%) ⬆️
exo-iife-Exo-iife 3.88MB 122 bytes (0.0%) ⬆️
exo-full-iife-min-Exo-iife 2.41MB 61 bytes (0.0%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: exo-full-iife-min-Exo-iife

Assets Changed:

Asset Name Size Change Total Size Change (%)
exo.full.iife.min.js 61 bytes 2.41MB 0.0%
view changes for bundle: exo-iife-min-Exo-iife

Assets Changed:

Asset Name Size Change Total Size Change (%)
exo.iife.min.js 61 bytes 1.4MB 0.0%

Files in exo.iife.min.js:

  • ./src/core/Application.ts → Total Size: 71.7kB

  • ./src/input/actions/TickLedger.ts → Total Size: 2.48kB

view changes for bundle: exo-full-iife-Exo-iife

Assets Changed:

Asset Name Size Change Total Size Change (%)
exo.full.iife.js 122 bytes 6.53MB 0.0%
view changes for bundle: exo-iife-Exo-iife

Assets Changed:

Asset Name Size Change Total Size Change (%)
exo.iife.js 122 bytes 3.88MB 0.0%

Files in exo.iife.js:

  • ./src/input/actions/TickLedger.ts → Total Size: 2.48kB

  • ./src/core/Application.ts → Total Size: 71.7kB

view changes for bundle: exo-esm-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
exo.esm.js 61 bytes 1.4MB 0.0%

Files in exo.esm.js:

  • ./src/core/Application.ts → Total Size: 70.15kB

  • ./src/input/actions/TickLedger.ts → Total Size: 2.38kB

view changes for bundle: exo-esm-modules-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
core/Application.js 83 bytes 73.2kB 0.11%
input/actions/TickLedger.js 33 bytes 2.48kB 1.35%

Files in core/Application.js:

  • ./src/core/Application.ts → Total Size: 70.15kB

Files in input/actions/TickLedger.js:

  • ./src/input/actions/TickLedger.ts → Total Size: 2.38kB

@Exoridus
Exoridus force-pushed the sweep/v020-19-collection-batching branch from ed2adcf to f2cf398 Compare October 18, 2026 07:09
Base automatically changed from sweep/v020-19-collection-batching to next October 18, 2026 07:20
@Exoridus
Exoridus force-pushed the sweep/v020-integration-lifecycle branch from 34662c8 to 51410cd Compare October 18, 2026 08:01
@codecov

codecov Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
17205 1 17204 17
View the top 1 failed test(s) by shortest run time
test/core/coroutine-system.test.ts > CoroutineSystem > the budget a body receives > reports the system slice rather than the frame remainder
Stack Traces | 0.0299s run time
AssertionError: expected 0 to be greater than 0
 ❯ test/core/coroutine-system.test.ts:220:23

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@Exoridus
Exoridus merged commit 320e384 into next Oct 18, 2026
28 of 30 checks passed
@Exoridus
Exoridus deleted the sweep/v020-integration-lifecycle branch October 18, 2026 08:25
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.

1 participant