Repository navigation
feat(records): bounded immutable records milestone (RFC 0085, IR 1.1.0) - #96
Merged
Merged
Conversation
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds RFC 0085 and implements package-only immutable records, the minimal records milestone from #85.
R(f: e)) reduced by projection, and.ffield access. Single-source grammar and bytes are unchanged.record:sha256:over defining module + name + ordered field schema; field order is significant and a schema change changes the id and the dependentpackageHash.recordstable plusrecord.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.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.RecursionError.Evidence: 190 record/package tests pass; full local suite on the integrated tree 3144 passed / 0 failed; release-conformance harness
cap.records190/190 on two byte-identical runs. Linux matrix: this PR's CI.Closes #85. Part of #67.
🤖 Generated with Claude Code