Skip to content

docs: hash canonicalization design (A-6 residual survey + v0.5.0 proposal)#9

Merged
BunsDev merged 3 commits into
mainfrom
docs/hash-canonicalization-design
Jul 22, 2026
Merged

docs: hash canonicalization design (A-6 residual survey + v0.5.0 proposal)#9
BunsDev merged 3 commits into
mainfrom
docs/hash-canonicalization-design

Conversation

@BunsDev

@BunsDev BunsDev commented Jul 22, 2026

Copy link
Copy Markdown
Member

What

Non-normative design doc closing out the survey/design phase of the v0.3.0 A-6 residual: RFC-0001 §5.6 requires attestation referents to resolve, but hash algorithm and entry canonicalization are unspecified — two independent implementations cannot verify each other's provenance chains.

docs/superpowers/specs/2026-07-22-hash-canonicalization-design.md (follows the approval-tier-compiler design-doc precedent):

  • Survey of deployed hashing across coven-threads-core and the coven daemon: BLAKE3 for domain-tagged structural commitments (ward_hash = weave Merkle root, manifest entry hashes, evidence replay), SHA-256 for content fingerprints (diff_hash = post-write next_sha256, memory chunks, revision hashes). All claims verified against source.
  • Three inconsistencies flagged: u64-BE vs u64-LE length prefixes across constructions; one sha256:-prefixed hex site vs bare hex everywhere else; entry_hash name collision (daemon ward-manifest entry vs RFC §5.6 memory entry).
  • Proposed normative design (D-1..D-4): two algorithms by role, canonical encodings per §5.6 field, bare-lowercase-hex + HashAlgo discriminator convention, and a cross-implementation recompute-and-verify MUST.
  • Conformance coverage plan + migration impact (no-op for reference implementation).

What this is not

No RFC text changes. The normative amendment is a v0.5.0 draft minor sequenced behind: PR #7 merge+tag → threads-vfk (§6.3 freeze) → v0.5.0. Rationale in the doc's Sequencing section (the A-7 lesson: land version-rule-dependent changes under a previously-ratified rule).

Verification

  • manifest_entry_hash, for_verdict/for_apply diff_hash semantics, HashAlgo tags, schema BLOB/TEXT encodings all re-checked against source at coven-threads main and coven daemon main.
  • Docs-only: conformance suite untouched (no fixtures/validator changes).

Bead: threads-5vn. Merge authority: Val.

…on verification

Survey of deployed hashing in coven-threads-core and the coven daemon
(BLAKE3 structural commitments, SHA-256 content fingerprints), plus the
proposed normative design closing the v0.3.0 A-6 residual: algorithm
assignment by role, canonical encodings for ward_hash/diff_hash/entry_hash,
hex conventions, cross-implementation verification statement, conformance
coverage, and v0.5.0 sequencing behind the threads-vfk §6.3 freeze.

Non-normative; RFC text lands separately as a draft minor.

Bead: threads-5vn

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 22, 2026 08:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a non-normative design/survey document to close out the v0.3.0 “A-6 residual” by specifying a proposed approach for hash algorithm selection and canonical encodings for RFC-0001 §5.6 audit-log hash fields, enabling cross-implementation verification.

Changes:

  • Introduces a design doc surveying deployed hashing practices (BLAKE3 vs SHA-256) and identifying inconsistencies (endianness, prefixing, naming collision).
  • Proposes a normative design direction (D-1..D-4) for algorithm assignment, canonical byte encodings, and verification requirements.
  • Outlines a conformance coverage plan, migration impact, and sequencing toward a v0.5.0 draft minor.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/superpowers/specs/2026-07-22-hash-canonicalization-design.md Outdated
Comment thread docs/superpowers/specs/2026-07-22-hash-canonicalization-design.md Outdated
@BunsDev BunsDev self-assigned this Jul 22, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@BunsDev
BunsDev merged commit c3f135f into main Jul 22, 2026
@BunsDev
BunsDev deleted the docs/hash-canonicalization-design branch July 22, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants