Skip to content

v0.3.7

Choose a tag to compare

@github-actions github-actions released this 26 Nov 11:18
· 86 commits to main since this release
49b61b0

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 an Error nested 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 Error is rewritten in place and keeps its identity and class wherever it sits (a cause, an AggregateError member, a field of a payload);
    • a payload object, array, Map or Set that 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 Error that 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, Map and Set entries, 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, any waitForTimeout, and a setTimeout or setInterval with 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 Error keeps 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 Error that cannot be rewritten has the right prototype but is not a native error (Error.isError is 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, WeakMap and WeakSet objects 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

  • #356, #364: load-sensitive tests this release does not touch.

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