Implements the fail-closed construction of verbatim-hashed normative fragments per BUILD-BRIEF §3.4 + SPEC-v5:
B_payload = version label + manifest_version + generator_version + per-fragment source identities + exact validated fragment bytes, length-framed (64-bit BE, injective).
H_payload = SHA256(HASH_DOMAIN_SEP ‖ length_frame([B_payload])) — derived one-way AFTER B_payload; no self-reference (h_payload is neither an argument nor a payload field).
Source-invalidation fail-closed: missing / oversize / hash-mismatch fragment → REFUSED, promotion=False, no payload/hash (cannot advance to promotion).
Single shared constructor for both Claude and Pi adapters → byte-identical vectors (T24).
Files: normative_fragments.py (+176), normative_fragments_unittest.py (+159), package.json (wires the new py unittest into test:framework-shell).
Review status — ⚠ NOT merge-ready
Reviews IN FLIGHT at exact head c63baec14aceb64a117c3e31bcac46e626197cf9: terra CODE + Opus SECREV (hash-construction surface, BUILD-BRIEF §7 mandatory).
No self-merge. Merge is Mos's (Gate 13/16) AFTER: both RoR GO + probe-5 admission classification (5 criteria) + full 6-check incl real-pipeline CI terminal-green.
Note for CI: the local combined pnpm test shows 14 unrelated Vitest suites failing on UNBUILT workspace deps (@mosaicstack/brain/db/config) — a pre-existing monorepo build-ordering artifact (diff touches only .py + package.json, zero TS); the real pipeline builds deps first. test:framework-shell (incl the new unittest) is green.
PR opened to pre-run CI on the real pipeline in parallel with reviews. Head pinned at c63baec1.
closes #831
## WI-4 — Verbatim-hashed normative fragments (B_payload / H_payload)
Implements the fail-closed construction of verbatim-hashed normative fragments per BUILD-BRIEF §3.4 + SPEC-v5:
- `B_payload` = version label + manifest_version + generator_version + per-fragment source identities + exact validated fragment bytes, length-framed (64-bit BE, injective).
- `H_payload = SHA256(HASH_DOMAIN_SEP ‖ length_frame([B_payload]))` — derived one-way AFTER B_payload; **no self-reference** (h_payload is neither an argument nor a payload field).
- Source-invalidation fail-closed: missing / oversize / hash-mismatch fragment → `REFUSED`, `promotion=False`, no payload/hash (cannot advance to promotion).
- Single shared constructor for both Claude and Pi adapters → byte-identical vectors (T24).
Files: `normative_fragments.py` (+176), `normative_fragments_unittest.py` (+159), `package.json` (wires the new py unittest into `test:framework-shell`).
## Review status — ⚠ NOT merge-ready
- Reviews IN FLIGHT at exact head `c63baec14aceb64a117c3e31bcac46e626197cf9`: terra CODE + **Opus SECREV** (hash-construction surface, BUILD-BRIEF §7 mandatory).
- **No self-merge.** Merge is Mos's (Gate 13/16) AFTER: both RoR GO + probe-5 admission classification (5 criteria) + full 6-check incl **real-pipeline CI terminal-green**.
- Red-first genuine: `test(#831)` 083dde24 precedes `feat(#831)` c63baec1.
- Note for CI: the local combined `pnpm test` shows 14 unrelated Vitest suites failing on UNBUILT workspace deps (@mosaicstack/brain/db/config) — a pre-existing monorepo build-ordering artifact (diff touches only .py + package.json, zero TS); the real pipeline builds deps first. `test:framework-shell` (incl the new unittest) is green.
PR opened to pre-run CI on the real pipeline in parallel with reviews. Head pinned at c63baec1.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
closes #831
WI-4 — Verbatim-hashed normative fragments (B_payload / H_payload)
Implements the fail-closed construction of verbatim-hashed normative fragments per BUILD-BRIEF §3.4 + SPEC-v5:
B_payload= version label + manifest_version + generator_version + per-fragment source identities + exact validated fragment bytes, length-framed (64-bit BE, injective).H_payload = SHA256(HASH_DOMAIN_SEP ‖ length_frame([B_payload]))— derived one-way AFTER B_payload; no self-reference (h_payload is neither an argument nor a payload field).REFUSED,promotion=False, no payload/hash (cannot advance to promotion).Files:
normative_fragments.py(+176),normative_fragments_unittest.py(+159),package.json(wires the new py unittest intotest:framework-shell).Review status — ⚠ NOT merge-ready
c63baec14aceb64a117c3e31bcac46e626197cf9: terra CODE + Opus SECREV (hash-construction surface, BUILD-BRIEF §7 mandatory).test(#831)083dde24precedesfeat(#831)c63baec1.pnpm testshows 14 unrelated Vitest suites failing on UNBUILT workspace deps (@mosaicstack/brain/db/config) — a pre-existing monorepo build-ordering artifact (diff touches only .py + package.json, zero TS); the real pipeline builds deps first.test:framework-shell(incl the new unittest) is green.PR opened to pre-run CI on the real pipeline in parallel with reviews. Head pinned at
c63baec1.