Skip to content

v0.3.0

Latest

Choose a tag to compare

@3leapsdave 3leapsdave released this 18 Nov 19:26
Immutable release. Only release title and notes can be modified.
v0.3.0
42e12ca

yamlprims v0.3.0

Feature release of yamlprims implementing spec-v1.6: bounded byte-slice, reader, and writer ergonomics across Rust and Go, TypeScript parse / stringify plain-value helpers, Python single-pass native PyO3 safe_load / safe_load_all and buffered safe_dump / safe_dump_all, the YAML 1.1 to YAML 1.2.2 Core migration lint (lint_yaml11*, LintYAML11*, lintYaml11, and canonical yamlprims-lint/1), and the frozen yamlprims-cli command-line contract (migrating-from-libyaml.md).

What it ships

  • Bounded stream, byte-slice, and plain-host ergonomics (spec-v1.6 §9, §10.2, §11.2, §11.5):
    • Rust (yamlprims): load_reader, load_reader_with, load_all_reader, load_all_reader_with, from_slice, from_slice_with, from_reader, from_reader_with, to_writer, to_writer_with, emit_writer, emit_writer_with, emit_all_writer, and emit_all_writer_with. Readers read at most Limits::max_input_bytes + 1 bytes before raw-input admission; writers buffer the complete emitted payload under EmitLimits::max_output_bytes before calling writer.write_all, guaranteeing zero bytes written on any validation or limit refusal.
    • Go (github.com/3leaps/yamlprims/yaml): LoadBytesWith, LoadAllBytesWith, LoadReader, LoadReaderWith, LoadAllReader, LoadAllReaderWith, EmitWriter, EmitWriterWith, EmitAllWriter, EmitAllWriterWith, MarshalWriter, MarshalWriterWith, and typed Unmarshal, UnmarshalWith, UnmarshalReader, UnmarshalReaderWith, UnmarshalNode, and UnmarshalNodeWith (with math/big.Int support for full i128::MIN..=u128::MAX integers, default unknown-struct-field rejection, iterative finite pointer-chain unwrapping, and pointer-cycle rejection).
    • Python (yamlprims): Single-pass native PyO3 safe_load, safe_load_all, and buffered safe_dump, safe_dump_all accepting str, bytes, bytearray, memoryview, or .read() / .write() streams, enforcing pre-copy chunk byte caps (max_input_bytes) and materializing plain Python dict, list, str, int (up to 128-bit), float, bool, and None without a JSON round-trip.
    • TypeScript (@3leaps/yamlprims): parse, parseAll, stringify, and stringifyAll plain-value helpers (parse / parseAll return number for integers within ±(2^53 - 1) and raise a type error outside that range; stringify / stringifyAll also accept bigint inputs).
  • YAML 1.1 → YAML 1.2.2 Core migration lint (spec-v1.6 §10.3, §11.7):
    • Rust: LintCode (Yaml11Boolean, Yaml11Number, Yaml11Sexagesimal, Yaml11MergeKey), LintDiagnostic, LintResult, lint_yaml11, lint_yaml11_with, lint_yaml11_bytes, lint_yaml11_reader, lint_yaml11_reader_with, and encode_lint (yamlprims-lint/1).
    • Go: LintCode, LintDiagnostic, LintResult, LintYAML11, LintYAML11With, LintYAML11Bytes, LintYAML11Reader, LintYAML11ReaderWith, EncodeLint, and EncodeLintWith.
    • TypeScript: LintCode, LintDiagnostic, LintResult, lintYaml11, and encodeLint.
    • Python: LINT_CODES, LintDiagnostic, LintResult, lint_yaml11, and encode_lint.
    • Enforces Limits::max_warnings (1,000 default) truncation prior to diagnostic string formatting, fixed-buffer streaming field/message bounds (1,024 / 4,096 bytes), and pre-clone path/diagnostic max_owned_bytes admission with zero-clone error-path transfer on budget abort.
  • Frozen yamlprims-cli command-line contract (spec-v1.6 §10.4):
    • yamlprims [--merge=reject|apply|as_key] check [--lint-yaml11] [--format=text|json], yamlprims [--merge=...] dump [--plain|--ijson] [--max-output-bytes=N], yamlprims [--merge=...] emit [--from-wire|--from-plain] [--compat-quoting=yaml11-safe|core-only] [--max-output-bytes=N] (--max-output-bytes also applies to check --lint-yaml11 --format=json), --version, --help, - (stdin), --, whole-payload buffered stdout, and exit codes 0 / 1 / 2 as specified in spec-v1.6 §10.4.
  • Migration guide:

Conformance & differential parity

  • Pinned structcorpus load and emit round-trip qualification (conformance/pins/pin-b52fcd0.json): Both the Rust (crates/yamlprims/examples/structcorpus.rs) and pure-Go (cmd/structcorpus-driver) conformance drivers qualify all 20 profile rows of structcorpus commit b52fcd090d6879a0bd58ec5a5496c6a4de90504e (61,366 corpus cases / 90,988 expectations across spec-v1.0 through spec-v1.5, plus synthetic revision 1.4/1.5 boundary probes).
  • Four-language byte-for-byte parity (188 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 188 in-repo conformance vectors (conformance/vectors/cases.jsonl) covering yamlprims-value/1 wire output, decode_wire round-trip, plain JSON projection, deterministic emit_all output, encode_ijson projection, and yamlprims-lint/1 encode_lint output.

Verification

The yamlprims CLI parses, lints, emits, and projects YAML; it verifies no cryptographic signatures and embeds no keys. To verify this release, verify the annotated OpenPGP-signed v0.3.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.