Skip to content

Epic: stub elimination — every registered API is real or fails loud #4919

Description

@proggeramlug

Epic: every registered API is real, or it fails loud

Full-tree stub audit (2026-06-10, runtime + stdlib + api-manifest, verified against current main). A "stub" here means: an API that is registered and callable by name but returns a no-op, a hardcoded/fake value, or silently wrong behavior. For a native compiler, "compiles fine, runs wrong" is the worst failure mode — this epic exists so that by v1.0 no API can lie. (Spun out of the stable-release/versioning discussion; this is a 0.8-line "honest surface" gate.)

Policy (the actual deliverable)

Every API is in exactly one of three states, machine-readable in the manifest and enforced by CI:

  1. Real — behaves like Node.
  2. Partial — documented subset; out-of-subset input throws, never silently degrades.
  3. Stub — flagged stub: true, emits perry_stub_warn on first call, visible in .d.ts/reference docs, throws under PERRY_STRICT_STUBS=1.

Keystone issue: #4918 (manifest stub flag is never set; two stub registries don't know about each other).

Stub inventory — sub-issues

Issue Cluster Severity
#4911 node:dns + node:dgram loopback-only fakes SILENT-LIE
#4912 child_process.spawn() returns null; exec() secretly synchronous LOUD + SILENT-LIE
#4913 Atomics.wait/notify/waitAsync non-blocking fakes (post-#4794) SILENT-LIE
#4914 node:cluster — no socket/listening-handle distribution SILENT-LIE
#4915 Web Streams BYOB readers + ByteLengthQueuingStrategy throw (post-#1545) LOUD
#4916 v8 heap snapshot = empty-but-valid graph; inspector/repl look real SILENT-LIE
#4917 stdlib adapters: ignored options + success-returning no-ops (zlib/http.Agent/mongodb/mysql2/pg/worker_threads/fastify/backoff) mixed
#4918 Keystone: manifest stub: true population + CI cross-check + strict mode infra

Pre-existing open issues that are stub-class (tracked there, listed for completeness)

Found-but-not-filed (intentional / by-design, no action unless policy changes)

Audit notes (claims checked and dropped)

Done when

All eight sub-issues closed (or individually re-triaged with rationale here), and the #4918 CI gate is the thing preventing recurrence — not this list.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    releaseRelease tracking issuesstubsRegistered API that is a no-op / fake / silently wrong — stub-elimination epic

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions