Repository navigation
test(core): run Code Mode's executor on plain workerd, and check what core keeps after many runs - #392
Merged
Conversation
nickruigrok
force-pushed
the
feat/code-mode-output-stream
branch
from
October 11, 2026 03:06
f5809b6 to
daf0cb4
Compare
nickruigrok
force-pushed
the
test/code-mode-lifecycle
branch
from
October 11, 2026 03:06
87f19b8 to
541f664
Compare
nickruigrok
force-pushed
the
feat/code-mode-output-stream
branch
from
October 11, 2026 03:28
daf0cb4 to
74e22af
Compare
nickruigrok
force-pushed
the
test/code-mode-lifecycle
branch
from
October 11, 2026 03:28
541f664 to
20bd3da
Compare
nickruigrok
force-pushed
the
feat/code-mode-output-stream
branch
from
October 11, 2026 04:01
74e22af to
c7d3cdd
Compare
nickruigrok
force-pushed
the
test/code-mode-lifecycle
branch
from
October 11, 2026 04:01
20bd3da to
fa819d9
Compare
nickruigrok
force-pushed
the
test/code-mode-lifecycle
branch
from
October 11, 2026 04:14
fa819d9 to
c2a75f3
Compare
nickruigrok
force-pushed
the
feat/code-mode-output-stream
branch
from
October 11, 2026 11:07
2815b1e to
b53544a
Compare
nickruigrok
force-pushed
the
test/code-mode-lifecycle
branch
from
October 11, 2026 11:07
c2a75f3 to
77050d1
Compare
nickruigrok
force-pushed
the
feat/code-mode-output-stream
branch
from
October 11, 2026 11:32
b53544a to
bb17abe
Compare
nickruigrok
force-pushed
the
test/code-mode-lifecycle
branch
from
October 11, 2026 11:32
77050d1 to
d90f191
Compare
nickruigrok
force-pushed
the
feat/code-mode-output-stream
branch
from
October 11, 2026 12:04
bb17abe to
8456366
Compare
nickruigrok
force-pushed
the
test/code-mode-lifecycle
branch
from
October 11, 2026 12:04
d90f191 to
ab962fe
Compare
nickruigrok
force-pushed
the
feat/code-mode-output-stream
branch
from
October 11, 2026 12:49
8456366 to
80a69d5
Compare
nickruigrok
force-pushed
the
test/code-mode-lifecycle
branch
from
October 11, 2026 13:09
ab962fe to
b01f3ba
Compare
… plain workerd Each Workspace object now holds the entrypoint and env stubs of its code runs in one measured registry, released when the run ends, and reports what runs hold. A new smoke run serves the same executor with a Worker Loader on plain workerd and checks the module contract, its failures, limits, cancellation, streamed output and the output budget there, and that the runtime records cpu_limit_unsupported. CI runs it next to the on-prem smoke run.
…ly what is read The plain-workerd smoke run bundles its Worker with the Wrangler dry run the on-prem smoke run uses, so a frozen install is all it needs. It retries only a refused connection, within an overall timeout, and checks that a flood keeps its ending and that a run past its time ends at its limit. The handle registry goes: it counted core bookkeeping and disposed nothing, and workerd gives no signal of the isolates or RPC sessions a run leaves (it never calls a loopback entrypoint dispose). What is measured after many runs is core own state: no open lease and no output.
…a run may log A run that logs five thousand lines streams exactly the thousand a run may log, and a flood never streams more. The header says Wrangler only bundles the Worker.
nickruigrok
force-pushed
the
test/code-mode-lifecycle
branch
from
October 11, 2026 13:20
b01f3ba to
1499b35
Compare
nickruigrok
marked this pull request as ready for review
October 11, 2026 13:20
Contributor
Author
|
@greptileai review |
|
…ode Mode smoke run A new test closes more leases than a Workspace object keeps and checks that the oldest go. The smoke run makes its folder and bundles inside the scope that removes it and stops workerd, and reports a signal that ended workerd, whose exit code stays null.
Contributor
Author
|
@greptileai review |
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.
Fifth and last PR of the GRA-349 stack, on top of #390. It runs Code Mode's executor on plain workerd (decision D2) and checks what core keeps after many runs.
Retention: what is measured, and what can't be
[Symbol.dispose]. After 30 calls the counter read 30 opened and 30 still open, and was unchanged 3 s later. The runtime never calls[Symbol.dispose]on these loopback entrypoints.Symbol.disposeto call.HeldHandlesregistry is removed: it counted core's own bookkeeping and disposed nothing.Workspace.codeRunRetention()reads 0 open leases and 0 outputs held, with 40 closed leases (bounded byendedRunsKept). The run records hold 20completed, 10threwand 10load_failed.Plain workerd (D2)
vp run smoke:code-mode(scripts/workerd-code-mode.ts) bundles the samerunCodecore runs into a small Worker (apps/core/test/workerd/code-mode-worker.ts).smoke:workerddoes, so a frozen install is all it needs.workerd serve --experimentaland aworkerLoaderbinding, with no Miniflare.self === null,ctxwith onlywaitUntil, two parallel capability calls)completed, exactly 2 calls takenfetchthrewload_failedthrewrefusedwall_expiredwall_expired, within 5 scancelledcompleted, exactly 1,000 lines streamedthrew, at most 64 KiB, cut with the marker, lines streamed (no more than 1,000), its error ending kept{"runtime":"workerd","cpuLimit":"cpu_limit_unsupported"}.workerdjob, right aftersmoke:workerd.vp install --frozen-lockfile(which leaves noesbuildin the root.bin), thenvp run smoke:code-mode. It passed all 11 cases (the line-cap case came after).Finding for GRA-382 and the on-prem profile. On plain workerd (1.20260921.1), a synchronous busy loop in a loaded Worker holds the thread the host's wall-clock timer needs, so the host never lets go. Until the CPU limit is proven on the deployed profile, on-prem must not offer Code Mode.
Evidence (top of the stack)
vp check: passes.smoke:code-mode: passes, 12 cases (c2a75f3), and 11 cases from a fresh frozen install.check:migrations: passes.