Repository navigation
subgraph-meta: named magics and OA schema - #331
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d value Both decoders now print each item's schema (hex or null) and its string under the preimageString rule, and the magics listing pairs every exported u64 with its name against KnownMagic's SCREAMING_SNAKE variant names, followed by KNOWN_MAGICS membership. Corpus gains schema cases: absent, text vs byte string, multibyte, invalid UTF-8, NUL, on dropped and name items, and per item. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The wasm global of an i64 export carries the same bits as a u64 one, so the name and value diff cannot see the type. The runner build now emits its TypeScript definitions and the magics mode requires u64 for every exported 64-bit global. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
After merge,
@rainlanguage/subgraph-metaexports every known magic by its Rust name and gives each decoded item its OA schema, so st0x.deploy, rain.deploy and the OA subgraph can drop their local copies. Refs #328.Live effect: none until a consumer bumps the package · Risk: low (no money path;
decodeaccepts and rejects the same input) · Ships: next package publishDecisions
Bytes, andschemaString()applies thepreimageStringrule, not graph-node'stoString(), because that conversion is lossy and strips NUL.u64export fails the diff againstmagic.rs.Proof
cbor_decode. It covers corpus cases for absent, empty, NUL and invalid UTF-8 schemas, plus 100000 fuzz documents.KNOWN_MAGICS, the schema plumbing andschemaString(): 121 of 123 mutants were killed. A magic retypedi64survived, and theu64check now kills it. The other survivor is equivalent: an extrafail()after a read that already failed.🤖 Generated with Claude Code