Files
sisi/done/parser-or-codec.md
T
swaitsandClaude Fable 5.2 2fc1fe9c2d
ci / tests (macos-latest, python 3.11) (push) Canceled after 0s
ci / tests (macos-latest, python 3.13) (push) Canceled after 0s
ci / tests (macos-latest, python 3.9) (push) Canceled after 0s
ci / tests (ubuntu-latest, python 3.11) (push) Canceled after 0s
ci / tests (ubuntu-latest, python 3.13) (push) Canceled after 0s
ci / tests (ubuntu-latest, python 3.9) (push) Canceled after 0s
sisi 0.1.0: a shared rulebook and verification tool for AI coding agents
Contracts with a ladder of checks, an end-of-turn gate, retrospectives and
shared lessons, time-to-delivery measurement, a library of 140 verification
techniques and 20 recipes, personal data kept outside the clone, and
releases with rollback. Standard library only.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 22:29:02 -07:00

2.2 KiB

id, title, applies_to
id title applies_to
parser-or-codec Parsing, formatting or encoding code Code that turns bytes or text into structured data or back, including file formats, protocols and serialisers.

Done means

  • Valid input of every form the format allows parses to the right value, checked against an independent source (the specification's examples, a reference implementation).
  • Encoding then decoding returns the original, and decoding then encoding returns the canonical form.
  • Invalid and hostile input gives an error, never a crash, hang, huge allocation or wrong answer; there are bounds on size and nesting.
  • Behaviour on the strange cases is decided and written down: duplicates, trailing data, byte order marks, case, whitespace, overlong encodings.
  • Files written by it can be read by other tools, and the reverse.

Checks

  • Round trip: round-trip (many-inputs), rung 2, with a generator that makes valid structures.
  • Agreement with another implementation: differential-reference, differential-executable-spec (many-inputs), rung 2.
  • Crashes and hangs: cargo-fuzz, atheris, jazzer or go-fuzz, with structure-aware-fuzzing, rung 2; run longer than a smoke test.
  • Schema-based attack: hostile-input-from-schema. Seeds kept: regression-seed-hygiene.
  • Known good files: golden-files-hand-verified (regression), old-data-compatibility.
  • Grammar properties: metamorphic, algebraic-laws; small domains: exhaustive-small-domain (prove).
  • Tests are real: mutation-on-diff.

Common false finishes

  • Round trip passes only because the generator makes values the parser already handles; the strange values are never made.
  • Fuzzing ran for a minute from an empty corpus, found nothing, and was called clean.
  • Both directions share a bug (the same wrong table) so the round trip is symmetric and wrong. Compare to an independent oracle.
  • Errors are tested by "it returns an error", not that the position and message are right.
  • The decoder accepts input the specification forbids ("be liberal"), and other tools then disagree.
  • Recursion depth, length prefixes, and decompression ratios are unbounded.
  • Locale, endianness or Unicode normalisation differs on another machine.