Skip to content

Test out: https://github.com/emberjs/ember.js/pull/21520 - #2212

Open
NullVoxPopuli wants to merge 9 commits into
mainfrom
test-ember-source/all-optimizations
Open

Test out: https://github.com/emberjs/ember.js/pull/21520#2212
NullVoxPopuli wants to merge 9 commits into
mainfrom
test-ember-source/all-optimizations

Conversation

@NullVoxPopuli

Copy link
Copy Markdown
Owner

Testing out

Built from branch all-optimizations via the test-ember-source workflow.

@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

The previous tarball (+5916d3e8) broke the build and lints:

- @ember/runloop stopped exporting _backburner, which ember-qunit and
  @ember/test-helpers import, so the repl app's bundle failed to
  resolve and the ssg prerender crashed on the missing dist.
- The Deferred interface that replaced RSVP's in @ember/application
  used property-syntax resolve/reject (strictly contravariant), making
  App.create() unassignable to setApplication() in the tutorial app's
  type check.

The new tarball restores the _backburner stub (wired to real
pending-render state so settled() still waits), drains scheduled
destroys synchronously on instance destroy (the ssg worker wipes the
document right after destroy() returns), and resolves renderSettled()
via a scheduler flush like classic did.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@NullVoxPopuli-ai-agent

Copy link
Copy Markdown
Collaborator

Fixed — the failures were all in the experimental ember build, now repaired on the all-optimizations branch (emberjs/ember.js#21520, commits a967e87..7077507):

  1. Builds: @ember/runloop stopped exporting _backburner, which ember-qunit and @ember/test-helpers still import. Restored as a stub whose currentInstance reports real pending-render state (so settled() still waits for flushes).
  2. Lints: the Deferred interface that replaced RSVP's used property-syntax resolve/reject (strictly contravariant), making App.create() unassignable to setApplication(). Method syntax restores the bivariance RSVP had.
  3. Prerender crash: with the runloop gone, instance.destroy() no longer tore down its DOM before returning (classic flushed synchronously via join), so the ssg worker wiped the document and the deferred clear() threw on detached nodes. Destroys now drain synchronously at the classic join site.
  4. renderSettled() resolved a microtask too early for the un-awaited-render() pattern; it now resolves via a scheduler flush like classic.

All of limber's builds, lints, and chrome/node/firefox tests pass locally against the regenerated tarball (+70775070).

I can't push to this branch (it lives on the main repo). Two options:

  • re-run the test-ember-source workflow with https://github.com/emberjs/ember.js/pull/21520 — it will rebuild the tarball from the fixed branch and update this PR, or
  • fast-forward from my fork: git fetch git@github.com:NullVoxPopuli-ai-agent/limber.git test-ember-source/all-optimizations && git push origin FETCH_HEAD:test-ember-source/all-optimizations

NullVoxPopuli-ai-agent and others added 2 commits August 9, 2026 14:44
…rner

The tarball moves to all-optimizations+60f0fc94, which drops the
_backburner compat stub entirely: backburner is gone from the framework,
not impersonated. The consumers that imported it are patched via pnpm
patchedDependencies:

- @ember/test-helpers: getSettledState reads the new isRenderPending()
  from @ember/renderer (the synchronous probe its TODO always asked
  for, covering pending flushes and pending destroy drains); the
  backburner timer/instance/debug-info reads collapse to their
  truthful constants.
- ember-qunit: drops the _backburner.DEBUG toggle from
  setupTestIsolationValidation (there is no backburner debug info).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…e/all-optimizations

Update ember-source tarball to all-optimizations+60f0fc94 + pnpm-patch _backburner consumers
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor
Project Preview URL1 Manage
Limber https://test-ember-source-all-optimi.limber-glimdown.pages.dev on Cloudflare
Tutorial https://test-ember-source-all-optimi.limber-glimmer-tutorial.pages.dev on Cloudflare

Logs

Footnotes

  1. if these branch preview links are not working, please check the logs for the commit-based preview link. There is a character limit of 28 for the branch subdomain, as well as some other heuristics, described here for the sake of implementation ease in deploy-preview.yml, that algo has been omitted. The URLs are logged in the wrangler output, but it's hard to get outputs from a matrix job.

NullVoxPopuli-ai-agent and others added 5 commits August 9, 2026 16:55
The @ember/test-helpers patch restructures settled(): the render
condition is event-driven (await renderSettled(), which resolves at the
end of a scheduler flush that left every renderer valid) and only the
poll-only conditions (test waiters, pending requests, transitions)
re-check in a loop.

Quiet is confirmed from a macrotask before resolving: already-queued
task sources (worker messages, zero-delay timers) may re-register
waiters or dirty state, and a microtask-context observation wins the
race against them and settles early -- observed as a real 1-in-4 flake
in ember-repl's Compiled() tests until the setTimeout confirm was
added. waitUntil imposed the same boundary implicitly by scheduling
every check via setTimeout.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The tarball moves to all-optimizations+c09efdc8, which replaces the
isRenderPending() probe with edge reporting: the renderer notifies when
work becomes outstanding and when it completes. The @ember/test-helpers
patch turns those edges into an @ember/test-waiters waiter, so
rendering settles through the same protocol as every other async
source -- isSettled() needs no render clause (its old one is hardwired
false to avoid double-counting), and a stuck render is named in
test-waiter debug output.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Reworks the settledness patches per review on
emberjs/ember-test-helpers#1574: @ember/test-waiters creates a promise
per operation in beginAsync, endAsync resolves it and drops it from the
pending map, and waitersSettled() composes the promises of whatever is
still in flight. @ember/test-helpers' settled() awaits that alongside
renderSettled().

The fallback tick stays for waiters that cannot announce completion
(pull-only Waiter implementations -- waitersSettled returns a
never-resolving promise while one is pending -- plus legacy waiters and
request counters). It is 50ms rather than 10 so it loses the race to a
frame-paced render tick; at 10ms it decided 30 of 117 iterations.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Review follow-ups from emberjs/ember-test-waiters#525: each pending
operation's promise carries its own resolver, so the map holds nothing
but promises and settled() passes them straight to Promise.all -- no
array splat, no wrapper objects, no pointless .then.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…e/all-optimizations

settled() awaits renderSettled() instead of polling the render half
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