Skip to content

docs: fix mutability section in core data model#67

Merged
s-adamantine merged 2 commits into
mainfrom
fix/data-model-mutability
Mar 4, 2026
Merged

docs: fix mutability section in core data model#67
s-adamantine merged 2 commits into
mainfrom
fix/data-model-mutability

Conversation

@s-adamantine

@s-adamantine s-adamantine commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

Fixes HYPER-149

Summary

  • Rewrite core data model page: clean dimension table, rewrite collections section, fix mutability (immutable for now, versioning + locking planned), replace ERD with latest SVG from lexicon repo
  • Add field reference (contributors, work scopes, time, locations) to creating-your-first-hypercert, fix workScope from deprecated allOf to workScopeString
  • Add missing callout--note CSS style

@vercel

vercel Bot commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hypercerts-atproto-documentation Ready Ready Preview, Comment Mar 4, 2026 6:46pm
hypercerts-v0.2-documentation Ready Ready Preview, Comment Mar 4, 2026 6:46pm

Request Review

@coderabbitai

coderabbitai Bot commented Mar 4, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Updated documentation: added a "Last updated" timestamp, changed mutability to state records are currently immutable after creation, revised linking language to emphasize detectability rather than blanket strong-reference claims, introduced structured workScope usage in examples, and added a new callout CSS variant.

Changes

Cohort / File(s) Summary
Core concepts doc
pages/core-concepts/hypercerts-core-data-model.md
Added visible "Last updated" timestamp; revised Mutability to state hypercards are immutable once created (no versioning/history yet); rewrote activity-claim description and examples; replaced strong-reference wording with detectability and linked glossary; swapped diagram PNG→SVG and noted token anchoring not implemented; expanded contributor/contribution sections and attachment/measurement/evaluation examples; multiple text clarifications.
Getting started examples
pages/getting-started/creating-your-first-hypercert.md
Changed workScope representation from allOf: [...] to typed object { $type: "org.hypercerts.claim.activity#workScopeString", scope: "…" } across activity creation examples; added mapping/explanations for activity claim fields.
Styles
styles/globals.css
Added new callout variant .callout--note with left border and background color, matching existing callout styles.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I hopped through pages, neat and small,
A timestamp placed along the hall.
Records linked in tidy rows,
Notes and scopes where detail grows.
— a rabbit's hop to mark it all 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: updating the mutability section in the core data model documentation, which represents a significant portion of the changeset in the primary file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/data-model-mutability

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pages/core-concepts/hypercerts-core-data-model.md`:
- Around line 8-9: Update the hardcoded future dates in the page metadata:
replace "Last updated: March 5, 2026" (and the other occurrence around line 93)
with a non-future date (e.g., "March 4, 2026") or remove the hardcoded date
fields entirely to avoid future churn; ensure you edit the exact strings in the
markdown header/body where "Last updated: March 5, 2026" appears so both
occurrences are consistent.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b71c53c6-038e-4068-84c5-6e593faf1bd3

📥 Commits

Reviewing files that changed from the base of the PR and between db64a18 and f0466ba.

📒 Files selected for processing (1)
  • pages/core-concepts/hypercerts-core-data-model.md

Comment thread pages/core-concepts/hypercerts-core-data-model.md

@coderabbitai coderabbitai Bot 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.

♻️ Duplicate comments (2)
pages/core-concepts/hypercerts-core-data-model.md (2)

93-93: ⚠️ Potential issue | 🟡 Minor

Future-dated timestamp should use current date.

The timestamp "(As of March 5, 2026)" is future-dated. Update to March 4, 2026 to match the PR creation date.

📅 Proposed fix
-Activity claims and their linked records are currently immutable once created. Record versioning and edit history are not yet supported — this is an active area of design work. *(As of March 5, 2026)*
+Activity claims and their linked records are currently immutable once created. Record versioning and edit history are not yet supported — this is an active area of design work. *(As of March 4, 2026)*
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pages/core-concepts/hypercerts-core-data-model.md` at line 93, Update the
future-dated timestamp string "(As of March 5, 2026)" to "(As of March 4,
2026)"; locate the timestamp text in the hypercerts core data model document
(the literal string "(As of March 5, 2026)") and replace it with the corrected
date to match the PR creation date.

8-9: ⚠️ Potential issue | 🟡 Minor

Future-dated timestamp should use current date.

The "Last updated" date is March 5, 2026, but this PR was created on March 4, 2026. Update to the current date or remove the hardcoded date to avoid inaccuracy.

📅 Proposed fix
-*Last updated: March 5, 2026*
+*Last updated: March 4, 2026*
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pages/core-concepts/hypercerts-core-data-model.md` around lines 8 - 9, Update
the hardcoded "Last updated: March 5, 2026" line in the document: either set it
to the current date (e.g., "Last updated: March 4, 2026") or remove the static
"Last updated" line entirely; alternatively replace it with a dynamic mechanism
if your build system supports it so the timestamp is always generated at build
time (edit the line containing "*Last updated: March 5, 2026*").
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@pages/core-concepts/hypercerts-core-data-model.md`:
- Line 93: Update the future-dated timestamp string "(As of March 5, 2026)" to
"(As of March 4, 2026)"; locate the timestamp text in the hypercerts core data
model document (the literal string "(As of March 5, 2026)") and replace it with
the corrected date to match the PR creation date.
- Around line 8-9: Update the hardcoded "Last updated: March 5, 2026" line in
the document: either set it to the current date (e.g., "Last updated: March 4,
2026") or remove the static "Last updated" line entirely; alternatively replace
it with a dynamic mechanism if your build system supports it so the timestamp is
always generated at build time (edit the line containing "*Last updated: March
5, 2026*").

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8074d5b5-18f3-49b0-9b82-931321a55661

📥 Commits

Reviewing files that changed from the base of the PR and between f0466ba and 489d0cc.

📒 Files selected for processing (1)
  • pages/core-concepts/hypercerts-core-data-model.md

…g-your-first-hypercert

- Rewrite intro to link to activity claim lexicon
- Clean up dimension table with human-readable examples
- Rewrite collections section (flexible grouping, not just projects)
- Fix mutability section (immutable for now, versioning and locking planned)
- Remove unimplemented onchain snapshot paragraph
- Simplify strong references to glossary link
- Replace ERD image with latest SVG from lexicon repo, note tokenization not yet implemented
- Add last updated date
- Add field reference (contributors, work scopes, time, locations) to creating-your-first-hypercert
- Fix workScope from allOf to workScopeString per current lexicon

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 3

♻️ Duplicate comments (1)
pages/core-concepts/hypercerts-core-data-model.md (1)

8-8: ⚠️ Potential issue | 🟡 Minor

Future-dated “Last updated” value is still inaccurate.

Line 8 says “March 5, 2026,” which is in the future relative to this PR date. Please use a non-future date (e.g., March 4, 2026) or remove hardcoded dating.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pages/core-concepts/hypercerts-core-data-model.md` at line 8, Update the
hardcoded future "Last updated" metadata by editing the markdown line containing
"*Last updated: March 5, 2026*" in
pages/core-concepts/hypercerts-core-data-model.md: either change the date to a
non-future date (e.g., "March 4, 2026") or remove the hardcoded "Last updated"
line entirely so it doesn't show a future date.
🧹 Nitpick comments (1)
pages/core-concepts/hypercerts-core-data-model.md (1)

70-70: Wording at Line 70 conflicts with current immutability claim.

Line 70 says referenced records can be modified, while Line 90 states records are currently immutable. Consider rephrasing to avoid implying current in-place edits.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pages/core-concepts/hypercerts-core-data-model.md` at line 70, The sentence
"Records reference each other using [strong references] — if a referenced record
is modified after the reference was created, the change is detectable."
conflicts with the later immutability claim; update the wording for the "Records
reference each other using [strong references]" sentence to avoid implying
in-place edits (for example, state that references detect changes to the
referenced record's state/history or new versions rather than saying
"modified"), so it aligns with the immutability statement on Line 90 and
preserves the concept of detectability of subsequent changes or new versions.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pages/core-concepts/hypercerts-core-data-model.md`:
- Line 44: Replace the inconsistent spelling "onchain" with "on-chain" in the
document where the token entity is described (the sentence mentioning
tokenization/anchoring a hypercert onchain); locate the occurrence of the word
"onchain" near the "token" entity reference and update it to "on-chain" for
consistency.

In `@pages/getting-started/creating-your-first-hypercert.md`:
- Line 31: The inline workScope example currently shows an untyped object `{
scope: "Documentation" }`; update it to the typed inline form by adding the
`$type` discriminator so it matches other examples (e.g., use the `workScope`
object with `$type` and `scope` fields) to avoid copy/paste errors and keep
examples consistent with those at workScope and $type usage elsewhere in the
document.

In `@styles/globals.css`:
- Around line 1304-1307: The new CSS variant .callout--note is unreachable
because the Markdoc validator in markdoc/tags/callout.markdoc.js currently
rejects type="note"; either add "note" to the allowed matches array in that
Markdoc validator (so Markdoc will generate elements with data/type or class for
note) or remove the .callout--note rule from styles/globals.css; locate the
validator file (markdoc/tags/callout.markdoc.js) and update its matches list to
include "note" (or delete the CSS selector) and ensure the template/rendering
emits the corresponding class or attribute used by .callout--note.

---

Duplicate comments:
In `@pages/core-concepts/hypercerts-core-data-model.md`:
- Line 8: Update the hardcoded future "Last updated" metadata by editing the
markdown line containing "*Last updated: March 5, 2026*" in
pages/core-concepts/hypercerts-core-data-model.md: either change the date to a
non-future date (e.g., "March 4, 2026") or remove the hardcoded "Last updated"
line entirely so it doesn't show a future date.

---

Nitpick comments:
In `@pages/core-concepts/hypercerts-core-data-model.md`:
- Line 70: The sentence "Records reference each other using [strong references]
— if a referenced record is modified after the reference was created, the change
is detectable." conflicts with the later immutability claim; update the wording
for the "Records reference each other using [strong references]" sentence to
avoid implying in-place edits (for example, state that references detect changes
to the referenced record's state/history or new versions rather than saying
"modified"), so it aligns with the immutability statement on Line 90 and
preserves the concept of detectability of subsequent changes or new versions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9fe1b3be-f204-4fcf-b4d6-4fa704520882

📥 Commits

Reviewing files that changed from the base of the PR and between 489d0cc and a8a42e4.

⛔ Files ignored due to path filters (1)
  • public/images/hypercert-erd.svg is excluded by !**/*.svg
📒 Files selected for processing (3)
  • pages/core-concepts/hypercerts-core-data-model.md
  • pages/getting-started/creating-your-first-hypercert.md
  • styles/globals.css

{% figure src="/images/hypercert-erd.png" alt="Hypercert record relationships" /%}
{% figure src="/images/hypercert-erd.svg" alt="Hypercert record relationships" /%}

The diagram includes a **token** entity — tokenization (anchoring a hypercert onchain) is not yet implemented.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Use “on-chain” spelling for consistency.

Line 44 should use “on-chain” instead of “onchain.”

🧰 Tools
🪛 LanguageTool

[grammar] ~44-~44: Ensure spelling is correct
Context: ...y — tokenization (anchoring a hypercert onchain) is not yet implemented. | Record type...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pages/core-concepts/hypercerts-core-data-model.md` at line 44, Replace the
inconsistent spelling "onchain" with "on-chain" in the document where the token
entity is described (the sentence mentioning tokenization/anchoring a hypercert
onchain); locate the occurrence of the word "onchain" near the "token" entity
reference and update it to "on-chain" for consistency.

The activity claim is the core record — it describes what work was done, when, and in what scope. Here's how each field maps to the [activity lexicon](/lexicons/hypercerts-lexicons/activity-claim):

- **Contributors** can be identified inline with a DID or by referencing a [`contributorInformation`](/lexicons/hypercerts-lexicons/activity-claim) record that includes a display name and image. Each contributor can also have a weight and role.
- **Work scopes** can be a simple free-form string (`{ scope: "Documentation" }`) or a structured [CEL expression](/core-concepts/work-scopes) for machine-evaluable queries across the network.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Inline workScope example is missing $type.

Line 31’s example ({ scope: "Documentation" }) is inconsistent with the actual examples (Lines 43 and 69) and may cause copy/paste errors. Show the typed inline form here as well.

Suggested patch
-- **Work scopes** can be a simple free-form string (`{ scope: "Documentation" }`) or a structured [CEL expression](/core-concepts/work-scopes) for machine-evaluable queries across the network.
+- **Work scopes** can be a simple inline string object (`{ $type: "org.hypercerts.claim.activity#workScopeString", scope: "Documentation" }`) or a structured [CEL expression](/core-concepts/work-scopes) for machine-evaluable queries across the network.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- **Work scopes** can be a simple free-form string (`{ scope: "Documentation" }`) or a structured [CEL expression](/core-concepts/work-scopes) for machine-evaluable queries across the network.
- **Work scopes** can be a simple inline string object (`{ $type: "org.hypercerts.claim.activity#workScopeString", scope: "Documentation" }`) or a structured [CEL expression](/core-concepts/work-scopes) for machine-evaluable queries across the network.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pages/getting-started/creating-your-first-hypercert.md` at line 31, The
inline workScope example currently shows an untyped object `{ scope:
"Documentation" }`; update it to the typed inline form by adding the `$type`
discriminator so it matches other examples (e.g., use the `workScope` object
with `$type` and `scope` fields) to avoid copy/paste errors and keep examples
consistent with those at workScope and $type usage elsewhere in the document.

Comment thread styles/globals.css
Comment on lines +1304 to +1307
.callout--note {
border-left: 4px solid var(--color-info);
background: var(--color-info-bg);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

callout--note is unreachable with current Markdoc validation.

Line 1304 adds a new variant, but markdoc/tags/callout.markdoc.js still rejects type="note" as a critical validation error. Either allow "note" in the Markdoc matches list or remove this variant to avoid dead CSS.

Suggested patch (Markdoc validator)
--- a/markdoc/tags/callout.markdoc.js
+++ b/markdoc/tags/callout.markdoc.js
@@
-      matches: ['info', 'warning', 'danger', 'success'],
+      matches: ['info', 'note', 'warning', 'danger', 'success'],
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@styles/globals.css` around lines 1304 - 1307, The new CSS variant
.callout--note is unreachable because the Markdoc validator in
markdoc/tags/callout.markdoc.js currently rejects type="note"; either add "note"
to the allowed matches array in that Markdoc validator (so Markdoc will generate
elements with data/type or class for note) or remove the .callout--note rule
from styles/globals.css; locate the validator file
(markdoc/tags/callout.markdoc.js) and update its matches list to include "note"
(or delete the CSS selector) and ensure the template/rendering emits the
corresponding class or attribute used by .callout--note.

@s-adamantine s-adamantine merged commit 6b2529d into main Mar 4, 2026
4 checks passed
@s-adamantine s-adamantine deleted the fix/data-model-mutability branch March 4, 2026 18:50
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.

1 participant