Skip to content

softschema 0.2.2

Choose a tag to compare

@jlevy jlevy released this 15 Jun 21:04
6b3f925

softschema 0.2.2 clears the open bug and cleanup backlog: two CLI error-boundary fixes, the uv supply-chain config fix, canonical number rendering with full Python/TypeScript byte-parity, the new softschema prime command, and documentation. The Python (PyPI) and TypeScript (npm) packages ship together at the same version, and every change preserves the golden-corpus + cross-impl byte-parity invariant.

Breaking changes

None (patch release).

New features

  • softschema prime prints the full agent context — the skill operating rules plus the bundled docs index — so an agent can restore context without the source checkout. Byte-identical across both CLIs.

Fixes and hardening

  • CLI error boundary no longer masks internal bugs. The user-error boundary excludes bug-indicator exceptions (Python TypeError/KeyError; JavaScript TypeError/RangeError/ReferenceError), so a programmer bug surfaces as a crash instead of a clean exit 2. In the TypeScript CLI every per-command handler routes through one shared boundary (reportUserError), so a bug thrown deep inside a command crashes too — not only one that reaches the top-level guard. Adds an explicit UsageError class and documents the 0/1/2 exit-code contract.
  • Canonical number rendering (ss-wbnm). A whole-valued number renders without a trailing fraction and without an exponent below 1e21 (2.02, 1.0e1610000000000000000) in error records, synthesized messages, and the echoed values block. The Python side normalizes its floats to match JavaScript's native form, so validation output is byte-identical for every number in the IEEE-754 safe-integer range; the spec scopes the guarantee accordingly.
  • Supply-chain cool-off config. [tool.uv] now uses RFC3339 timestamps with a pinned global cutoff, so the exception applies to local resolution and the lockfile stays stable.

Cleanups

  • Consolidated four near-duplicate object guards into one isMapping helper (TypeScript); the docs command reports the underlying failure; removed a redundant inner try/except in the Python compile.

Testing and release safety

  • Python lint/type/format, pytest (146), TypeScript biome/tsc/publint, bun test (170), the shared golden corpus on Python + Node + Bun (47 / 45 / 47), and the cross-impl byte-parity diff all pass. New regression tests cover the per-command error boundary and canonical number rendering, plus a number-large-whole golden scenario that pins the large-whole-float edge.

Full changelog: https://github.com/jlevy/softschema/blob/v0.2.2/CHANGELOG.md