Skip to content

Releases

v0.1.5

Choose a tag to compare

@3leapsdave 3leapsdave released this 10 Nov 14:07
Immutable release. Only release title and notes can be modified.
v0.1.5
96cd3c9

v0.1.5

The command-line binary is renamed from canon to canonprims, and gains
three jcs modes: golden vectors, strict NDJSON prefixes framed as one
canonical array, and canonical sets. The helpers behind them are public in
the Rust crate canonprims-json and the Go package canon. The Go package
path, the crate names, the language bindings and the conformance corpus are
unchanged.

What it ships

  • Rust crates canonprims-core and canonprims-json (crates.io).
  • Go module github.com/3leaps/canonprims (package canon), standard
    library only and cgo-free.
  • canonprims command for linux amd64/arm64, darwin arm64 and windows
    amd64/arm64, in archives named canonprims-0.1.5-<platform>.
  • Python package canonprims (PyPI): an abi3 wheel per platform for
    CPython 3.10 and later, on linux amd64/arm64 (manylinux2014, glibc 2.17 or
    later), darwin arm64 and windows amd64/arm64. No source distribution.
  • npm package @3leaps/canonprims: one WebAssembly module with no
    imports, embedded in an ES module with no runtime dependencies. Tested on
    Node.js 20 and 22.

The wheels and the npm package are release assets: built and tested in the
tag workflow, listed in both checksum manifests and covered by both
signatures. The packages on PyPI and npm are these exact files.

Command line

The binary is canonprims; the name in version output and in diagnostics
is canonprims. Its subcommands, flags, output and exit codes are those of
canon 0.1.4 except that numeric options (--max-*, --head) now accept
only ASCII decimal digits: a sign, space or _ is a usage error (exit 2).
Of these, 0.1.4 accepted a leading + (for example +5). New jcs modes:

  • --vector: one canonical JSON object, then a newline:
    {"byte_length":N,"canonical":"...","digest":"sha256:...","scheme":"jcs/rfc8785"}.
    The object is itself canonical; canonical is the canonical bytes as a
    JSON string.
  • --ndjson-array [--head N]: the input is LF-terminated NDJSON lines (no
    CR LF, no empty or whitespace-only line, no unterminated line). Each line
    is canonicalized one level below --max-depth and the lines form one
    canonical array, in order. With --head N exactly the first N lines are
    used: the command answers once they have arrived, so a writer may keep the
    stream open, and nothing after them is parsed. Input is read through a
    buffer, so bytes after the selected lines may be consumed from a pipe or
    shared descriptor. The selected lines must fit in --max-bytes.
  • --sort-set: the array's elements are sorted by their canonical bytes
    (unsigned, byte by byte); two elements with the same canonical bytes are
    refused with duplicate_set_element, and a non-array with not_an_array.
    With --check, the input must already be that sorted canonical set.

--vector, --digest and --check are mutually exclusive;
--ndjson-array cannot be combined with --check; --head requires
--ndjson-array. Numeric options accept only ASCII decimal digits.

Library

Rust canonprims-json: vector, Vector (from_canonical, canonical,
byte_length, digest, scheme, to_json), ndjson_elements,
canonicalize_ndjson, sort_canonical_set, check_canonical_set and
assemble_canonical_set. Go canon: VectorOf, VectorOfCanonical,
Vector, NDJSONElements, CanonicalizeNDJSON, SortCanonicalSet,
CheckCanonicalSet and AssembleCanonicalSet (the zero Go Vector holds
no bytes and its JSON is nil). Their behaviour, including
the order in which defects are reported, is specified in
docs/spec/jcs-rfc8785.md ("Composition helpers").

Code::ALL (Rust) and the binding CODES lists still name only the scheme
codes; the two set codes are in Code::SET.

Release machinery

  • The release workflow packages the canonprims binary as
    canonprims-X.Y.Z-<platform>.{tar.gz,zip}; its pin in
    config/release/release-workflow.sha256 is updated.
  • scripts/release-common.sh expects canon-X.Y.Z-<platform> archives for
    releases 0.1.0 through 0.1.4 and canonprims-X.Y.Z-<platform> from 0.1.5,
    so staging and verifying a published older release is unchanged.

Conformance

  • Corpus conformance/canonical-json/v0, 180 cases, unchanged.
    MANIFEST.json sha256:
    de3ac543580ddb90f7e3a6e72239097274d3635ea783f302a9260b5a7d0c8d90.
  • Rust and Go agree byte for byte on the corpus and on generated input:
    crosscheck seeds 20261022 and 20261023, 5000 inputs each, on every
    native CI cell. The same seeds also generate inputs shaped for the new
    helpers, and the two drivers agree on every helper.
  • Each binding runs the whole corpus against its installed package (the
    wheel, or the packed npm tarball), and its corpus results and its output on
    the same crosscheck seeds equal Rust's byte for byte.

Verification

canonprims canonicalizes and digests; it verifies no signatures, so it
embeds no key. To verify this release, check the signed tag v0.1.5 and the
signed checksum manifests against the public pins committed in the tagged
commit (docs/security/); see docs/security/README.md. A wheel or the npm
tarball downloaded from PyPI or npm has the SHA-256 listed for it in
SHA256SUMS.

v0.1.4

Choose a tag to compare

@3leapsdave 3leapsdave released this 01 Nov 21:27
Immutable release. Only release title and notes can be modified.
v0.1.4
3595826

v0.1.4

Release preflight alignment for read-only GitHub Actions GITHUB_TOKEN
execution inside registry-publish.yml. The library, language bindings,
conformance corpus and canon command are unchanged from 0.1.3.

What it ships

  • Rust crates canonprims-core and canonprims-json (crates.io).
  • Go module github.com/3leaps/canonprims (package canon), standard
    library only and cgo-free.
  • canon command for linux amd64/arm64, darwin arm64 and windows
    amd64/arm64.
  • Python package canonprims (PyPI): an abi3 wheel per platform for
    CPython 3.10 and later, on linux amd64/arm64 (manylinux2014, glibc 2.17 or
    later), darwin arm64 and windows amd64/arm64. No source distribution.
  • npm package @3leaps/canonprims: one WebAssembly module with no
    imports, embedded in an ES module with no runtime dependencies. Tested on
    Node.js 20 and 22.

The wheels and the npm package are release assets: built and tested in the
tag workflow, listed in both checksum manifests and covered by both
signatures. The packages on PyPI and npm are these exact files.

Release machinery

  • scripts/release-github-preflight.sh: when invoked under GitHub Actions
    (GITHUB_ACTIONS=true) with a contents: read GITHUB_TOKEN (which has no
    Administration scope), accepts the redacted bypass_actors: null field on
    GET /repos/3leaps/canonprims/rulesets/<id> while verifying all other ruleset
    fields, and verifies release immutability on the published release object
    (GET /repos/3leaps/canonprims/releases/tags/vX.Y.Z, .immutable == true)
    when /immutable-releases returns HTTP 403. Maintainer preflight outside
    GitHub Actions continues to require both the explicit OrganizationAdmin
    bypass_actors array and /immutable-releases.
  • docs/releases/v0.1.3.md: records the runner group (default) and runner
    image versions for the two unversioned arm64 cells of the v0.1.3 release
    workflow run.

Conformance

  • Corpus conformance/canonical-json/v0, 180 cases, unchanged.
    MANIFEST.json sha256:
    de3ac543580ddb90f7e3a6e72239097274d3635ea783f302a9260b5a7d0c8d90.
  • Rust and Go agree byte for byte on the corpus and on generated input:
    crosscheck seeds 20261022 and 20261023, 5000 inputs each, on every
    native CI cell.
  • Each binding runs the whole corpus against its installed package (the
    wheel, or the packed npm tarball), and its corpus results and its output on
    the same crosscheck seeds equal Rust's byte for byte.

Verification

canon canonicalizes and digests; it verifies no signatures, so it embeds no
key. To verify this release, check the signed tag v0.1.4 and the signed
checksum manifests against the public pins committed in the tagged commit
(docs/security/); see docs/security/README.md. A wheel or the npm tarball
downloaded from PyPI or npm has the SHA-256 listed for it in SHA256SUMS.

v0.1.3

Choose a tag to compare

@3leapsdave 3leapsdave released this 31 Oct 21:39
Immutable release. Only release title and notes can be modified.
v0.1.3
dd1a21e

v0.1.3

OIDC Trusted Publishing for PyPI (canonprims) and npm (@3leaps/canonprims),
published-release staging and live registry digest verification, and
release-script portability hardening. The library, language bindings,
conformance corpus and canon command are unchanged from 0.1.2.

What it ships

  • Rust crates canonprims-core and canonprims-json (crates.io).
  • Go module github.com/3leaps/canonprims (package canon), standard
    library only and cgo-free.
  • canon command for linux amd64/arm64, darwin arm64 and windows
    amd64/arm64.
  • Python package canonprims (PyPI): an abi3 wheel per platform for
    CPython 3.10 and later, on linux amd64/arm64 (manylinux2014, glibc 2.17 or
    later), darwin arm64 and windows amd64/arm64. No source distribution.
  • npm package @3leaps/canonprims: one WebAssembly module with no
    imports, embedded in an ES module with no runtime dependencies. Tested on
    Node.js 20 and 22.

The wheels and the npm package are release assets: built and tested in the
tag workflow, listed in both checksum manifests and covered by both
signatures. The packages on PyPI and npm are these exact files.

Release machinery and OIDC publication

  • .github/workflows/registry-publish.yml: manual workflow_dispatch
    workflow on a v* tag ref. The verify job restores and verifies the
    signed tag on origin, checks source inertness, stages and verifies the
    published GitHub release via scripts/release-stage-published.sh, and
    uploads the verified release bundle. The publish-pypi (publish-pypi
    environment) and publish-npm (publish-npm environment) jobs re-verify
    every wheel and tarball SHA-256 against the signed SHA256SUMS manifest
    (scripts/ci-prepare-pypi-publish.sh, scripts/ci-publish-npm-oidc.sh),
    publish via OIDC Trusted Publishing with PEP 740 and npm provenance
    attestations, and run scripts/release-verify-registries.sh.
  • Live registry and provenance verification (make release-stage-published, make release-verify-registries):
    binds staged public signing keys, fingerprint pins and release notes
    byte-for-byte to the verified tag commit, verifies both SHA256SUMS and
    SHA512SUMS signatures, and confirms that PyPI serves the exact five wheels
    under .ownership.organization == "3leaps" with PEP 740 provenance
    attestations (/integrity/canonprims/<version>/<wheel>/provenance) and npm
    serves the exact @3leaps/canonprims tarball (dist.integrity SHA-512 SRI
    and dist.shasum) with Sigstore provenance (dist.attestations.provenance).
  • GitHub environment, ruleset, and signing ceremony guards: adds
    scripts/release-github-preflight.sh (make release-github-preflight) to
    verify the publish-pypi and publish-npm environments (required reviewer +
    v* tag policy), the Tag Publish Protection ruleset, and
    immutable_releases; pins git -c gpg.format=openpgp -c gpg.program=gpg -c gpg.openpgp.program=gpg for tag signing and verification; refuses the
    default ~/.gnupg keyring during signing; and updates
    scripts/release-prepare-tag-message.py to the 3-line attribution trailer.
  • Portability and ceremony helpers: adds make release-stage,
    make release-crates-clean and make release-pack-npm-redirector, declares
    npm (>= 10.0.0) and uv (>= 0.5.0) in .goneat/tools.yaml and
    config/doctor-versions.txt, enforces lowercase-only ASCII hex in the Rust
    canon-diff crosscheck driver, guards against unguarded Bash 3.2 empty-array
    expansions in scripts/jq-portability.sh, uses mode-120000 git index
    entries and core.autocrlf=false in the surface-check test suites, and
    separates project name and trademark notices into NOTICE alongside verbatim
    LICENSE-MIT and LICENSE-APACHE files in the repository root and binding
    packages.

Conformance

  • Corpus conformance/canonical-json/v0, 180 cases, unchanged.
    MANIFEST.json sha256:
    de3ac543580ddb90f7e3a6e72239097274d3635ea783f302a9260b5a7d0c8d90.
  • Rust and Go agree byte for byte on the corpus and on generated input:
    crosscheck seeds 20261022 and 20261023, 5000 inputs each, on every
    native CI cell.
  • Each binding runs the whole corpus against its installed package (the
    wheel, or the packed npm tarball), and its corpus results and its output on
    the same crosscheck seeds equal Rust's byte for byte.

Verification

canon canonicalizes and digests; it verifies no signatures, so it embeds no
key. To verify this release, check the signed tag v0.1.3 and the signed
checksum manifests against the public pins committed in the tagged commit
(docs/security/); see docs/security/README.md. A wheel or the npm tarball
downloaded from PyPI or npm has the SHA-256 listed for it in SHA256SUMS.

v0.1.2

Choose a tag to compare

@3leapsdave 3leapsdave released this 29 Oct 20:14
Immutable release. Only release title and notes can be modified.
v0.1.2
dae8028

v0.1.2

Python and TypeScript bindings for canonprims. Both are thin layers over the
Rust canonprims-json crate, pass the same conformance corpus as the Rust and
Go implementations, and agree with Rust byte for byte. The library, corpus and
canon command are otherwise unchanged from 0.1.1.

What it ships

  • Python package canonprims (PyPI): an abi3 wheel per platform for
    CPython 3.10 and later, on linux amd64/arm64 (manylinux2014, glibc 2.17 or
    later), darwin arm64 and windows amd64/arm64. No source distribution.
  • npm package @3leaps/canonprims: one WebAssembly module with no
    imports, embedded in an ES module with no runtime dependencies. Tested on
    Node.js 20 and 22.
  • Rust crates canonprims-core and canonprims-json, the Go module
    github.com/3leaps/canonprims (package canon) and the canon command
    for linux amd64/arm64, darwin arm64 and windows amd64/arm64, as in 0.1.1.

The wheels and the npm package are release assets: built and tested in the
tag workflow, listed in both checksum manifests and covered by both
signatures. The packages on PyPI and npm are these exact files.

The bindings

Both expose the same four verbs as Rust and Go: canonicalize, check, digest
and scheme info. Canonicalize, check and digest take explicit limits on
every call, with the same defaults (16 MiB of input, depth 128, 1,048,576
members per object, 16 MiB per string); a negative limit behaves as 0.
Input outside the I-JSON domain is refused with the same nine normative
codes, plus not_canonical from check, and is never repaired.

  • Python: input is any buffer, read as its bytes; a str is encoded as
    UTF-8. Refusals raise canonprims.Refusal, a ValueError carrying code
    and offset.
  • TypeScript: input is a Uint8Array or any ArrayBufferView, read as
    its bytes; a string is encoded as UTF-8, and a string with an unpaired
    surrogate, which has no UTF-8 form, is a TypeError. An input longer than
    maxBytes is refused before it is copied into the module. Refusals throw
    Refusal with code and offset.

The WebAssembly crate allows unsafe code only on its exported functions;
SecDR-0001 records
why, the residual risk and the check that enforces it.

Conformance

  • Corpus conformance/canonical-json/v0, 180 cases, unchanged.
    MANIFEST.json sha256:
    de3ac543580ddb90f7e3a6e72239097274d3635ea783f302a9260b5a7d0c8d90.
  • Rust and Go agree byte for byte on the corpus and on generated input:
    crosscheck seeds 20261022 and 20261023, 5000 inputs each, on every
    native CI cell.
  • Each binding runs the whole corpus against its installed package (the
    wheel, or the packed npm tarball), and its corpus results and its output on
    the same crosscheck seeds equal Rust's byte for byte.

Release machinery

  • The release tag restore now confirms origin's tag object even when the
    checkout already holds it.
  • Built bindings carry no build-host path.

Verification

canon canonicalizes and digests; it verifies no signatures, so it embeds no
key. To verify this release, check the signed tag v0.1.2 and the signed
checksum manifests against the public pins committed in the tagged commit
(docs/security/); see docs/security/README.md. A wheel or the npm tarball
downloaded from PyPI or npm has the SHA-256 listed for it in SHA256SUMS.

v0.1.1

Choose a tag to compare

@3leapsdave 3leapsdave released this 27 Oct 15:13
Immutable release. Only release title and notes can be modified.
v0.1.1
ba07f8d

v0.1.1

The first published release of canonprims: the RFC 8785 JSON
Canonicalization Scheme (jcs/rfc8785) in two independent implementations,
Rust and pure Go, gated against one conformance corpus.

A v0.1.0 tag exists but was never released. Its tag workflow looked up the
tag with an anonymous request, which cannot read a private repository, so it
stopped before building anything. 0.1.1 looks the tag up with the workflow's
read-only job token and carries the same library, corpus and command.

What it ships

  • Rust crates canonprims-core (schemes, refusal codes, limits, digests)
    and canonprims-json (RFC 8785 over a strict I-JSON loader), published to
    crates.io. Minimum supported Rust 1.88.
  • Go module github.com/3leaps/canonprims, package canon, standard
    library only and cgo-free, on Go 1.21 or later.
  • The canon command (canon jcs [--check] [--digest] FILE|-,
    canon info, canon version [--extended]) for linux amd64/arm64, darwin
    arm64 and windows amd64/arm64.

Both implementations refuse input outside the I-JSON domain with the same
nine normative codes (invalid_json, invalid_utf8, duplicate_member,
lone_surrogate, noncharacter, non_finite_number,
integer_outside_binary64, too_deep, too_large), never repair it, and
take explicit limits on every call. canon jcs --check adds not_canonical
for well-formed input that is not already canonical. The
defaults are 16 MiB of input, depth 128, 1,048,576 members per object and
16 MiB per string.

Conformance

  • Corpus conformance/canonical-json/v0, 180 cases.
    MANIFEST.json sha256:
    de3ac543580ddb90f7e3a6e72239097274d3635ea783f302a9260b5a7d0c8d90.
  • Expected bytes are written by hand or taken from RFC 8785, never generated
    by either implementation. The expected bytes of the file-based accept cases
    are also checked by two independent witnesses: ECMAScript JSON.stringify
    (all 63) and a separate Python checker (crucible v0.2.2,
    scripts/rfc8785-canonicalize.py; 58 of them, as it cannot witness the five
    ES6-spelled integers). Refusal cases and generated input are not witnessed;
    they are covered by the Rust/Go agreement below.
  • Rust and Go agree byte for byte on the corpus and on generated input:
    crosscheck seeds 20261022 and 20261023, 5000 inputs each, on every
    native CI cell.

Verification

canon canonicalizes and digests; it verifies no signatures, so it embeds no
key. To verify this release, check the signed tag v0.1.1 and the signed
checksum manifests against the public pins committed in the tagged commit
(docs/security/); see docs/security/README.md.