createInterface accepts history, historySize, removeHistoryDuplicates,
completer, tabSize and escapeCodeTimeout, as Node does for a non-terminal
interface: tabSize, escapeCodeTimeout and historySize are checked in the
constructor's order before the interface opens (ERR_OUT_OF_RANGE and
ERR_INVALID_ARG_VALUE with Node's messages), a completer that is not a
function throws ERR_INVALID_ARG_VALUE, and the values are kept on the
interface. Options may be written as shorthand properties.
rl.history answers the history option itself, or the interface's own
empty array, and historySize, historyIndex, crlfDelay, tabSize,
escapeCodeTimeout, line and terminal read as in Node. 'history'
listeners can be registered; without terminal mode Node records no
history, so they never fire.
npm-static.test.ts ran whole on one shard as an isolated suite: 406 s plain and
519 s sanitized in the cost table, and 672 s on san 2/20 in run 38835202089,
the second-longest job of that run.
skipUnownedTest (tests/harness/shard.ts), called from the suite's beforeEach,
balances the suite's tests across the shards of SCRIPTC_TEST_SHARD by their
measured milliseconds (tests/harness/npm-static-costs.json; an unmeasured test
weighs as much as the median) and skips the tests this shard does not own.
Repeated test.each titles get an occurrence suffix as their key. Without a
shard spec every test runs.
The CI plan runs the suite on every shard in its own vitest process
(caseShardedSideFiles) instead of on one owner. At 20 shards the largest
shares are 113 and 106 s plain and 181 and 137 s sanitized (the two published
Effect generator tests), and about 10 s elsewhere, plus about 11 s per shard to
collect the file. scripts/ci-test-costs.mjs also refreshes the per-test table
and drops side-queue files that no longer run whole.
The sequencer that started three.test.ts first made vitest queue the corpus
files in a different order. In run 38840458162 llvm-differential.test.ts then
started only after differential.test.ts had finished, on all 20 sanitized
Linux shards (none of 20 in run 38835202089, before the sequencer), and the
sanitized corpus process took 581 s at the median instead of 458 s. A local
run with a reporter that logs when each file is queued shows the same order:
without the sequencer the two differential files are queued first and run
side by side.
This removes the sequencer from vitest.config.ts. Placing the longest
side-queue files from the last shard is unchanged.
The release walk gave every ordinary object it reached an entry in an
open-addressing table, to count the references it found to it and the
edges between entries. A region of 1.2M objects that each own an array
spent most of its 200 ms walk inserting into that table.
An object with a single reference, found from one of the region's own
objects or from an object walked like them, has no other referrer, so it
can never be referenced from outside the region. It now gets no entry and
no edges and is walked like the region's own objects, its references into
the region counted as explained. RC-audit builds still enter these objects
and stop when the walk reaches one twice.
Arrays and maps also resolve their elements' release entry point once per
container instead of once per element.
Every region creation, release and pressure retry walked every condemned
region again. A released region that something still refers to was
re-walked on each of them, two or three times per build in a watch loop,
and each walk visits every object of the region.
An attempt that keeps a region now records the references counted to it.
Retries at creation, release and region entry attempt a kept region again
only when that count has changed, or once the thread has allocated 8 MiB
(or the region's size, if larger) in regions since the attempt. That
volume doubles after each attempt that finds the count unchanged, up to
64 times. The volume covers references from ordinary objects the walk
reaches, which can go away without changing the count. The schedule is
per region, so a region that another region's release unblocks is
attempted at once, and the full cycle collection before an attempt runs
only when some region is due.
Adds the region-builds runtime benchmark and a region test for the
schedule.
publish() used to remove each published object from this thread's
cycle-collector candidate buffers after the walk, which loaded every
object's collector header a second time. On graphs larger than the
cache that second pass took about a third of the publish.
scr_pub_mark now takes a buffered object out of its buffer when it marks
it, while the header is in cache: the slot is cleared and its index
recorded. When the publish ends, scr_cyc_pub_fill closes the empty slots
with entries from the ends of the buffers. A refused publish puts each
taken object back in its slot first. After the walk, the log is read only
for dyn containers, the RC audit and LeakSanitizer.
The emitted walkers test null and immortal references (parent links,
values published before) before calling scr_pub_push, and the string
walker checks for ASCII 32 bytes at a time.
Adds the published-graphs runtime benchmark, a cycle collector test for
the take, restore and fill hooks, and corpus program 5702.
The util.format %f branch for boolean and unit arguments discarded the
lowered value and lowered the argument node again as a statement, so
anything lowering builds for the argument (lifted array helpers,
closures) was built twice, one copy dead. It now evaluates the value it
already lowered as a statement, and drops it when evaluating it has no
observable effect.
The same branch now also covers void calls and null | undefined unions,
which Node formats as NaN like undefined and null; they were refused.
Since pushes to main run to completion, each ran the complete suite on macOS:
20 test jobs and about 350 macOS job-minutes per push (run 38831529977), which
at about four pushes an hour exceeded the repository's macOS runners. On
2026-10-16 at 02:40 UTC 41 macOS jobs were running, 95 were queued (the oldest
for 35 minutes), and main runs took over an hour.
Pushes to main now run the darwin suite on macOS, as pull requests do: 6 jobs
and about 100 minutes (run 38835202089). The nightly schedule still runs the
complete suite, and a manual run (workflow_dispatch) with macos_full set runs
it on demand, for example on a release candidate commit. Manual runs get a
concurrency group of their own, so they neither cancel nor wait for the push
run of the same commit. The policy test evaluates the macOS matrix expressions
for each event.
pipeline() accepts a source function (an async generator function called
with { signal }) and a destination async function, following
pipeline.js: the destination's promise value resolves the
stream/promises form and reaches the callback's second argument, and
pipeline() answers a PassThrough for it. A rejected destination destroys
that PassThrough with the reason and fails the pipeline.
Stages may take the { signal } argument: the pipeline creates its own
AbortController when one does, and aborts it when the pipeline finishes
or fails, as finishImpl does. Stage functions take the source and
{ signal } through the closure ABI, and the PassThrough and the value
are released with the pipeline.
The stream unit now links the emitter unit whenever it links, so a
pipeline of functions builds without constructing a stream. An async
generator destination and reading the PassThrough a function destination
returns are refused at compile time.
Encoding an array key added each element's size to a running length
with unchecked arithmetic, and wrote into a fixed stack buffer whenever
the sum fit. A sparse array with a large length (2^29 elements or more)
wrapped the sum on 32-bit targets, so the write landed before the buffer;
on every target the encoder also visited every index of such an array.
Array keys now have at most 65536 elements, and their encoding at most
2^31 - 1 bytes. The size is computed first with sums that cannot wrap,
the buffer is sized to it, and keys over either limit make the lookup or
insert throw a TypeError before anything is read or written. The Node.js
implementation throws the same TypeError for keys of more than 65536
elements. Sparse elements are walked in one pass in index order, and the
index growth computation checks its size arithmetic too.
- http.request accepts `signal`: an abort, or a signal already aborted at
construction, destroys the request with an AbortError (code ABORT_ERR,
the signal's reason as cause). The abort listener is removed when the
request closes, and a value that is not an AbortSignal throws
ERR_INVALID_ARG_TYPE.
- req.destroy(err) reports err as the request's 'error'. Error listeners
receive the Error object through scr_event_error_payload, and
AbortError construction is shared through scr_error_abort.
- https.request accepts `servername`, sent as SNI and used for the
certificate name check.
- server.on('checkContinue' | 'checkExpectation') take Expect requests
instead of 'request', and the client emits 'continue' on a 100
response.
- createServer and http.request accept maxHeaderSize, validated with
Node's ERR_OUT_OF_RANGE messages.
Corpus 5564 and the extended 5559, 5561 and 5562 cover each API.
Readable.from accepts any iterable or async iterable of strings or
Buffers, following from.js: the iterator is taken when the stream is
built, before the options are read, next() is looked up and called on
each pull, a sync iterator's promise values are awaited, and destroy
calls the iterator's throw() and return() only when it has them, reading
each method when close() runs. A close() that fails with a second error
passes an AggregateError of both to the destroy callback, as
aggregateTwoErrors does.
In typed code this covers Sets of strings, Map and Set iterators,
classes whose [Symbol.iterator]() or [Symbol.asyncIterator]() is a
generator method, iterator classes, and async iterator classes, whose
return() runs at the end of the stream and on destroy. In JavaScript it
covers every iterable; an object whose iterator method is a generator
method throws a not-supported error when the stream is built.
The shared worker pool (fs.rename callbacks, zlib callback codecs) had no
handle the event loop could wait on, so the loop noticed a completed job
on a sleep capped at about 1 ms. Every round trip through the pool could
wait up to that long.
A worker now signals a completion wake when it publishes a job: one byte
on a pipe on Linux and macOS, which the loop's poll(2) sleep watches, and
an auto-reset event on Windows, which the loop's sleeps wait on. The
capped sleep remains for a failed pipe or event and for Windows sleeps
that also wait for child processes. WASI runs pool work on the next loop
turn, as before.
When a 'newListener' listener threw while events.once registered its
listeners, the exception escaped the call, the 'error' listener's closure
was never registered or released, and the shared state and its promise
leaked with it. Node registers both listeners inside the promise's
executor: the throw rejects the returned promise, and the listener whose
announcement threw is not added (the event's listener stays when only the
'error' announcement throws).
scr_events_once now takes the pending exception, takes back the listener
whose announcement threw without a 'removeListener' event, releases the
'error' closure when it was never registered, and rejects the promise
with the exception.
InternTable keys can be arrays of numbers or of strings, compared by their
elements: numbers by SameValueZero, strings by content, and holes equal to
each other only. The runtime stores an array key as one byte string that
encodes its elements; the Node.js implementation encodes it into a Map key
the same way.
Replaced table indexes are now freed. Every thread that uses a table
records the epoch it read at the start of each lookup and insert, and an
index retired in an earlier epoch than every recorded one is freed. Worker
threads stop holding retirements back when they exit.
Number indexes keep a tag byte per slot ahead of the key and value pairs,
so a lookup of an absent key reads the dense tag bytes instead of pairs.
getOrInsertComputed lowers an arrow callback with an expression body in
place, with its parameter bound to the key, so interning through
`(key) => new T(...)` creates no closure.
A timers/promises timer that nothing awaited did not keep the process
alive: the loop only ran when the program used the global timers, async
functions or generators. Node keeps a pending ref'd timer's process open,
and the timer heap's exit teardown releases an unref'd one only when the
loop runs, so a pending { ref: false } timer stayed live at exit. Any
timers/promises call now runs the loop.
The node-types fixture no longer attaches .then to the never-firing
unref'd timer, whose suspended continuation the sanitizer's RC audit
reports at exit. Corpus 5620 no longer orders a 1ms timeout against an
immediate, which Node itself does not order from the main module.
A return whose value always throws, such as a call of a function
returning never, ends its block before the union result pair is built.
The payload retain then opened new blocks that referred to values the
ended block never defined, and a conditional's join took an edge from
an arm that never reaches it. The retain now emits nothing in an ended
block, and the join takes edges only from arms that reach it.
Exact constructions (literals, slice, concat results) round their request
to 16 bytes before the size class, so arrays of 2, 4 and 6 slots get one
spare slot and an append right after a copy no longer reallocates. Arrays
of 8-byte slots with their own storage and no sparse entries grow below
the dense cutoff on a path with a constant slot size, and dense copies of
8-byte slots use a constant size.
@scriptc/experimental exports InternTable<K, V>: a named table that every
thread of a scriptc program shares and that each thread has its own copy
of under Node.js. Keys are strings or numbers with Map equality; values are
published (@scriptc/threads) when stored, and the first stored value of a
key is kept. Members are get, has, size, getOrInsert and
getOrInsertComputed.
The runtime table (scr_itable.c) splits each table into 64 segments.
Lookups take no lock and do not write; inserts take a segment's spin lock
for a probe and a few stores, and callbacks run without a lock. Number
tables keep keys and values in the index; string tables keep entries in
segment-owned chunks behind tagged slots. Replaced indexes are kept.
The compiler lowers the class to a synthetic class with one f64 handle
field and five intrinsics, with interned helpers per member and type and
an in-place lowering of getOrInsertComputed that creates a function
expression callback only on a miss. Stored values go through the publish
intrinsic, so their types get the write guard. scriptc refuses names that
are not string literals, one name opened with different type arguments,
and key or value types a table cannot store.
scr_publish walks small graphs in inline buffers and reads
SCRIPTC_PUBLISH_TRACE once, instead of allocating and calling getenv on
every call.
The differential and llvm-differential corpus split their programs across the ten Linux test shards by a hash of
the program's name, so a shard's share of the measured work varied from 565 to 913 s (plain) and 868 to 1358 s
(sanitized). corpusSelect assigns programs longest first to the lightest shard by their measured cost per flavor
(tests/harness/corpus-costs.json: the differential plus llvm-differential milliseconds on a CI runner, medians of
four green main runs), giving 740-741 s and 1098-1099 s. Both harnesses still select identically, so a shard's
compile cache serves both. Programs without a measurement weigh as much as the median one.
scripts/ci-corpus-costs.mjs refreshes the table from downloaded CI shard logs.
Each section of 5615 now starts from the previous section's last
callback. Before, the sections started at fixed delays (20, 100 and 200
ms), so a slow first callback could delay the timers section's report
past the start of the I/O section and print its readFile callbacks on
the timers line. The program's output is unchanged.