nhi.sgit.ai / packs / static-publishing / invariants-and-tests

04 — Invariants & tests

PackStatic Publishing, `sgit vault serve`, and the Publishing Matrix RoleSix invariants asserted everywhere + fourteen test cells, collapsed from 240 combinations Date17–19 August 2026 · pack v0 OriginArchitect-review agent, SGit-AI__CLI repo Sourceraw markdown · original on GitHub Captured19 August 2026, at commit 2cedd9a — the raw file under src/ is byte-identical to that commit

Summary

Five dimensions produce 240 combinations, which is not a test plan; separating what must always hold from what genuinely varies collapses it to 6 invariant assertions applied in every cell, plus 14 cells — I6 (publishing never changes the vault: publish, push, assert the object count unchanged) was added in the 18 Aug revision to catch the amplification loop. The invariants are behavioural checks, not code inspection — I2 asserts that no recorded request contained the key, rather than asserting the code doesn't send it. Two cells were re-scoped by measurement, and one (clone with no key at all) is structurally impossible by design.

Key concepts

Key ideas

Read the document

📄 Pack document · 04__invariants-and-tests.md · rendered from the raw markdown (the source of truth)