Guide/How it works
Design Principles
1 min readFrom the README
Five durable principles govern every commit:
- Observable behavior is the contract. "Faster" is never a license to change a return value, a return type, an iteration order, an exception class, or an error message. Anything visible to the caller is part of the API. If a refactor would shift observable behavior, the refactor doesn't ship until the deviation is either reverted or moved into the upstream-divergence ledger as a documented, owner-acknowledged limitation.
- Tie-breaks are first-class. Equivalent answers chosen by hash-order are bugs in waiting. Kernels reproduce NetworkX's iteration and tie-break order exactly; for the reference algorithms CGSE's registry names the governing policy, records it in the
ComplexityWitness, and hashes the decision path so non-determinism is detectable, not "usually fine." - Failure modes are explicit, not emergent. Strict mode fails closed on malformed input. Hardened mode applies bounded recovery and writes a
DecisionRecordfor every recovery. There is no third mode where a parser silently fixes up bad input without telling anyone. - Profile, prove, repeat. Every performance optimization comes with a witness: a
cargo flamegraphartifact, a behavior-isomorphism proof from the conformance corpus, a baseline-vs-after percentile table, and a delta artifact. "It's faster" without a proof artifact is not accepted. - Long-lived artifacts are self-healing. Conformance reports, performance baselines, and reproducibility ledgers ship with RaptorQ erasure-coded sidecars and decode-drill receipts. Bit-rot doesn't break replay.
Principles 1–3 are enforced by the parity tests and the DSR quality run. Principles 4 and 5 are working practice (per-change measurement artifacts, the RaptorQ durability tooling); no gate enforces them today.