feat BREAKING air main #38 / 44
aaronrene · 37 days ago · May 14, 2026 · Diff

feat(air): Phase 7.2 — content_hash in AIR request body + cross-language parity

Add buildAirRequestBody() that produces the canonical 3-key JSON body ({action, content_hash, path}) the Python port in muse/plugins/knowtation/attestation.py::build_air_request_body matches byte-for-byte. attestBeforeWrite() now accepts contentHash and forwards it to the AIR endpoint instead of the old 2-key body.

Why: the Phase 7.2 cross-language parity test (gabriel-muse/tests/test_knowtation_attestation.py) requires that the JS module and the Python provider serialise the same inputs to the same UTF-8 bytes — without content_hash the AIR receipt could not bind the attestation to the actual file content.

Backward-compatible: contentHash defaults to '' so existing callers keep working; new callers (Phase 7.2 commit/push hooks) pass the real SHA-256 hex digest.

sha256:3129ccf68936df74b9184cb458477a109c46f645e66fe86343d09b642b4f9e05 sha
+1 ~1 symbols
sha256:23fc7fe47791f3deaf6cb37e7c87c0af0ee9d72325c6a5dbcc111b2438563d9b snapshot
+1
symbol added
~1
symbol modified
0
dead code introduced
Semantic Changes 2 symbols
~ lib/air.mjs .mjs 1 symbol added, 1 symbol modified
+ buildAirRequestBody function function buildAirRequestBody L44–57

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:3129ccf68936df74b9184cb458477a109c46f645e66fe86343d09b642b4f9e05 --body "your comment"