2026-05-24 — Correct hermes contract_sha to git-blob-sha1; surface substrate inconsistency
Status: open
MR-compliance: MR-4, MR-7, MR-12
Supersedes: none (corrects the value set in docs/decisions/2026-05-24-petrova-act-registry-edit-hermes.md which used the wrong hash family)
Context
Section titled “Context”After hermes PR #9 merged (Phase 1f close), petrova sweep-state --slug hermes reported drift sha=2cb484f11800 against a registry pin of 4dd1b98dde8f. Investigation showed two different CLI verbs are computing contract_sha with different hash families:
| Verb | Hash family | Output |
|---|---|---|
petrova doctor | crypto.createHash("sha256") | 4dd1b98dde8f |
petrova sweep-state | crypto.createHash("sha1") over a blob <len>\0 header + content (git hash-object semantics) | 2cb484f11800 |
git hash-object .petrova/contract.yaml | git-blob-sha1 (canonical) | 2cb484f11800 |
The registry’s contract_sha field is a 12-char git short sha by convention — every other entry in registry.yaml matches this format (kahn-hq=38f111f68e59, devarno-cloud=433b9aca8afc, petrova-codes=da448f23ed8f, etc). The post-merge canonical value for hermes is therefore 2cb484f11800.
The prior PRs that touched this field used the doctor-emitted sha256 value:
- PR #146 (closed): tried to set
fa18fd8607b4(sha256 of pre-eva-migration contract) - PR #147 (merged): set
4dd1b98dde8f(sha256 of post-eva-migration contract)
Both were correct relative to the operator’s reasoning (doctor said so) but wrong relative to the substrate’s drift-detection authority (sweep-state).
Decision
Section titled “Decision”-
Set
repos[hermes].contract_shainregistry.yamlto2cb484f11800via a direct PR (not viapetrova_act_registry_edit— that verb hitFILE_ALREADY_EXISTSbecause its ADR filename template${date}-${verb}-${slug}.mdcollides with the already-merged ADR from PR #147 on the same day, with no built-in disambiguation suffix). -
File this ADR as the MR-7 paper trail for the direct registry edit.
-
Flag the underlying substrate inconsistencies (separately) for follow-up — not in scope for this PR:
petrova doctorshould emit git-blob-sha1, not sha256, so the value it surfaces to operators matches the registry contract.petrova_act_registry_editshould add a disambiguation suffix (or accept a--decision-doc-slug-override) so same-day re-edits of the same slug are not blocked.
Alternatives considered
Section titled “Alternatives considered”- Wait until 2026-05-25 and re-run
petrova_act_registry_editso the date collision clears. Rejected — leaves the drift signal in the scheduled sweep board for ~16 hours, and the substrate inconsistency would still bite the next operator who re-uses doctor’s value. - Patch the doctor verb in this PR to also use git-blob-sha1. Rejected — substrate cross-verb fix is larger scope than a data correction; deserves its own PR + test coverage + decision doc. Leave as documented follow-up.
- Edit the existing PR #147’s ADR rationale post-merge to reference 2cb484. Rejected — violates MR-7 (append-only decision ledger; edits add a
Superseded-by:field only).
Consequences
Section titled “Consequences”- Next
petrova sweep-state --slug hermesreportsdrift=false. - Phase 1 closes cleanly on the substrate side.
- Two substrate bugs remain documented and unresolved (this ADR is the pointer; separate decision docs should open them).
- Future contract_sha bumps for hermes should use
git hash-object .petrova/contract.yaml(or equivalentlypetrova sweep-state --slug hermesand read the emitted sha), notpetrova doctor’s output.
Sign-off
Section titled “Sign-off”- subagent: claude-opus-4-7
- human: alex@devarno.com