Skip to content

feat(records): bounded immutable records milestone (RFC 0085, IR 1.1.0) - #96

Merged
AetherAI3 merged 2 commits into
mainfrom
claude/nano85-records
Nov 8, 2026
Merged

AetherAI3 merged 2 commits into
mainfrom
claude/nano85-records

Conversation

@AetherAI3

Copy link
Copy Markdown
Owner

Adds RFC 0085 and implements package-only immutable records, the minimal records milestone from #85.

  • Language: record declarations in package modules, exact helper parameter/result types, named-field construction (R(f: e)) reduced by projection, and .f field access. Single-source grammar and bytes are unchanged.
  • Identity: nominal ids record:sha256: over defining module + name + ordered field schema; field order is significant and a schema change changes the id and the dependent packageHash.
  • Executable IR 1.1.0: a records table plus record.input / record.get, with strict loader flow rules. Programs without record inputs still emit byte-identical 1.0.0 IR; pre-1.1 loaders reject 1.1.0 cleanly.
  • Host admission: record inputs are validated before any rule runs, with stable RECORD_INPUT_* codes and paths: wrong schema, stale id, hidden/missing fields, numeric coercion, bool-as-int, non-finite values and over-budget payloads are rejected.
  • Fixed ceilings: 32 fields, depth 8, 128 declarations, 4096 materialized values per frame (counted from the schema before walking), 262,144 string bytes; boundary and boundary+1 tests, no uncaught RecursionError.
  • Compatibility pins: a test freezes 77 existing compile, package, Intent, diagnostic and receipt digests.
  • Enums, results and matching remain deferred; no placeholder opcodes.

Evidence: 190 record/package tests pass; full local suite on the integrated tree 3144 passed / 0 failed; release-conformance harness cap.records 190/190 on two byte-identical runs. Linux matrix: this PR's CI.

Closes #85. Part of #67.

🤖 Generated with Claude Code

AetherAI3 and others added 2 commits November 7, 2026 22:11
Freeze the records-only contract before implementation: package-only
declaration, construction (projection), field access, exact nominal types,
executable IR revision 1.1.0 with loader/VM compatibility policy, nominal
identity hashing, strict host envelopes, fixed ceilings and positioned
diagnostic codes. Enums, results and matching stay deferred.

Adds the executable and invalid golden fixtures, plus compatibility pins
frozen from the base revision for every existing compile, package, Intent,
diagnostic and receipt fixture.

Part of #85. Part of #67.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Package modules can declare nominal immutable records; pure helpers and the
entry strategy use exact record parameter/result types, named-field
construction and field access. Construction is a compile-time value reduced
by projection, so it lowers to existing opcodes with the inline moduleHash.

Host-supplied record inputs compile to executable IR 1.1.0 (records table,
record.input, record.get). The loader recomputes nominal ids, enforces the
32-field / depth-8 ceilings and allows records to flow only into record.get.
The VM admits every record input strictly before evaluating any node:
envelope, stale id, hidden/missing field, numeric coercion, bool-as-int,
non-finite, integer range, cycles, 4096 materialized values and 262144
string bytes, with stable codes and paths.

Programs without record inputs keep emitting 1.0.0 with unchanged bytes;
pinned tests cover every existing compile, package, Intent, diagnostic and
receipt fixture.

Part of #85. Part of #67.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@AetherAI3
AetherAI3 merged commit 740bd6f into main Nov 8, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[P2][hillclimb] Specify and implement a bounded immutable-record language milestone

1 participant