ReviewOS

zig-utils/zig-js

ABI: format exact received-value type diagnostics

#393
Closed chris opened this 9 days ago ·
9 days ago

Parent: #140 Profiles: #163, #164 Roadmap: #134 Child: #394

Implement the shared pinned Bun__ErrorCode__determineSpecificType diagnostic boundary used by Bun/Home argument errors.

Acceptance:

  • Export the exact shared C ABI and owned BunString result.
  • Match null, undefined, finite/special Number, Boolean, arbitrary BigInt, and described/undescribed Symbol diagnostics.
  • Match callable naming and the 28-code-unit string preview rules, including quote selection, double-quote escaping, ellipsis, UTF-16, and lone surrogates.
  • For objects, perform the exact observable constructor then name lookup and return an instance of name when truthy.
  • Preserve getter/proxy side effects and publish abrupt completion through the existing first-wins VM exception channel without returning a live partial string.
  • Add sibling/foreign VM, allocation failure, ownership/deref, and no-existing-exception replacement tests.
  • Add compiled Home/Bun consumer evidence in Debug and ReleaseSafe.
  • Refresh both exact inventories, #134/#140/#163/#164, README/ABI docs, and CI.

Backward compatibility is intentionally out of scope; implement the clean exact pinned behavior.

Completion dependency

  • #394 — implement the exact Bun__inspect fallback reached when an object constructor result is falsy.
9 days ago

Exact fallback dependency split to #394: Bun's pinned implementation delegates falsy-constructor objects to Bun__inspect. #393 stays open until that child is complete; the core owned-string/type/observable-get boundary is being implemented and evidenced now.

9 days ago

Core boundary landed on main in 18527d73: exact primitive/BigInt/Symbol/callable/string-preview behavior, ordered observable constructor/name coercion, owned WTFStringImpl results, foreign/sibling/first-wins handling, allocation rollback coverage, dual-profile CI wiring, and current docs/inventories.

Evidence:

  • focused Debug: 3/3, zero leaks
  • focused ReleaseSafe: 3/3, zero leaks
  • Home+Bun compiled consumer: Debug pass
  • Home+Bun compiled consumer: ReleaseSafe pass
  • Home: 410/471 private implemented, 61 pending, zero unclassified
  • Bun: 402/461 private implemented, 59 pending, zero unclassified

#393 remains open only for linked child #394: Bun's exact inspector fallback for falsy-constructor objects. Benchmark artifacts and scores are unchanged because this is ABI/correctness work.

9 days ago

Completed on main in 18527d7, 4fd4431, 33eba7c, and 522e19c. The exact received-value formatter and its inspector fallback now have unit, allocation/exception, ownership, compiled Home/Bun consumer, pinned-source audit, Debug, and ReleaseSafe evidence. Private ABI totals remain 410/471 for Home and 402/461 for Bun; this issue closes because its exact boundary and child #394 are complete, not because unrelated pending private exports are being relabeled.

Sign in to comment on this issue.