openapi-chain
Qualification archive

Runtime hardening qualification — 2026-09-24

This is a historical verification record, not a claim about a published npm version. The reviewed baseline was 7d3168b; the verified implementation and installed-consumer fixtures end at 55bf5f4b0236467c0491af5f8c8014436b26dd87. The final documentation commit only records these results and reconciles the size description. No push, remote CI run, npm publication, or release was performed for this remediation.

Findings and focused commits

FindingCommitResult
URL normalization escapes the service pathd9ed95cEncoded-segment contract, delimiter/control rejection, early path validation and parsed URL boundary checks
Missing or partial strict metadata9680d64Construction requires a complete version 1 artifact with valid route/method envelopes
Structural failures invoke extensions first33965b6Query conflicts, malformed parameter containers, undeclared bodies and explicit media errors fail before callbacks
Staged formatting rejects ignored release filesd270271Exclude ignored release documents before invoking the formatter
Exported HTTP method array is mutablef1f27fdFreeze the shared runtime tuple
Form inference rejects recursive JSON schemas92ec60fInfer only form-capable media; wildcard JSON remains usable while unsupported form inference fails closed
Malformed versions and pre-3.2 QUERYebd1cd5Require major.minor.patch syntax and enforce QUERY availability
Cookie-style explode defaultdbdb40eDefault OpenAPI 3.2 cookie style to exploded serialization
Invalid serialization-critical document fields7ea3bf7Reject nonboolean required, missing content, malformed media entries and invalid Encoding header maps
Case-sensitive header type overrides02cdfc1Match runtime header override semantics without changing query case sensitivity
JSON.stringify produces no JSON3764aabShared guard for bodies, parameters and form parts, with preserved causes
Non-record values silently disappear70f1f18Reject Date, Map, Set, Blob and class instances in structured record positions
Encoding style/contentType precedence9f7a094Ignore contentType when explicit RFC6570 fields select style-based encoding
Nested Encoding capability propagationbc67da9Fail closed for applicable nested multipart/form encoding; ignore inapplicable JSON annotations
Core/strict URL and query drift5a35322Share joining, base slash normalization and query suffix handling
Core accepts response extensions without datad7a9822Share status/data contract validation
Caller mutations change existing strict clients8e67721Deep-clone and freeze runtime metadata, including JSON-decoded artifacts
Cross-realm native body detectionf78e5e6Platform brand checks; Chromium iframe coverage for Blob, FormData, URLSearchParams and ArrayBuffer
Media parameters collapse distinct declarations612c964Preserve parameter constraints, rank specificity and reject ambiguous matches
Literal wildcard request media accepted by typesc2b4958Check concrete media at operation-call boundaries on TS6 and TS7
Unstable contract diagnostics753256cTypeError-compatible stable codes, operation context and JSON causes
Safety budget and public contract drift2ad01f1Document the complete runtime contract and 3 KiB gate
Core accepts wildcard media through body extensions0d2e828Reject wildcard Content-Type before body extensions
Installed-package qualification of new contracts55bf5f4Exercise errors and media at runtime, and header/media type checks through installed declarations

Verification

Environment: Node.js 24.16.0, pnpm 10.34.5, macOS arm64, TypeScript 6.0.3 and 7.0.2.

  • pnpm check: passed, including build, formatting, lint, generated-source checks, coverage, CLI, migration, scoped artifacts, installed root/CLI/query consumers, size and type-performance gates.
  • Vitest: 533 tests passed; CLI: 19 tests passed.
  • Coverage: statements 96.52%, branches 94.40%, functions 98.31%, lines 97.15%.
  • Installed root package: ESM and CommonJS, NodeNext declarations under both compilers, and real HTTP.
  • Installed CLI: npm bin, generation/check, scoped generated consumer, browser module isolation and real HTTP.
  • Installed query adapter: independent ESM/CommonJS, TanStack Query and SWR types, HTTP/cache/errors and browser bundle.
  • pnpm test:browser: Chromium passed, including the iframe native-body probe and unreadable status-zero responses. It must run after the build completes; an overlapping rebuild temporarily removed a served module during one attempt, and the subsequent run passed.
  • Core transitive gzip: 3020 B / 3072 B. The intermediate 2560 B budget was insufficient for the complete set of safety checks and shared contracts. Historical 2 KiB measurements remain historical.
  • TS6 and TS7 type-performance scenarios remained within their existing 3,000,000-instantiation and 1,200,000-KB limits, including 5000-route core/strict and scoped cases.

Deliberate boundaries

Applicable nested multipart and URL-encoded encodings require a whole-body extension; this work prevents silent replacement formats rather than claiming full nested-encoding implementation. JSON annotations outside their specified applicability do not block requests.

Strict construction validates the metadata envelope and takes an immutable snapshot. It is not a general OpenAPI or JSON Schema validator. The compiler remains responsible for runtime serialization metadata; the changes do not introduce a broad compiler rewrite.

A runtime schema hash cannot prove that erased TypeScript types came from the same source. Existing CLI generation, artifact provenance and --check remain the build-time consistency mechanism. No decorative runtime hash guarantee was added.

Literal wildcard request media are rejected at typed operation calls. Broad string/template types and JavaScript callers still rely on runtime validation; OperationInputFor describes an input shape rather than proving concrete media.

On this page