Skip to main content

Invariant Encoding Check

@bixu/invariant-encoding-checkv2026.10.22.1· MIT· 4d agoBEHAVIORS
01README

Fail CI when a changed swamp extension model file leaves a known invariant unencoded in its zod schema — the mechanizable subset of 'make illegal states unrepresentable', plus a set of shared zod schemas for the shapes it enforces (Sha256Digest, Platform, SshFingerprint)

02Behaviors1
@bixu/invariant-encoding-checkv2026.09.10.1invariant_encoding_check.ts

Global Arguments

ArgumentTypeDescription
root?stringDirectory to scan, relative to the working directory. Only matters for baseRef and all modes.
fn check(paths?: array, baseRef?: string, all?: boolean, root?: string)
Scan model files and fail (throw) when any known invariant is left unencoded in its zod schema. Modes: paths (explicit list) > all > baseRef (git diff, GITHUB_BASE_REF env fallback).
ArgumentTypeDescription
paths?arrayExplicit file paths to scan. Overrides baseRef and all.
baseRef?stringGit base ref to diff against (e.g. 'origin/main'). Falls back to GITHUB_BASE_REF env var when unset.
all?booleanScan every .ts file under root. Overridden by paths.
root?stringOverride the globalArgs root for this call.

Resources

report(infinite)— Findings from the invariant-encoding scan, plus scan metadata
03Stats
A
93 / 100
Downloads
5
Archive size
17.3 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit1/2partial
    • @std/fs--jsr:@std/fs@1 is a range; audited 1.0.24, the version the registry resolved
    1 dependency found
    • jsr:@std/fs@1 -- audited 1.0.24
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License2/2earned
  • Verified public repository2/2earned
04Platforms
05Labels