Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
b6455a1
fix(http): copy body chunks as they arrive
eliahilse Oct 20, 2026
7b90581
fix(http): copy Buffer chunks too
eliahilse Oct 20, 2026
9b8ee58
fix(http): coded errors for JSON and unreadable bodies, bodyless resp…
eliahilse Oct 20, 2026
87f4730
fix(columnar): report deflate hook failures as EncodeError "packed"
eliahilse Oct 20, 2026
cdb77b8
fix(zod): apply validate checks once per round trip
eliahilse Oct 20, 2026
3f54210
fix(canonical): validate input in serializeArtifact
eliahilse Oct 20, 2026
75f548d
fix(package): export ./package.json
eliahilse Oct 20, 2026
2ef5d83
fix(http): refuse stream chunks that are not bytes
eliahilse Oct 20, 2026
c0c1c1e
Merge remote-tracking branch 'origin/fix/read-body-chunks' into fix/h…
eliahilse Oct 20, 2026
82a9690
fix(http): trim only SP and HTAB from Content-Length
eliahilse Oct 20, 2026
b0a3cba
fix(http): read body chunks through the intrinsic typed array getters
eliahilse Oct 20, 2026
82bd18f
fix: keep caught hostile values from escaping as TypeErrors
eliahilse Oct 20, 2026
7936bef
fix(http): read body chunks through the intrinsic typed array getters
eliahilse Oct 20, 2026
30059ca
Merge remote-tracking branch 'origin/fix/read-body-chunks' into fix/h…
eliahilse Oct 20, 2026
c1dadf6
feat(http): settle the hyperfly/http API for 1.0
eliahilse Oct 20, 2026
2b28e09
Merge remote-tracking branch 'origin/fix/http-robustness' into feat/h…
eliahilse Oct 20, 2026
541c96e
fix: skip encoding for bodyless responses and accept deflate output f…
eliahilse Oct 20, 2026
1575ec2
docs(changeset): describe the http-robustness changes for users
eliahilse Oct 20, 2026
6d655ae
Merge origin/main into fix/http-robustness
eliahilse Oct 20, 2026
f37ad31
fix(http): give HEAD the headers GET would get
eliahilse Oct 20, 2026
6c872d0
Merge origin/main into fix/http-robustness
eliahilse Oct 20, 2026
c2016e9
Merge remote-tracking branch 'origin/pr72' into feat/http-api-1.0
eliahilse Oct 21, 2026
98a45ec
Merge remote-tracking branch 'origin/main' into feat/http-api-1.0
eliahilse Oct 21, 2026
88967a6
fix(http): keep respond and encodeFor values from widening the payloa…
eliahilse Oct 21, 2026
7952a44
docs(hyperfly): document every public export for 1.0
eliahilse Oct 21, 2026
8288980
docs: link the stability and security policies from the package READM…
eliahilse Oct 21, 2026
37d680e
Merge remote-tracking branch 'origin/pr91' into docs/jsdoc-1.0
eliahilse Oct 21, 2026
222b3c0
Merge remote-tracking branch 'origin/main' into docs/jsdoc-1.0
eliahilse Oct 21, 2026
025c2ee
docs(hyperfly): document the http constants and option interfaces
eliahilse Oct 21, 2026
d58e224
docs(changeset): describe the JSDoc and stability links
eliahilse Oct 21, 2026
fcb8442
docs(hyperfly): correct the maxByteLength, packed and json descriptions
eliahilse Oct 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/jsdoc-1-0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hyperfly": patch
---

Every public export now has JSDoc, including defaults, error codes and spec references. The README links the stability and security policies.
2 changes: 1 addition & 1 deletion STABILITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ add API and options. Patch releases fix bugs.

Error codes are part of each package's public API. These include `limit`,
`depth`, `ir` and `fingerprint`; TypeScript and Python also expose `options`,
`validation` and `json`. Message text is not part of the contract.
`validation` and `json`, and TypeScript exposes `artifact` for artifact loading. Message text is not part of the contract.
Match on the code rather than the message.

HTTP request failures are also part of the contract: the status codes
Expand Down
2 changes: 2 additions & 0 deletions apps/web/app/docs/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,8 @@ async function getEvents(url: string) {
<li><a href={`${GITHUB}/blob/main/spec/plan-columnar-v5.md`}>plan-columnar-v5</a>: column layouts and profiles.</li>
<li><a href={`${GITHUB}/blob/main/spec/negotiation-v1.md`}>negotiation-v1</a>: HTTP headers, discovery, and rotation.</li>
<li><a href={`${GITHUB}/tree/main/spec/vectors`}>Golden vectors</a>: shared conformance fixtures.</li>
<li><a href={`${GITHUB}/blob/main/STABILITY.md`}>Stability and versioning</a>: what 1.x keeps stable, and the <a href={`${GITHUB}/blob/main/spec/wire-v0.md#stability`}>spec&apos;s stability contract</a>.</li>
<li><a href={`${GITHUB}/blob/main/SECURITY.md`}>Security policy</a>: how to report a vulnerability.</li>
</ul>
</section>
</main>
Expand Down
10 changes: 10 additions & 0 deletions packages/hyperfly/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,16 @@ A future implementation ports against the
[golden vectors](https://github.com/eliahilse/hyperfly/tree/main/spec/vectors), not
against this code.

## Stability

From 1.0.0 this package follows semver. The wire format, IR, fingerprints, error
codes, limits and negotiation are frozen for 1.x
([wire v0, Stability](https://github.com/eliahilse/hyperfly/blob/main/spec/wire-v0.md#stability)).
[STABILITY.md](https://github.com/eliahilse/hyperfly/blob/main/STABILITY.md) covers
what counts as breaking, and
[SECURITY.md](https://github.com/eliahilse/hyperfly/blob/main/SECURITY.md) covers
vulnerability reporting.

## License

[Apache License 2.0](./LICENSE)
2 changes: 2 additions & 0 deletions packages/hyperfly/src/canonical.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export function serializeNode(node: IRNode): string {
}
}

/** Artifact body layout: row v1 or columnar v5 (wire-v0 §5, plan-columnar-v5 §1). */
export type PlanLayout = "row" | "columnar";

const PLAN_VERSION: Record<PlanLayout, number> = { row: 1, columnar: 5 };
Expand Down Expand Up @@ -93,6 +94,7 @@ export function canonicalArtifact(
return profile ? `${head},"profile":${serializeShared(profile.shared)}}` : `${head}}`;
}

/** Validates and serializes canonical artifact text; layout defaults to `row`, with no profile (wire-v0 §5). */
export function serializeArtifact(
ir: IRNode,
layout: PlanLayout = "row",
Expand Down
24 changes: 24 additions & 0 deletions packages/hyperfly/src/codec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,56 @@ import { validateIR, withinStack, type IRNode } from "./ir.js";
import { DEFAULT_LIMITS, Reader, type Limits } from "./reader.js";
import { Writer } from "./writer.js";

/** Envelope magic bytes `0x68 0x66` (wire-v0 §2). */
export const MAGIC = new Uint8Array([0x68, 0x66]);
/** Wire major stored in the envelope and canonical artifact: 1 (wire-v0 §2, wire-v0 §5). */
export const WIRE_VERSION = 1;
/** Envelope header length in bytes, including the 16-byte fingerprint (wire-v0 §2). */
export const HEADER_SIZE = 19;

/** Synchronous raw DEFLATE capabilities for packed string columns (plan-columnar-v5 §3). */
export interface PackHooks {
/** Compresses one raw DEFLATE stream; omission disables packed-column encoding. */
deflate?: (data: Uint8Array) => Uint8Array;
/** Inflates exactly one stream, rejecting trailing bytes and output above maxOutputLength; omission refuses packed columns. */
inflate?: (data: Uint8Array, maxOutputLength: number) => Uint8Array;
}

/** Local codec policy and artifact layout selected at compile time. */
export interface CompileOptions {
/** Resource caps; omitted entries use DEFAULT_LIMITS. Values must be non-negative safe integers (wire-v0 §6). */
limits?: Partial<Limits>;
/** Body layout included in the fingerprint. Default: `row`. */
plan?: PlanLayout;
/** Raw DEFLATE capabilities. Default: defaultPackHooks(); false disables both compression and inflation. */
pack?: PackHooks | false;
/** Shared string-column model, valid only with the columnar plan. Default: none. */
profile?: Profile;
}

/** Frozen codec whose schema, layout and shared profile determine its fingerprint (wire-v0 §5). */
export interface Codec<T = unknown> {
/** Validated, cloned and deeply frozen schema. */
readonly ir: IRNode;
/** Canonical artifact text identifying the wire major, plan, schema and shared profile (wire-v0 §5). */
readonly artifact: string;
/** First 16 SHA-256 bytes of the artifact as 32 lowercase hex characters (wire-v0 §5). */
readonly fingerprint: string;
/** Body layout fixed in the artifact. */
readonly plan: PlanLayout;
/** Validated, cloned and deeply frozen training profile, when supplied. */
readonly profile?: Profile;
/**
* Encode a value into an envelope. A struct value must be an object whose `Object.prototype.toString` tag is
* `"[object Object]"` (plain objects, null-prototype objects and class instances); typed arrays, Map, Set, Date and
* boxed primitives fail with `type`.
*/
encode(value: T): Uint8Array;
/** Checks the envelope header and fingerprint, then decodes the complete body (wire-v0 §2). */
decode(bytes: Uint8Array): T;
/** Encodes a body without the envelope header, enforcing the same value checks and limits. */
encodeBody(value: T): Uint8Array;
/** Decodes a complete body without a header or fingerprint check; rejects trailing bytes. */
decodeBody(bytes: Uint8Array): T;
}

Expand Down Expand Up @@ -158,6 +178,10 @@ function compileArtifact(
return { ir, profile: frozen, artifact: canonicalArtifact(ir, plan, frozen) };
}

/**
* Validates and snapshots an IR and optional profile into a frozen codec (wire-v0 §4, wire-v0 §5).
* Invalid options fail with `options`; invalid IR or profiles fail with `ir`.
*/
export function compileIR<T = unknown>(input: IRNode, options: CompileOptions = {}): Codec<T> {
const { limits, plan, pack: packOptions, profile } = checkedOptions(options);
const { ir, profile: frozenProfile, artifact } = withinStack(() => compileArtifact(input, plan, profile));
Expand Down
37 changes: 36 additions & 1 deletion packages/hyperfly/src/errors.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
/** Stable failure codes. `artifact` means an unreadable discovery response or artifact JSON text; invalid parsed content is `ir`. */
/**
* Stable failure categories; messages are descriptive, not contractual (wire-v0 §9).
* `varint`: non-minimal ULEB128 or more than eight bytes on decode.
* `range`: declared bounds or a numeric value, index, code or derived source is out of range.
* `type`: an encoded value mismatches its type, literal, enum, fixed length or nullability.
* `required`: an encoded struct omits a required field.
* `utf8`: a string contains a lone surrogate on encode or invalid UTF-8 on decode.
* `float`: a float is non-finite, or decode encounters negative zero or non-minimal XOR encoding.
* `marker`: a boolean, nullable marker, column mode or mode parameter is invalid.
* `bitmap`: bitmap or packed padding, null bits, escape bits or patched-frame exceptions are invalid.
* `trailing`: bytes remain after a complete body.
* `truncated`: input ends before a value is complete.
* `depth`: traversal exceeds maxDepth.
* `limit`: an item, byte, amplification or remaining-input bound is exceeded.
* `header`: an envelope is short or has invalid magic or wire major.
* `fingerprint`: an envelope or artifact fingerprint mismatches, or an artifact fingerprint is malformed.
* `ir`: IR or a profile is invalid, or an artifact names an unimplemented wire, layout or plan version.
* `packed`: DEFLATE is invalid, has trailing bytes or produces the wrong inflated length, or a deflate hook fails or returns a non-Uint8Array.
* `unsupported`: inflate capability, a required profile entry or a schema construct is unsupported.
* `artifact`: a discovery response or artifact text cannot be read: a non-2xx status other than a 404 miss, or a body that is unreadable, oversized, non-UTF-8 or not well-formed JSON; parsed content that is not a valid artifact is `ir`.
* `json`: in an adapter, JSON parsing or UTF-8 decoding fails, or a JSON value does not convert under the codec (for example invalid base64 at a bytes position).
* `validation`: schema parsing fails when Zod validation is enabled.
* `options`: compile, training or adapter options are invalid or cannot be read.
*/
export type ErrorCode =
| "varint"
| "range"
Expand All @@ -22,9 +45,12 @@ export type ErrorCode =
| "validation"
| "options";

/** Base error carrying a stable failure code (wire-v0 §9). */
export class HyperflyError extends Error {
/** Machine-readable failure category; message text may vary (wire-v0 §9). */
readonly code: ErrorCode;

/** Sets the failure category and message, preserving an optional cause. */
constructor(code: ErrorCode, message: string, options?: ErrorOptions) {
super(message, options);
this.name = new.target.name;
Expand All @@ -51,24 +77,33 @@ export function messageOf(value: unknown, fallback: string): string {
return typeof value === "string" ? value : fallback;
}

/** Failure to encode a value under the schema, plan or limits (wire-v0 §9). */
export class EncodeError extends HyperflyError {}

/** Failure to decode a body or envelope under the schema, plan or limits (wire-v0 §9). */
export class DecodeError extends HyperflyError {}

/** Decode failure with code `fingerprint` when codec and payload fingerprints differ (wire-v0 §2). */
export class FingerprintMismatchError extends DecodeError {
/** Fingerprint required by the codec or artifact request. */
readonly expected: string;
/** Fingerprint found in the envelope or computed from the loaded artifact. */
readonly actual: string;

/** Records both fingerprints and sets code `fingerprint`. */
constructor(expected: string, actual: string) {
super("fingerprint", `codec fingerprint ${expected} does not match payload ${actual}`);
this.expected = expected;
this.actual = actual;
}
}

/** Schema-adapter failure with code `unsupported` for a construct without an IR encoding (wire-v0 §9). */
export class UnsupportedSchemaError extends HyperflyError {
/** Schema location of the unsupported construct, rooted at `$`. */
readonly path: string;

/** Includes the schema path in the failure message. */
constructor(path: string, message: string) {
super("unsupported", `${path}: ${message}`);
this.path = path;
Expand Down
19 changes: 19 additions & 0 deletions packages/hyperfly/src/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,17 @@ import type { CodecRegistry } from "./registry.js";
import { byteLengthOf, isUint8Array } from "./typed-array.js";
import { INT_MAX, INT_MIN } from "./varint.js";

/** The media type of a binary body (negotiation-v1 §1). */
export const HYPERFLY_MEDIA_TYPE = "application/vnd.hyperfly";
/** The request header listing the fingerprints a client holds, in preference order (negotiation-v1 §1). */
export const ACCEPT_HEADER = "hyperfly-accept";
/** The header naming the fingerprint a binary body was encoded with (negotiation-v1 §1). */
export const CODEC_HEADER = "hyperfly-codec";
/** The advisory header naming an artifact the server can encode with (negotiation-v1 §2). */
export const OFFER_HEADER = "hyperfly-offer";
/** The path prefix artifacts are served under, followed by the fingerprint (negotiation-v1 §3). */
export const WELL_KNOWN_PREFIX = "/.well-known/hyperfly/";
/** The default bound on a request body or a fetched artifact: 1 MiB. */
export const DEFAULT_MAX_BODY_BYTES = 1 << 20;

/** Negotiation §6: client-controlled input, so parsing is bounded. */
Expand Down Expand Up @@ -129,8 +135,11 @@ export function negotiate<T>(
};
}

/** An encoded response: the body and the headers to send with it. */
export interface Encoded {
/** Binary bytes, or JSON text on a fallback. */
body: Uint8Array | string;
/** Content-Type, Vary and, when they apply, Hyperfly-Codec or Hyperfly-Offer. */
headers: Record<string, string>;
}

Expand Down Expand Up @@ -471,8 +480,11 @@ export function serveArtifact(pathname: string, registry: CodecRegistry): Artifa
};
}

/** Options for compiling a loaded artifact. */
export interface LoadArtifactOptions {
/** Decoder and encoder limits for the compiled codec. Default: `DEFAULT_LIMITS`. */
limits?: Partial<Limits>;
/** Deflate/inflate hooks for packed columns, or `false` for none. Default: `defaultPackHooks()`. */
pack?: PackHooks | false;
}

Expand Down Expand Up @@ -555,10 +567,15 @@ export function loadArtifact<T = unknown>(text: string, fingerprint: string, opt
return codec;
}

/** Options for fetching an artifact; the compile options of `LoadArtifactOptions` also apply. */
export interface FetchArtifactOptions extends LoadArtifactOptions {
/** The fetch implementation. Default: `globalThis.fetch`. */
fetch?: typeof fetch;
/** Extra request headers, such as authorization. Default: none. */
headers?: HeadersInit;
/** The bound on the artifact body; a larger body throws code `artifact`. Default: `DEFAULT_MAX_BODY_BYTES`. */
maxBytes?: number;
/** Aborts the request; its reason propagates. Default: none. */
signal?: AbortSignal;
}

Expand Down Expand Up @@ -758,7 +775,9 @@ export function discovery(request: Request, registry: CodecRegistry): Response |
return new Response(body, { status: served.status, headers: served.headers });
}

/** Options for reading a request body. */
export interface ReadBodyOptions {
/** The bound on the request body; a larger body is refused with 413 `too-large`. Default: `DEFAULT_MAX_BODY_BYTES`. */
maxBytes?: number;
}

Expand Down
18 changes: 18 additions & 0 deletions packages/hyperfly/src/ir.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,41 @@ import { HyperflyError, isInstance } from "./errors.js";
import { checkIRNesting } from "./nesting.js";
import { INT_MAX, INT_MIN } from "./varint.js";

/** Constant encoded without payload bytes; numeric literals must be safe integers (wire-v0 §4.2). */
export type LiteralValue = string | number | boolean | null;

/** Portable schema nodes whose declared order and bounds are part of the artifact (wire-v0 §4). */
export type IRNode =
/** Boolean encoded as one byte, zero or one (wire-v0 §4.1). */
| { kind: "bool" }
/** Safe integer with optional inclusive bounds; a declared minimum selects offset encoding (wire-v0 §4.4). */
| { kind: "int"; min?: number; max?: number }
/** Finite binary64 value; encoding canonicalizes negative zero (wire-v0 §4.5). */
| { kind: "float64" }
/** Strict UTF-8 text with a byte-length prefix (wire-v0 §4.6). */
| { kind: "string" }
/** Raw bytes with a length prefix (wire-v0 §4.7). */
| { kind: "bytes" }
/** Exact schema constant with no body bytes (wire-v0 §4.2). */
| { kind: "literal"; value: LiteralValue }
/** Non-empty, unique string members indexed in declaration order (wire-v0 §4.3). */
| { kind: "enum"; members: readonly string[] }
/** Null marker or an inner value; nullable or null-literal inner nodes are invalid (wire-v0 §4.9). */
| { kind: "nullable"; inner: IRNode }
/** Repeated elements; an optional non-negative safe-integer length fixes the count and omits its prefix (wire-v0 §4.8). */
| { kind: "array"; element: IRNode; length?: number }
/** Named fields in declaration order, with presence and null bitmaps as needed (wire-v0 §4.10). */
| { kind: "struct"; fields: readonly IRField[] };

/** Ordered struct field with optional presence and null flags (wire-v0 §4.10). */
export interface IRField {
/** Unique, non-empty Unicode name; `__proto__` and decimal array-index keys are invalid. */
name: string;
/** Encoding of a present, non-null field value. */
type: IRNode;
/** Permits an absent or undefined field and adds a presence bit. Default: false. */
optional?: boolean;
/** Permits null and adds a null bit instead of a nullable-node marker. Default: false. */
nullable?: boolean;
}

Expand Down Expand Up @@ -102,6 +119,7 @@ function checkKeys(value: object, allowed: readonly string[], path: string): voi
}
}

/** Validates closed IR shapes, portable names, bounds and artifact nesting; throws code `ir` (wire-v0 §4). */
export function validateIR(node: IRNode, path = "$"): void {
checkIRNesting(node);
withinStack(() => checkNode(node, path));
Expand Down
4 changes: 4 additions & 0 deletions packages/hyperfly/src/pack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ function zlibInflate(zlib: ZlibLike, data: Uint8Array, maxOutputLength: number):
return new Uint8Array(out.buffer, out.byteOffset, out.length);
}

/**
* Supplies raw DEFLATE hooks using node:zlib when available, with compression level 6.
* Otherwise supplies only the strict JavaScript inflater (plan-columnar-v5 §3).
*/
export function defaultPackHooks(): PackHooks {
const zlib = builtinZlib();
if (!zlib) return { inflate: inflateRaw };
Expand Down
22 changes: 22 additions & 0 deletions packages/hyperfly/src/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,61 @@ import { HyperflyError, isInstance } from "./errors.js";
import { describeValue, hasLoneSurrogate, validateIR, withinStack } from "./ir.js";
import type { IRNode } from "./ir.js";

/** Letter case of grammar digits; decimal tokens require `lower` (plan-columnar-v5 §6.3). */
export type GrammarCase = "lower" | "upper";
/** Radix of a fixed-width numeric grammar token (plan-columnar-v5 §6.3). */
export type GrammarBase = 10 | 16 | 36;

/** Fixed-width unsigned digit run in a string grammar (plan-columnar-v5 §6.3). */
export interface GrammarNum {
/** Radix used to parse and reconstruct digits. */
base: GrammarBase;
/** Digit count: 1–15 for base 10, 1–13 for base 16, or 1–10 for base 36. */
len: number;
/** Case required for alphabetic digits; base 10 uses `lower`. */
case: GrammarCase;
}

/** Non-empty literal text or a numeric run; adjacent literal tokens are invalid (plan-columnar-v5 §6.3). */
export type GrammarToken = { lit: string } | { num: GrammarNum };

/** String lookup driven by an earlier dictionary column in the same eligible array (plan-columnar-v5 §6.4). */
export interface Derivation {
/** Global leaf ordinal of the earlier string column whose profile contains the source dictionary. */
source: number;
/** Reconstructed target strings in source-dictionary order, one per entry. */
values: readonly string[];
}

/** Shared models for one string leaf; version 2 requires at least one model (plan-columnar-v5 §6.2). */
export interface ProfileColumn {
/** Global leaf ordinal across eligible arrays in schema traversal order (plan-columnar-v5 §6.1). */
leaf: number;
/** Ordered, unique strings: 1–16383 entries, with one-based codes and zero reserved for escapes. */
dict?: readonly string[];
/** One to eight tokens with at least one numeric run; requires profile version 2. */
grammar?: readonly GrammarToken[];
/** Mapping from an earlier dictionary column; requires profile version 2. */
derived?: Derivation;
}

/** Shared profile content embedded in the artifact and fingerprint (plan-columnar-v5 §6.5). */
export interface SharedProfile {
/** Non-empty string-column models, sorted by ascending leaf ordinal with no duplicates. */
columns: readonly ProfileColumn[];
}

/** Training document with fingerprinted shared models and optional advisory hints (plan-columnar-v5 §6.2). */
export interface Profile {
/** Document shape: 1 requires dictionaries only; 2 also permits grammars and derivations. */
version: 1 | 2;
/** Models needed to encode and decode shared column modes. */
shared: SharedProfile;
/** Advisory encoder guidance; never part of the artifact or the fingerprint. */
hints?: Record<string, unknown>;
}

/** Maximum entries in one shared dictionary (plan-columnar-v5 §6.2). */
export const MAX_DICT_ENTRIES = 16383;

export interface ColumnRef {
Expand Down Expand Up @@ -173,6 +194,7 @@ function snapshotProfile(profile: Profile): Profile {
}
}

/** Validates IR and profile structure, ordinals and model constraints; throws code `ir` (wire-v0 §9, plan-columnar-v5 §6). */
export function validateProfile(ir: IRNode, profile: Profile): void {
checkedProfile(ir, profile);
}
Expand Down
Loading
Loading