Skip to content

docs(cmpc): HAHS payload attribution backfill on v0.7.0a1 revocation fixture#32

Open
eriknewton wants to merge 2 commits into
mainfrom
feat/hahs-backfill-attribution-2026-05-22
Open

docs(cmpc): HAHS payload attribution backfill on v0.7.0a1 revocation fixture#32
eriknewton wants to merge 2 commits into
mainfrom
feat/hahs-backfill-attribution-2026-05-22

Conversation

@eriknewton

Copy link
Copy Markdown
Owner

Summary

Backfills HAHS v1 (Hashes-as-Histories) attribution onto the existing giskard09-mid-execution-rotation revocation fixture per HiveTrust confirmation 2026-05-22 (refreshed against Steve Rotzin's 2026-05-24 follow-up). Adds docs/hahs_payload_composition.md as the integrator-facing composition guide.

No primitive changes, no spec changes, no version bump. Sets up row #7 of the v0.3.3 cross-extension matrix (agentgraph-co/agentgraph) with a real production payload reference instead of a generic placeholder.

What landed

  • tests/fixtures/revocation/giskard09-mid-execution-rotation.json — added _meta block with HAHS canonical schema URL, issuer DID, issuer pubkey endpoint, and co-author attribution (Erik Newton + Steve Rotzin). All existing fields preserved verbatim (no JCS hash drift).
  • docs/hahs_payload_composition.md — integrator-facing composition guide. Includes URN-namespace discipline section calling out that HAHS-internal cascade references use HAHS-owned namespaces (urn:hahs:cascade:, urn:hivetrust:cascade:), since Concordia §11.5.7 defines only urn:concordia:attestation | mandate | offer | session. Hive-side payload subsection authored against the canonical HAHS schema; subject to HiveTrust co-author revision in PR comments.
  • tests/test_revocation_record.py — added test_giskard09_fixture_has_hahs_payload_attribution asserting the _meta block shape, schema URL, issuer DID, and both co-authors.

Verification

  • ✅ New attribution test passes
  • tests/test_revocation_record.py: 20 passed
  • ✅ Doc em-dash discipline: 1 em-dash (only the quoted HAHS schema title, allowed per spawn prompt)
  • ⚠️ Full pytest suite: 1166 passed, 3 failed in sandbox. Pre-existing failures in tests/test_mandate.py (sandbox blocked HTTPServer((127.0.0.1, 0), ...) binding with PermissionError: [Errno 1] Operation not permitted). Not related to this PR's changes. Expected to pass in CI.

Test plan

  • CI green on the branch
  • HiveTrust review (@srotzin)
  • Erik review
  • Squash-merge to main (no tag, no version bump)

Companion PRs

🤖 Generated with Claude Code

…fixture

Backfills HAHS v1 (Hashes-as-Histories) attribution onto the existing
giskard09-mid-execution-rotation fixture per HiveTrust confirmation
2026-05-22. Adds docs/hahs_payload_composition.md as the integrator-
facing composition guide. Co-author tag for Steve Rotzin (HiveTrust)
per private confirmation.

No primitive changes, no spec changes, no version bump. Sets up row
#7 of the v0.3.3 cross-extension matrix (agentgraph-co/agentgraph)
with a real production payload reference instead of a generic
placeholder.

HAHS canonical schema: https://hivetrust.onrender.com/.well-known/schemas/hahs-v1.json
HAHS issuer pubkey: did:hive:hivetrust-issuer-001 (Ed25519)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Steve Rotzin <steve@thehiveryiq.com>
@eriknewton

Copy link
Copy Markdown
Owner Author

@srotzin tagging you for the same-day review you offered. PR body has the summary, and docs/hahs_payload_composition.md is where the Hive-side payload subsection lives, drop your Sunday draft as a review comment on that file and I'll swap the subsection body verbatim. CI is green across 3.10, 3.11, 3.12. Target to land before Wed for the v0.3.3 publish window.

Note also the "URN namespace discipline" section in the same doc, captures the urn:hahs:cascade: vs urn:concordia:cascade: adjustment we discussed.

@srotzin

srotzin commented May 25, 2026

Copy link
Copy Markdown

Hive-side payload details for §9.6.4b composition

Following up on the namespace alignment from email — here's the Hive-side payload spec so this can land cleanly.

Canonicalization

  • All receipts canonicalize per RFC 8785 JCS before signing. No leading/trailing whitespace, sorted keys, no insignificant zeros.
  • Hash domain: sha256(jcs(payload)). The sha: field on the receipt envelope is hex-lowercase, no 0x prefix.

Key material

  • Issuer: did:hive:hivetrust-issuer-001
  • Algorithm: ed25519
  • Pubkey (multibase ed25519): i6-Wo01AwSD1eAhSSC3e3VCTEYFXehGNOVdC5iobuBc
  • Resolves via https://thehiveryiq.com/.well-known/issuers/index.json

Composition envelope

When a Concordia §9.6.4b receipt references a HAHS receipt, the reference shape is:

{
  "ref": {
    "urn": "urn:hahs:<class>:<id>",
    "sha": "<jcs-sha256-hex>",
    "issuer": "did:hive:hivetrust-issuer-001",
    "anchor": {
      "chain": "base",
      "tx": "0x...",
      "merkle_root": "0x...",
      "batch_index": 0
    }
  }
}

The anchor block is optional pre-finalization (batch state machine: open → rooted → finalized). Verifiers should accept rooted as proof of inclusion; finalized is required for settlement triggers.

Reference implementations

  • TS: @hive-protocol/sdk (npm) — Receipt.verify() + Receipt.compose()
  • Python: hive-py (PyPI) — hive.receipts.verify + hive.receipts.compose
  • Anchor worker (open spec, closed impl): https://thehiveryiq.com/sdk/anchor/

On the subsection drop

Confirmed — namespace fix accepted on my side, the §9.6.4b subsection drop is incoming in v0.3.0-grid.0 of the SDKs. Will tag you when it lands so the Concordia tests can be regenerated against the new envelope.

Happy to jump on a call if you want to walk through the JCS edge cases — there are a few around numeric encoding that bit me early.

Replaces the Erik-authored placeholder in the "Hive-side payload
details" subsection of docs/hahs_payload_composition.md with Steve
Rotzin's (HiveTrust) authoritative draft, per the doc's own
"replace verbatim when HiveTrust draft arrives" instruction.
Steve's draft arrived as a PR review comment on 2026-05-25.

Subsections now reflect HiveTrust's wording: Canonicalization,
Key material, Composition envelope (with the reference shape and
batch state machine), Reference implementations.

Footer updated to dual credit.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Steve Rotzin <steve@thehiveryiq.com>
@eriknewton

Copy link
Copy Markdown
Owner Author

@srotzin verbatim swap pushed at 5397bcd. Your four subheadings (Canonicalization, Key material, Composition envelope, Reference implementations) are now the body of the "Hive-side payload details" subsection of docs/hahs_payload_composition.md. Footer updated to dual credit.

Tagging for re-review.

@eriknewton

Copy link
Copy Markdown
Owner Author

@srotzin, status from my side so it is all in one place.

PR #32 is green across 3.10, 3.11, 3.12. Your four subheadings (Canonicalization, Key material, Composition envelope, Reference implementations) are in verbatim under the Hive-side payload details section of docs/hahs_payload_composition.md, and you are credited in both the revision line and the Authors section. The namespace discipline section captures the HAHS-owned cascade decision we settled by email. The PR carries the RevocationRecord backfill on the giskard09 mid-execution-rotation fixture.

Whenever you can drop the re-review, I will squash-merge to main. No tag, no version bump; this is a docs and attribution backfill.

Two follow-ups when they are ready, no rush:

Tag me when v0.3.0-grid.0 of the SDKs lands so I can regenerate the Concordia tests against the new envelope.
The agentgraph cross-extension matrix row #7 currently points at an approval_receipt fixture path that does not exist. I am going to repoint it at the giskard09 revocation fixture this PR carries, unless you would rather we ship a dedicated procurement-tier-upgrade signed sample as the production reference. Your call on which is cleaner.
Erik

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.

2 participants