Repository navigation
schema-ruby: land 1 card(s) - #4356
Open
gafferongames wants to merge 18 commits into
Open
gafferongames wants to merge 18 commits into
gafferongames wants to merge 18 commits into
Conversation
The Ruby leg's skeleton, behind the schema_leg_ruby tag: - compiler/target_ruby.go and an empty compiler/carries_ruby.go; new-leg knows the ruby recipe (rb, #). - internal/codegen/ruby: the emitter (a unit that declares nothing emits <pkg>.rb, <pkg>/<Base>.rb and <pkg>/_schema.rb; every declaration is refused by name with the layer that carries it), CheckNames with one rule per refusal, the runtime stub, and the rubyrun helper that runs only the pinned interpreters with the environment filtered and any stderr failing the run. - TestRubySkeleton: the pure half, plus under SCHEMA_SLOW both pins load the tree, keep each unit's errors apart, and agree with the keyword and core-constant lists; each check has a negative control. - Ruby joins the shared reserved-word row (SPEC 4.6) with every hard keyword but next, alias and defined?; the corpus uses next and alias as field names, so the Ruby target refuses those two itself. - make/ruby.mk with test-ruby; test/conformance/ruby answers every surface absent. - the ruby column in docs/PORTING.md and in the three roadmap tables, ROADMAP.md re-rendered; docs/PORT-RUBY.md brought to what was built. By: Rowan Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every row of the blob-kind manifest runs through the plain load, the strict read's form dispatch and the retaining load, and the leg's own plain and retaining saves of Text and Bin, the blob set and null, are decoded by the engine and held to acceptance with nothing unknown. The leg already answers every row, so this is the card's whole change. By: opencode Co-Authored-By: opencode <opencode@users.noreply.github.com>
TestJsPointerTargetBlobKindRefused reads every row of testdata/wire/pointer-target-type/blobkind/MANIFEST.tsv through the JavaScript leg's strict and retaining loads and its region measure. A declared *string or *bytes slot naming a blob record of the other kind refuses wire_damaged whatever the root's closure reaches; a blob record named only from an undeclared field reads and counts twice unknown; a record no pointer reaches refuses. The gate also saves each root's blob set and null, strict and retaining, and decodes both wires with the engine, which must accept them with nothing unknown. A negative control plants the old root-closure "can name" rule in a copy of the generated reader and must read text-names-bytes. The generated runtime already answers every row: it names the two reserved blob ids from the unit, not the root's pointer closure, so no emitted code or source golden moves on this card. By: Rowan Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…read TestCppPointerTargetBlobKindRefused reads every row of testdata/wire/pointer-target-type/blobkind/MANIFEST.tsv and rows 8 to 10 of the pointer-targets feature witnesses through the region, retaining, builder and strict reads and the measure, with the engine as oracle, and decodes the builder, region and retaining saves of Text and Bin with the blob null, empty and set in the engine. A negative control plants the root-closure rule in a copy of the generated reader. By: Rowan Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The measure answers from the framing, so its own verdict is not the read's (docs/SPEC-TABLES.md §6.5): a measure refusal must imply a Load refusal and a Load acceptance a measure acceptance. The negative control logs the planted rule's answers. By: Rowan Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The JavaScript blob-kind gate now encodes rows 8, 9 and 10 of the pointer-target feature witnesses with the engine and requires Load and LoadRetain to refuse them wire_damaged, as the engine does. The writer cases add an empty Text body and an empty Bin data, and the manifest loop ranges over strings.SplitSeq. By: Rowan Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The writer subtest set the blob by schema name, but a record's slot is the field's exported name, so every set save wrote the null wire. It now sets the slot, saves each blob field set, empty and null, and requires the engine to read the field's value back, so a save that drops the blob cannot pass. The pointer-target feature witnesses are held through the leg's three read paths with the engine as oracle, rows 8, 9 and 10 included. By: Rowan Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Ruby target now carries a field or arm named for any Ruby keyword: the generated code reaches a field only through an explicit receiver, a symbol, a hash label or an instance variable, where every keyword is legal (internal/codegen/ruby/fields.go, recordClass). The skeleton's own refusal of keywords is gone, so next and alias, which the shared row leaves out, are carried as written. TestRubySkeleton runs a record whose fields are every keyword under both pinned interpreters with warnings failing the run; its controls write next as a bare local in a copy. Every TestRubySkeleton control is a *-negative-control subtest, run by make ruby-skeleton-negative-control and registered in make/negative-controls.json (ruby-skeleton, nightly with the Ruby pin). Ruby joins the lists the rest of the tree keeps: the roadmap tally header, the reserved-word CLI tests (self, class), the nightly harness tags, the agents map, and SPEC 4.6's language count and list. docs/PORT-RUBY.md states the field access rule and names the cross-leg compiler gates that the packet and table layers owe under the tag. By: Rowan Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The engine's report reason carries a detail after the reason name. By: Rowan Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A red MANIFEST row no longer hides the witness and writer subtests. By: Rowan Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…entity v2 The committed one-record.bin and no-record.bin carried the Batch root's pre-v2 wire hash (0x90bfa7947895d91a). The fixed-file identity v2 amendment (WireLaw 3, FIXED-FORM-ALGORITHM.md "PROSPECTIVE V2 DEFINITIONS DIGEST", VERSIONING.md recorded amendments) gives every fixed root the digest prefix, so the header and per-record hash of an unchanged schema move by design. The generator no longer reproduced the files and the engine refused both as layout_unknown, so TestSpecFixedFormEdges failed under SCHEMA_SLOW. Regenerated with go run ./test/fixed-empty-batch/gen; only the eight-byte hash (header and record) and the CRC-32C trailers change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
schema-main: land 1 card(s)
schema-main: land 2 card(s)
testdata: regenerate the fixed-empty-batch vector under fixed-file identity v2
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.
Opened by nova-sprint's landing. sprint/schema-ruby/rb-p3-skeleton-2