Skip to content

v0.2.0

Choose a tag to compare

@3leapsdave 3leapsdave released this 11 Nov 19:12
Immutable release. Only release title and notes can be modified.
v0.2.0
1b365fc

yamlprims v0.2.0

Feature release of yamlprims implementing the spec-v1.5 YAML 1.2.2 Core Schema data-layer writer, checked caller-tree constructors, stack-safe heap-worklist Node operations, symmetric decode_wire over yamlprims-value/1, and strict six-rule RFC 7493 I-JSON projection across Rust (yamlprims), pure Go (github.com/3leaps/yamlprims/yaml), TypeScript WebAssembly (@3leaps/yamlprims), Python PyO3/maturin (yamlprims), and the yamlprims CLI (ADR-0005).

What it ships

  • Deterministic YAML 1.2.2 Core Schema emitter (spec-v1.5 §10.2):
    • Rust (yamlprims): emit, emit_with, emit_all, emit_all_with, CompatQuoting (Yaml11Safe default, CoreOnly), EmitLimits, EmitOptions, and serde::Serialize support (impl serde::Serialize for Value/Node/Document/Mapping/Integer plus to_node, to_string, and to_string_with).
    • Go (github.com/3leaps/yamlprims/yaml): Emit, EmitWith, EmitAll, EmitAllWith, CompatQuoting (CompatQuotingYaml11Safe default, CompatQuotingCoreOnly), EmitLimits, EmitOptions, FromPlain, Marshal, and MarshalWith.
    • TypeScript (@3leaps/yamlprims): dump, dumpAll, fromPlain, defaultEmitLimits, and defaultEmitOptions over the zero-import wasm32-unknown-unknown module (emit_wire, load_ijson).
    • Python (yamlprims): dump, dump_all, from_plain, EmitLimits, and EmitOptions over the cp310-abi3 PyO3 module (GIL detached during native emission and wire decoding).
    • CLI (yamlprims): yamlprims emit (--from-wire, --from-plain, --compat-quoting=yaml11_safe|core_only, --merge=reject|apply|as_key, --max-output-bytes=N).
  • Strict RFC 7493 I-JSON projection (spec-v1.5 §11.6):
    • Rust: encode_ijson, load_ijson, load_ijson_with, load_ijson_bytes, and Options::ijson_default().
    • Go: EncodeIJSON, EncodeIJSONWith, LoadIJSON, LoadIJSONWith, LoadIJSONBytes, and DefaultIJSONOptions().
    • TypeScript & Python: loadIjson / load_ijson.
    • CLI: yamlprims dump --ijson.
    • Enforces the six RFC 7493 rules: single non-empty-stream document (ErrorKind::Type { expected: "single YAML document", found: "empty_stream" } on empty/comment-only streams, MultipleDocuments on >1), IEEE 754 safe integers in [-9_007_199_254_740_991, +9_007_199_254_740_991] (IntegerOutOfRange), finite binary64 floats with -0.0 emitted as 0 (FloatOutOfRange on NaN/±Infinity), String-only mapping keys (ErrorKind::Type { expected: "I-JSON string key", found: "non_string_key" }), mandatory UnknownTags::Reject (UnknownTag on any Tagged node), and rejection of all 66 Unicode noncharacters (U+FDD0..=U+FDEF and U+nFFFE/U+nFFFF across planes 0..=16) in keys and strings (ErrorKind::Type { expected: "RFC 7493 I-JSON string", found: "noncharacter" }).
  • Checked caller-tree construction, stack-safe Node operations, and symmetric decode_wire (spec-v1.5 §3, §6, §11.1):
    • Checked Document::new, Document::with_metadata, Tag::try_new, Tag::with_spelling, Tagged::new, and Node::into_value in Rust (plus aligned Go NewSimpleDocument, TryNewDocumentWithMetadata, TryNewTag, TryNewTagWithSpelling, TryNewTagged).
    • Iterative heap-worklist Drop, Clone, and PartialEq plus depth-bounded Debug (<= 255) for Node, Value, Mapping, Tagged, and Document, preventing call-stack overflow on deep caller-constructed trees on 2 MiB threads.
    • Symmetric Rust decode_wire(json: &str, opts: &Options) -> Result<WireEnvelope, Error> and aligned Go DecodeWire enforcing Limits before materialization.

Conformance & differential parity

  • Pinned structcorpus load and emit round-trip qualification (conformance/pins/pin-6b1266e.json): Both the Rust conformance driver (crates/yamlprims/examples/structcorpus.rs) and the pure-Go conformance driver (cmd/structcorpus-driver) qualify all 20 profile rows of structcorpus commit 6b1266e16676dc456328eb64c0eed028060845c3 across spec-v1.0 through spec-v1.4 (61,366 corpus cases / 90,988 expectations, including load -> emit_all_with -> load semantic identity across every positive value expectation in both drivers, plus 51 synthetic revision 1.4 boundary probes).
  • Four-language byte-for-byte parity (176 in-repo vectors): make crosscheck, make ts-check, and make python-check verify byte-for-byte agreement across Rust, Go, TypeScript, and Python on all 176 in-repo conformance vectors (conformance/vectors/cases.jsonl, SHA-256 91916121ab33318509739adce37e1e45804b20514c66339d1c1a97d028e690dc) covering yamlprims-value/1 wire output, decode_wire round-trip, plain JSON projection, deterministic emit_all output, and encode_ijson projection.

Verification

The yamlprims CLI parses, emits, and projects YAML; it verifies no cryptographic signatures and embeds no keys. To verify this release, verify the annotated OpenPGP-signed v0.2.0 tag and the dual-signed checksum manifests (SHA256SUMS and SHA512SUMS, signed with both Minisign and the OpenPGP release signing subkey) against the public pins committed in the tagged tree (docs/security/ and keys/expected-fingerprints.txt); see docs/security/README.md and RELEASE_CHECKLIST.md.