Repository navigation
v0.3.7
0.3.7
A third independent review, of 0.3.6, found five gaps (#366); this release closes them and fixes the orphan-reap race (#361). No API change.
Fixed
-
fill()redaction walks the error graph structurally (#367). 0.3.6 copied every payload hanging off an error through JSON, so anErrornested inside a payload came back as a plain object, with the wrong class and a new identity, even when the value appeared nowhere. Now:- an error that does not carry the value is returned untouched;
- every
Erroris rewritten in place and keeps its identity and class wherever it sits (a cause, anAggregateErrormember, a field of a payload); - a payload object, array,
MaporSetthat carries the value is replaced by a scrubbed copy and is never mutated, because it may be an object the caller still uses, such as the command's own parameters; - an
Errorthat cannot be rewritten (frozen, or holding a field that is neither writable nor configurable) is replaced by a scrubbed copy of the same class.
Reached: own properties (an accessor is read once and replaced when it carries the value), array elements,
MapandSetentries, numbers whose digits contain the value. Not reached: property names, private fields, what only a prototype accessor computes, binary buffers. Five of the ten contract tests fail on 0.3.6. -
A reaped orphan browser is gone before its profile is reused (#361). The reap sent SIGKILL and returned at once; it now waits, bounded, for the exit. The race failed two full parallel runs on 2026-11-26 and none of 24 isolated runs.
Docs (the bundled skill)
- Every example parses and accounts for the names it uses: declared in its document's examples, a platform global, or listed in a
// given:line that says what the reader supplies. 13 documents needed imports (compactSnapshot,connect,connectPipe,fs) or// given:lines, and two signature sketches that were not valid JavaScript are now written as calls. The check that enforces this fails on 0.3.6 for those 13 documents and 2 examples. - The fixed-delay check parses each example instead of scanning its text, so a comment, a string, an optional call, a parenthesised delay or a regex in a callback can neither hide a clock wait nor fake one. Its contract is a list:
sleep,Bun.sleep,Bun.sleepSync,scheduler.wait,Atomics.wait, anywaitForTimeout, and asetTimeoutorsetIntervalwith a positive literal delay or a bare-name callback with a non-zero delay. A delay kept in a variable and an alias of a timer are outside it.
Tests
- The navigation fixture releases every resource it acquired, newest first, through every step even when one throws.
Stated plainly
- A value shorter than four characters is removed only as a whole token; that is a readability rule, not a secrecy guarantee for a short value that touches a letter or digit.
- The 0.3.6 note's sentence that each
Errorkeeps its identity and class was wrong for errors nested in payloads; it is corrected there.
Corrections (2026-11-26)
A further review found these statements above wider than what 0.3.7 does (#369); each is fixed or restated in the next release.
- "an accessor is read once": 0.3.7 reads a getter on the error 2 or 3 times.
- "replaced by a scrubbed copy of the same class": the copy of an
Errorthat cannot be rewritten has the right prototype but is not a native error (Error.isErroris false), and it is a different object, so its identity is not kept. A copied array loses its length when it has holes. - "Not reached: ... binary buffers":
Date,RegExp,Promise,WeakMapandWeakSetobjects are also returned as they are, own properties included. - "A reaped orphan browser is gone before its profile is reused": the reap waits up to 2 s after SIGKILL and then proceeds whether or not the process has left.
- The fixed-delay check does not flag a clock call spelled with a string in brackets (
page["waitForTimeout"](50)), and the name check accepts a// given:that sits inside a string and a page global used in host code.
Known, filed
Verification
Full suite on a Linux build box at load 27-37, two runs: 746 pass, 16 skip, 0 fail. Hosted CI: Linux (bun and Node), macOS and Windows.
What's Changed
- fix: walk the error graph structurally, parse the docs examples, release the navigation fixture, wait out a reaped orphan by @code-yeongyu in #367
- chore(release): 0.3.7 by @code-yeongyu in #368
Full Changelog: v0.3.6...v0.3.7