docs: document content-addressed record key format on activity#191
docs: document content-addressed record key format on activity#191holkexyz wants to merge 3 commits into
Conversation
🦋 Changeset detectedLatest commit: 0346d2b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
See https://linear.app/hypercerts/issue/HYPER-124/decide-way-forward-for-hypercerts-id where I've commented on this. |
| "main": { | ||
| "type": "record", | ||
| "description": "A hypercert record tracking impact work.", | ||
| "description": "A hypercert record tracking impact work. Record key must be a content-addressed identifier in the format 'hc2:{sha256}', where the SHA-256 hash is computed from the complete claim content.", |
There was a problem hiding this comment.
If we do go for this scheme (which I'm less enthusiastic about these days), then we would need to include a link to a public spec for exactly how to compute that hash. The SDK offers a reference implementation but it would need to be possible to implement that in any language.
|
Converted to draft because we need to decide (quickly!) whether to stick with |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
780fabe to
0346d2b
Compare
s-adamantine
left a comment
There was a problem hiding this comment.
During the call yesterday with Holke, Adam, Ken and I:
- We discussed that relying on hc2-style content-addressed IDs in the record key is not enforceable at the protocol level: apps can put any value there, and the PDS only enforces uniqueness per repo, not format.
- Because of that, documenting hc2 as “the” expected record key format would give a false sense of reliability; it cannot be treated as a guaranteed, global identifier.
- Decision direction: don’t encode this hc2 expectation into the activity description; instead, plan to derive stable identifiers via indexers or other layers (and revisit global IDs/tokenization separately).
- A globally unique identifier will be more relevant if/when we decide to tokenize the certs.
Summary
activitynow documents the expected record key format: a content-addressed identifier in the patternhc2:{sha256}, where the SHA-256 hash is computed from the complete claim content.Why
The
activityschema uses"key": "any"rather than the typical"key": "tid", but the reason and expected format were undocumented. In practice, hypercert record keys follow a content-addressing scheme (hc2:{sha256}) that binds the key to the claim content, preventing duplicate claims and enabling content-based lookups. Documenting this in the schema description ensures implementers use the correct key format rather than arbitrary strings or TIDs.Test plan
npm run checkpasses🤖 Generated with Claude Code