[APPS-2792] Add: local-execution resilience tests (Milestone 7) - #492
Draft
tyffical wants to merge 9 commits into
Draft
Conversation
tyffical
force-pushed
the
tiffany.trinh/apps-2792-wire-into-dev-server
branch
2 times, most recently
from
August 24, 2026 16:47
c2676bc to
db2d170
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-local-execution-resilience-tests
branch
4 times, most recently
from
August 24, 2026 20:09
c994af1 to
fe1ce1f
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-wire-into-dev-server
branch
from
August 25, 2026 00:23
ce94528 to
d02d8bd
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-local-execution-resilience-tests
branch
from
August 25, 2026 00:25
fe1ce1f to
8777af3
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-wire-into-dev-server
branch
from
August 25, 2026 01:09
d02d8bd to
d1d88d6
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-local-execution-resilience-tests
branch
from
August 25, 2026 01:10
8777af3 to
91844e5
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-wire-into-dev-server
branch
from
August 25, 2026 04:34
d1d88d6 to
813061b
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-local-execution-resilience-tests
branch
from
August 25, 2026 15:27
91844e5 to
8fa667c
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-wire-into-dev-server
branch
from
August 25, 2026 16:57
96a5e43 to
18c9216
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-local-execution-resilience-tests
branch
from
August 26, 2026 01:51
8fa667c to
28fb51c
Compare
|
✅ All CI checks and tests passed. 🎉 All green!🧪 All tests passed 🔗 Commit SHA: a0d01dd | Docs | View more details | Give us feedback! |
tyffical
force-pushed
the
tiffany.trinh/apps-2792-wire-into-dev-server
branch
3 times, most recently
from
August 26, 2026 02:31
5b24d84 to
570261e
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-local-execution-resilience-tests
branch
from
August 26, 2026 02:39
28fb51c to
7805ce2
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-wire-into-dev-server
branch
from
August 26, 2026 04:28
235b1a5 to
bced83c
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-local-execution-resilience-tests
branch
from
August 26, 2026 04:33
7805ce2 to
7f5e32e
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-wire-into-dev-server
branch
from
August 26, 2026 15:42
bced83c to
b823f05
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-local-execution-resilience-tests
branch
from
August 26, 2026 16:17
7f5e32e to
a2d89c8
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-wire-into-dev-server
branch
from
August 26, 2026 17:28
b823f05 to
68e0026
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-local-execution-resilience-tests
branch
from
August 26, 2026 17:32
a2d89c8 to
a110cb0
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-wire-into-dev-server
branch
from
August 26, 2026 17:56
68e0026 to
60e9fcc
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-local-execution-resilience-tests
branch
from
August 26, 2026 18:10
a110cb0 to
84beda0
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-wire-into-dev-server
branch
3 times, most recently
from
August 27, 2026 16:44
959d0e8 to
d3707a3
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-wire-into-dev-server
branch
8 times, most recently
from
August 27, 2026 22:43
05c85bc to
8a73a78
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-local-execution-resilience-tests
branch
from
August 27, 2026 23:07
ea35a06 to
512d47a
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-wire-into-dev-server
branch
2 times, most recently
from
August 27, 2026 23:52
189f9b3 to
d1bd1c0
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-local-execution-resilience-tests
branch
from
August 28, 2026 01:21
512d47a to
ac2df41
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-wire-into-dev-server
branch
from
August 28, 2026 01:27
8f10bb6 to
e6b3d80
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-local-execution-resilience-tests
branch
from
August 28, 2026 01:28
ac2df41 to
4e21289
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-wire-into-dev-server
branch
from
August 28, 2026 01:46
e6b3d80 to
e3d1864
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-local-execution-resilience-tests
branch
from
August 28, 2026 01:47
4e21289 to
af19a80
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-wire-into-dev-server
branch
from
August 28, 2026 02:02
e3d1864 to
a37c927
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-local-execution-resilience-tests
branch
from
August 28, 2026 02:02
af19a80 to
e3f1b34
Compare
…tion A customer module's own top-level evaluation runs before this execution's box exists, and previously fell back to a plain undefined read instead of failing the way a real Datadog deployment does at that same point. Also reinstalls the accessor if a prior execution's customer code deleted globalThis.$, so that deletion doesn't permanently break every later execution in the same dev-server process.
rollupConfig.mjs's `external` list only matched a dependency's bare specifier exactly, so `rollup/parseAst` (needed by the new dev-server module-graph collector) got bundled instead of externalized despite `rollup` being declared as a dependency. The bundled copy pulls in Rollup's own native-binary platform loader, which throws through `@rollup/plugin-commonjs`'s dynamic-require interop the moment a consumer's real dev server calls it — breaking every published plugin package for real users, not just this repo's own tests. Switched the `external` option to a function that also matches subpath imports (`id === name || id.startsWith(name + '/')`) for every declared dependency and peer dependency. Also drops a stray blank line introduced between a comment and the test it documents in local-execution.test.ts.
The priming loadModule call (needed to populate the module graph for connection-ID collection before the real execution starts) evaluates the entry's real top-level code and runs before executeScriptLocally installs its own hang-detection timeout — so it had no bound of its own. A customer module with a hanging top-level await would wedge the request forever. Wraps it in the same withTimeout helper the rest of this file already uses, now exported for this cross-module use.
…rver output The SSR transform Vite actually runs for a dev-server-only load rewrites every import into a __vite_ssr_import__(...) call and resolves specifiers to absolute paths, which the plain-ImportDeclaration AST search built for a real Rollup build can't parse. Read each module's original source from disk and strip TS/JSX with esbuild in isolation instead, so the parser sees the same untransformed import syntax the production build path already trusts.
tyffical
force-pushed
the
tiffany.trinh/apps-2792-wire-into-dev-server
branch
from
August 28, 2026 03:40
a37c927 to
08daffe
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-local-execution-resilience-tests
branch
from
August 28, 2026 03:41
e3f1b34 to
a0d01dd
Compare
tyffical
force-pushed
the
tiffany.trinh/apps-2792-wire-into-dev-server
branch
from
August 28, 2026 04:04
08daffe to
b8c3563
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
domains/chaos-engineeringtargets Datadog-owned Kubernetes clusters, a mismatch for this in-process, customer-dev-server model.Changes
Promise.racetimeout never gets a chance to fire — it can only settle once the loop finishes on its own.process.exit()can't safely run inside this same Jest process) confirmingprocess.exit()inside the customer function terminates the whole process immediately, bypassingtry/finallycleanup entirely.The third Milestone 7 task ("the queue survives a rejected execution and keeps running") was already covered by an existing test in
local-execution.test.ts, per the Kickoff doc's own checklist.QA Instructions
yarn workspace @dd/tests test:unit packages/plugins/apps/src/vite/local-execution.resilience.test.ts # Expected: 2 passed ✅ VERIFIEDyarn workspace @dd/tests test:unit packages/plugins/apps # Expected: 25 suites / 324 tests passed ✅ VERIFIEDyarn workspace @dd/apps-plugin run typecheck # Expected: clean exit ✅ VERIFIEDBlast Radius
Out of Scope / Follow-ups
worker_threads) to close the confirmed sync-hang andprocess.exit()gapsDocumentation