Skip to content

Releases

Quarter Guard v0.3.1

Choose a tag to compare

@github-actions github-actions released this 05 Dec 05:59
aae0f38

Draft. Checksums in SHA256SUMS; provenance with: gh attestation verify FILE --repo quarterso/guard

Quarter Guard 0.3.0

Choose a tag to compare

@github-actions github-actions released this 05 Dec 00:56
e69ac94

Quarter Guard 0.3.0, the first release from its own repository. quarter-guard checks Python, JavaScript and TypeScript for money mistakes (money in a float, rounding with no rule, an unchecked webhook signature and more), on your machine, with no model and no network.

The Quarter Guard rule engine and its fixture corpus, spec first.

  • Rules C0 to C7 for Python, JavaScript and TypeScript, with no model and no network: money in a float (C1), rounding with no rule (C2), a text amount through a float (C3), an amount with no currency (C4), business days from local time or plain days (C5), a webhook with no duplicate check (C6) or acted on before its signature is checked (C7), and a suppression without a reason (C0).

  • 161 fixture files and 82 findings placed by hand in fixtures/guard/expected.json (at least three bad and three tricky-but-correct good files per rule and language), with the Rust fixture test and the Python harness (text, JSON and SARIF output, exit codes, config, suppression, byte-identical reruns, and key hiding) written from the F4 spec before the code.

  • A guard.toml config fixture (fixtures/guard-config/): add amount names, exclude paths, turn rules off.

  • Four reviewer-found defects fixed, each with a regression test in crates/quarter-guard/tests/defects.rs and python/tests/test_guard_defects.py:

    • C5 now fires on datetime.datetime.now(), date.today() and aliased datetime in settlement/arrival functions (false negatives).
    • C5 no longer fires on a single-day timedelta step, while a two-day jump still fires (false positives, with an anchor).
    • The JSON match field carries the source bytes verbatim (byte-for-byte, including non-ASCII).
    • A non-UTF-8 source file is noted on stderr (not scanned: not UTF-8) with exit 1, not silently skipped; a real misuse still exits 2.
  • Split out of the Quarter monorepo into its own repository, quarterso/guard, with history. Quarter Guard was developed on the f4-guard-main branch of quarterso/quarter (it was never merged into that repository's main line); this repository carries that branch's guard commits. The Quarter hub keeps the guard handoff in its quarter command.

Download and verify

Pick the archive for your machine (macOS Apple silicon or Intel, Linux x86_64), then:

sha256sum -c SHA256SUMS
gh attestation verify quarter-guard-v0.3.0-<target>.tar.gz --repo quarterso/guard

The archive carries examples/stripe-payout: quarter-guard check examples/stripe-payout/payout.py finds two C1 findings and exits 1, and payout_fixed.py is clean.

On macOS the binary is not notarized yet. If you downloaded it in a browser, run xattr -d com.apple.quarantine quarter-guard once.