Skip to content

Strata v0.2.1

Pre-release
Pre-release

Choose a tag to compare

@Emagjby Emagjby released this 03 Jan 21:48
· 32 commits to main since this release
Immutable release. Only release title and notes can be modified.

Strata v0.2.1 – Explicit Errors & Production-Safe CLI

Northstar v2.1 hardens Strata’s failure semantics and command-line interface without changing any canonical behavior.

This release formalizes how errors are represented, surfaced, and tested, making Strata safe to embed in production pipelines, CI systems, and automation tooling.

No encoding, hashing, or v1/v2 guarantees were altered.


What’s New

Explicit Error Model

All fallible operations now return structured, inspectable errors.

  • Unified StrataError covering parse, encode, decode, and I/O
  • No panics on user input
  • Errors are values, not strings
  • Precise failure classification

Decode errors include:

  • Invalid tag
  • Unexpected EOF
  • Varint overflow
  • Invalid UTF-8
  • Trailing bytes

Parse errors include:

  • Syntax vs semantic distinction
  • Exact failure span (line, column, offset)
  • Integer range validation
  • Malformed literals

Panic-Free, System-Grade CLI

The CLI now behaves like a real system tool.

  • Stable exit codes:
    • 0 success
    • 1 invalid input
    • 2 I/O failure
    • 100 internal error
  • Human-readable error output to stderr
  • No stack traces
  • No panics

Example:

error: decode failed
reason: invalid tag 0x99
offset: 12

Refined CLI Interface

Commands are fully documented and consistent:

  • compile – source → canonical bytecode
  • decode – inspect bytecode
  • hash – compute canonical hash
  • fmt – inspect source structure

Uniform syntax:

strata <command> <input> [options]

Negative Golden Vectors

Northstar v2.1 introduces negative golden vectors to lock down failure behavior.

Coverage includes:

  • Invalid tag
  • Truncated payloads
  • Varint overflow
  • Invalid UTF-8

Each vector defines:

  • Exact input bytes
  • Expected error kind
  • Failure location

All negative vectors are enforced in CI.


What Did NOT Change

  • Canonical encoding
  • Hashing rules
  • Value types
  • Binary layout
  • v1 and v2 guarantees

All existing data remains valid.
All existing hashes remain identical.


Guarantees

  • Same data → same bytes → same hash
  • Deterministic failures
  • Panic-free public APIs
  • Encoder enforces truth, decoder reveals reality
  • Cross-language readiness preserved

Northstar Status

Northstar v2.1 is complete and frozen.

Future work builds on top:

  • Documentation
  • Tooling
  • Other language implementations
  • Formatting and presentation layers

Strata is now canonical, inspectable, and operationally safe.