Lexicons small updates plus attachments and outcomes - #54
Conversation
|
|
Warning Rate limit exceeded@holkexyz has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 10 minutes and 12 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds new lexicons (attachment, outcome), introduces rich-text facet fields across many schemas, renames/standardizes fields (coverPhoto→coverImage, location→locations, content→inputs, subject→subjects), adds weighted types, tightens length/grapheme constraints, and removes the evidence lexicon. Changes
Sequence Diagram(s)Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Poem
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error)
✅ Passed checks (3 passed)
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 |
There was a problem hiding this comment.
Actionable comments posted: 13
🤖 Fix all issues with AI agents
In @lexicons/app/certified/badge/definition.json:
- Around line 32-45: The descriptionFacets array schema lacks a maximum size;
add a "maxLength": 1000 property to the descriptionFacets array definition (the
same object that defines "type": "array" and "items" referencing
"app.bsky.richtext.facet") so the facets cannot grow unbounded — this should
align with the description field's grapheme constraint and other schema
patterns.
In @lexicons/org/hypercerts/claim/activity.json:
- Around line 58-70: The "contributors" item's ref "#weightedContributor" in the
org.hypercerts.claim.activity lexicon is undefined; either add a definition
named "weightedContributor" to this lexicon (containing fields like contributor
reference and optional weight, matching your schema style) or change the ref to
an existing definition (e.g., "#contributor" or the correct identifier) so the
"contributors" array resolves; update the schema near the top-level definitions
to include the new "weightedContributor" object or correct the ref accordingly.
In @lexicons/org/hypercerts/claim/attachment.json:
- Around line 33-40: The contributors items ref is pointing to a non-existent
local definition "#weightedContributor"; update the items.ref in the
contributors schema to point to the shared definition in org.hypercerts.defs
(e.g. change items.ref from "#weightedContributor" to
"org.hypercerts.defs#/weightedContributor") so the schema resolves to the
external weightedContributor definition.
- Around line 52-73: The facet arrays shortDescriptionFacets and
descriptionFacets are unbounded; add a maxItems constraint to each array (e.g.,
"maxItems": 100) in the schema for shortDescriptionFacets and descriptionFacets
so payloads are capped and abuse is prevented; update the array definitions that
reference app.bsky.richtext.facet to include the new maxItems property and
ensure any validators that rely on this lexicon respect the new limit.
In @lexicons/org/hypercerts/claim/collection.json:
- Around line 19-46: The arrays shortDescriptionFacets and descriptionFacets are
unbounded and can produce large payloads; add a sensible maxItems limit (e.g.,
50 or another project-approved cap) to both properties in the schema so each
"shortDescriptionFacets" and "descriptionFacets" entry includes "maxItems": <n>,
and update any docs/tests that assume unlimited facets accordingly to prevent
unbounded payloads.
In @lexicons/org/hypercerts/claim/contribution.json:
- Around line 30-43: The schema allows unbounded arrays in descriptionFacets
which can lead to record bloat; update the descriptionFacets definition to
include an upper bound (e.g., add "maxItems": <reasonable_limit>) so clients
cannot attach arbitrarily many facets; modify the descriptionFacets block that
contains "type": "array" and "items": { "type": "ref", "ref":
"app.bsky.richtext.facet" } to include a maxItems constraint (pick a sensible
limit consistent with other arrays in the schema).
- Around line 13-17: Update the documentation and/or schema to resolve the
mismatch for the contribution "subject" field: either add "subject" to the
README.md contribution table with an explanation why it's optional, or change
the schema to match the description (make "subject" required), or switch to the
plural "subjects" pattern used by measurement.subjects and attachment.subjects
and keep the optional semantics with the same justification text ("can exist
before claim recorded"); ensure README.md explains the chosen approach and
clarifies why a contribution may or may not include a subject reference.
In @lexicons/org/hypercerts/claim/evaluation.json:
- Line 30: The JSON schema's required array lists "evaluators" but there is no
corresponding "evaluators" entry under properties; add a properties.evaluators
definition (e.g., type/structure expected) to match the required field or remove
"evaluators" from the required array so they align; update the schema object
that contains "required": ["evaluators", "subject", "createdAt"] and ensure the
symbol name "evaluators" appears under "properties" with the correct type and
constraints used elsewhere in the schema.
- Around line 42-48: The contributors schema uses an incorrect local ref
"#weightedContributor"; change the reference to point to the global definition
in org.hypercerts.defs (replace the ref value for the contributors → items
reference from "#weightedContributor" to the fully-qualified ref for
weightedContributor used elsewhere, matching the pattern used in
measurement.json) so the schema resolves the weightedContributor from
org.hypercerts.defs instead of a local fragment.
In @lexicons/org/hypercerts/claim/measurement.json:
- Line 11: The schema lists "measurers" in the required array but no
corresponding property exists in the properties object; add a "measurers" entry
to properties (e.g., "measurers": { "type": "array", "items": { "type": "string"
}, "description": "Identifiers of entities who performed the measurement" }) or,
if measurers is not intended to be required, remove it from the required
array—update the "measurers" schema to match the expected shape (array of
strings or objects) and include any relevant format/description to satisfy
validation.
- Around line 22-28: The contributors.items.ref currently uses a local ref
"#weightedContributor" but the weightedContributor definition lives in
org.hypercerts.defs; update the ref value for contributors -> items -> ref from
"#weightedContributor" to the full external reference
"org.hypercerts.defs#/weightedContributor" (i.e., point to the
weightedContributor symbol in org.hypercerts.defs) so the schema correctly
resolves the external definition.
In @lexicons/org/hypercerts/claim/outcome.json:
- Around line 11-18: The schema's required array lists "outcome" but no such
property exists; either update the "required" array to include "title" instead
of "outcome" or add a new "outcome" property under "properties" matching the
"title" description (string, maxLength 5000, maxGraphemes 1000). Locate the
"required" array and the "properties" object in the JSON (symbols: "required",
"properties", "title", "outcome") and make one of the two consistent fixes so
validation succeeds.
In @lexicons/org/hypercerts/defs.json:
- Around line 69-102: The weightedContributor.contributor property is currently
unbounded; add a maxLength constraint (e.g., "maxLength": 256) to
weightedContributor.properties.contributor in the defs.json so contributor
strings cannot be arbitrarily large—keep the existing description and required
rules unchanged. Ensure the new maxLength value is applied to the "contributor"
property under the "weightedContributor" schema.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (12)
lexicons/app/certified/badge/definition.jsonlexicons/org/hypercerts/claim/activity.jsonlexicons/org/hypercerts/claim/attachment.jsonlexicons/org/hypercerts/claim/collection.jsonlexicons/org/hypercerts/claim/contribution.jsonlexicons/org/hypercerts/claim/evaluation.jsonlexicons/org/hypercerts/claim/evidence.jsonlexicons/org/hypercerts/claim/measurement.jsonlexicons/org/hypercerts/claim/outcome.jsonlexicons/org/hypercerts/claim/project.jsonlexicons/org/hypercerts/claim/rights.jsonlexicons/org/hypercerts/defs.json
💤 Files with no reviewable changes (1)
- lexicons/org/hypercerts/claim/evidence.json
🧰 Additional context used
📓 Path-based instructions (2)
lexicons/**/*.json
📄 CodeRabbit inference engine (Custom checks)
lexicons/**/*.json: When adding, modifying, or deleting files in lexicons//*.json, update README.md to reflect changes (document new lexicons, update modified properties, remove deleted lexicons from documentation)
When adding, modifying, or deleting files in lexicons//*.json, update ERD.puml if entity relationships changed (add new entities, modify relationships, remove deleted entities)
Verify that lexicon IDs in JSON files match what's documented in README.md
lexicons/**/*.json: After modifying lexicon JSON files, regenerate TypeScript types by runningnpm run gen-api
Lexicon JSON files should follow the ATProto lexicon schema v1 specification
Runnpm run checkbefore committing to validate lexicon syntax and ensure valid lexicon definitions
UpdateERD.pumlwhen modifying lexicon structures to reflect entity relationship changes
UpdateREADME.mddocumentation when adding or modifying lexicon definitions
Organize lexicon files by namespace following the directory structure pattern (e.g.,org/hypercerts/claim/*.json)
Files:
lexicons/org/hypercerts/claim/contribution.jsonlexicons/org/hypercerts/claim/activity.jsonlexicons/org/hypercerts/claim/collection.jsonlexicons/org/hypercerts/defs.jsonlexicons/org/hypercerts/claim/outcome.jsonlexicons/org/hypercerts/claim/measurement.jsonlexicons/org/hypercerts/claim/attachment.jsonlexicons/org/hypercerts/claim/project.jsonlexicons/org/hypercerts/claim/rights.jsonlexicons/app/certified/badge/definition.jsonlexicons/org/hypercerts/claim/evaluation.json
!(types)/**/*.{js,ts,tsx,json,md}
📄 CodeRabbit inference engine (AGENTS.md)
Run
npm run formatwith Prettier before committing to ensure consistent code formatting
Files:
lexicons/org/hypercerts/claim/contribution.jsonlexicons/org/hypercerts/claim/activity.jsonlexicons/org/hypercerts/claim/collection.jsonlexicons/org/hypercerts/defs.jsonlexicons/org/hypercerts/claim/outcome.jsonlexicons/org/hypercerts/claim/measurement.jsonlexicons/org/hypercerts/claim/attachment.jsonlexicons/org/hypercerts/claim/project.jsonlexicons/org/hypercerts/claim/rights.jsonlexicons/app/certified/badge/definition.jsonlexicons/org/hypercerts/claim/evaluation.json
🧠 Learnings (9)
📓 Common learnings
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to lexicons/**/*.json : When adding, modifying, or deleting files in lexicons/**/*.json, update README.md to reflect changes (document new lexicons, update modified properties, remove deleted lexicons from documentation)
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.871Z
Learning: This repository contains ATProto lexicon definitions for the Hypercerts protocol with auto-generated TypeScript types - prioritize lexicon accuracy and consistency
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.871Z
Learning: Applies to lexicons/**/*.json : Update `README.md` documentation when adding or modifying lexicon definitions
Learnt from: aspiers
Repo: hypercerts-org/hypercerts-lexicon PR: 37
File: lexicons/org/hypercerts/funding/receipt.json:1-71
Timestamp: 2025-12-15T15:33:27.052Z
Learning: For the hypercerts-org/hypercerts-lexicon repository, do not comment on Prettier formatting issues in code reviews because they are already reported by the lint workflow, and duplicating the report adds noise to the review.
Learnt from: aspiers
Repo: hypercerts-org/hypercerts-lexicon PR: 39
File: README.md:17-17
Timestamp: 2025-12-15T16:39:31.022Z
Learning: In the hypercerts-org/hypercerts-lexicon repository, prefer the spelling "onchain" (without hyphen) over "on-chain" to match the increasingly adopted industry standard.
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to README.md : Ensure all properties documented in README.md match the actual JSON schema definitions in lexicons/**/*.json
📚 Learning: 2025-12-15T17:53:11.871Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.871Z
Learning: Applies to lexicons/**/*.json : Update `README.md` documentation when adding or modifying lexicon definitions
Applied to files:
lexicons/org/hypercerts/claim/contribution.jsonlexicons/org/hypercerts/defs.jsonlexicons/org/hypercerts/claim/outcome.jsonlexicons/org/hypercerts/claim/attachment.jsonlexicons/org/hypercerts/claim/project.jsonlexicons/org/hypercerts/claim/rights.jsonlexicons/app/certified/badge/definition.json
📚 Learning: 2025-12-15T10:13:17.689Z
Learnt from: aspiers
Repo: hypercerts-org/hypercerts-lexicon PR: 34
File: lexicons/org/hypercerts/claim/evaluation.json:45-63
Timestamp: 2025-12-15T10:13:17.689Z
Learning: In the hypercerts-lexicon repository, CI automatically runs npm run gen-api and npm run check to regenerate TypeScript types and validate lexicon definitions. Do not include manual reminders to run these commands in code reviews, as CI handles consistency and validation for all lexicon JSON definitions under lexicons/.
Applied to files:
lexicons/org/hypercerts/claim/contribution.jsonlexicons/org/hypercerts/claim/activity.jsonlexicons/org/hypercerts/claim/collection.jsonlexicons/org/hypercerts/defs.jsonlexicons/org/hypercerts/claim/outcome.jsonlexicons/org/hypercerts/claim/measurement.jsonlexicons/org/hypercerts/claim/attachment.jsonlexicons/org/hypercerts/claim/project.jsonlexicons/org/hypercerts/claim/rights.jsonlexicons/app/certified/badge/definition.jsonlexicons/org/hypercerts/claim/evaluation.json
📚 Learning: 2025-12-15T15:33:19.949Z
Learnt from: aspiers
Repo: hypercerts-org/hypercerts-lexicon PR: 37
File: lexicons/org/hypercerts/funding/receipt.json:1-71
Timestamp: 2025-12-15T15:33:19.949Z
Learning: In the hypercerts-lexicon repository, do not comment on Prettier/formatting issues in code reviews since they are reported by the lint workflow. Do not duplicate the lint output in reviews to reduce noise; focus review comments on functional/semantic issues and other non-formatting concerns.
Applied to files:
lexicons/org/hypercerts/claim/contribution.jsonlexicons/org/hypercerts/claim/activity.jsonlexicons/org/hypercerts/claim/collection.jsonlexicons/org/hypercerts/defs.jsonlexicons/org/hypercerts/claim/outcome.jsonlexicons/org/hypercerts/claim/measurement.jsonlexicons/org/hypercerts/claim/attachment.jsonlexicons/org/hypercerts/claim/project.jsonlexicons/org/hypercerts/claim/rights.jsonlexicons/app/certified/badge/definition.jsonlexicons/org/hypercerts/claim/evaluation.json
📚 Learning: 2025-12-15T17:53:11.871Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.871Z
Learning: This repository contains ATProto lexicon definitions for the Hypercerts protocol with auto-generated TypeScript types - prioritize lexicon accuracy and consistency
Applied to files:
lexicons/org/hypercerts/defs.jsonlexicons/org/hypercerts/claim/attachment.json
📚 Learning: 2025-12-15T17:53:11.871Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.871Z
Learning: Applies to lexicons/**/*.json : Organize lexicon files by namespace following the directory structure pattern (e.g., `org/hypercerts/claim/*.json`)
Applied to files:
lexicons/org/hypercerts/claim/outcome.jsonlexicons/org/hypercerts/claim/attachment.jsonlexicons/org/hypercerts/claim/project.json
📚 Learning: 2025-12-11T15:44:24.397Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to lexicons/**/*.json : When adding, modifying, or deleting files in lexicons/**/*.json, update README.md to reflect changes (document new lexicons, update modified properties, remove deleted lexicons from documentation)
Applied to files:
lexicons/org/hypercerts/claim/attachment.jsonlexicons/org/hypercerts/claim/project.jsonlexicons/org/hypercerts/claim/rights.jsonlexicons/app/certified/badge/definition.json
📚 Learning: 2025-12-15T17:53:11.871Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.871Z
Learning: Applies to lexicons/**/*.json : Lexicon JSON files should follow the ATProto lexicon schema v1 specification
Applied to files:
lexicons/org/hypercerts/claim/attachment.json
📚 Learning: 2025-12-11T15:44:24.397Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to README.md : Ensure all properties documented in README.md match the actual JSON schema definitions in lexicons/**/*.json
Applied to files:
lexicons/org/hypercerts/claim/project.jsonlexicons/org/hypercerts/claim/rights.json
🪛 GitHub Actions: Test
lexicons/org/hypercerts/claim/evaluation.json
[error] 1-1: ZodError: Required field "evaluators" not defined in record. The lexicon validation failed during 'npm run gen-api'.
🔇 Additional comments (7)
lexicons/org/hypercerts/claim/activity.json (1)
111-137: Good tightening ofworkScopelabel item constraints.lexicons/org/hypercerts/claim/collection.json (1)
53-66: Good update toactivities→org.hypercerts.defs#weightedActivity(more reusable typing).lexicons/org/hypercerts/claim/rights.json (1)
28-45: Update README.md to document thedocumentsfield in rights.json.The
documentsfield (array of uri/smallBlob references, maxLength 100) exists in the schema but is not documented in README.md. Ensure all properties documented in README.md match the actual JSON schema definitions per coding guidelines.Likely an incorrect or invalid review comment.
lexicons/org/hypercerts/claim/outcome.json (1)
25-73: Structure looks good.The rich text facets pattern, strongRef references for
relatedActivitiesandlocations, and datetime fields follow consistent patterns with other lexicons in this PR.lexicons/org/hypercerts/claim/project.json (1)
36-57: Changes align with PR objectives.The
coverPhoto→coverImagerename, updatedactivitiesreference toorg.hypercerts.defs#weightedActivity, and newlocationsarray pattern are consistent with the broader refactoring across lexicons.lexicons/org/hypercerts/claim/measurement.json (1)
65-98: Good use of union types and consistent patterns.The
resourcesfield using union ofuriandsmallBlob, along withcomment/commentFacetsandlocationspatterns, aligns well with the broader PR refactoring.lexicons/org/hypercerts/claim/evaluation.json (1)
37-84: New fields and rich text facets look good.The
evaluationDimension,inputsunion type,summaryFacets, andlocationsfollow consistent patterns with other lexicons. Once the missingevaluatorsproperty andweightedContributorref issues are resolved, this structure is sound.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Fix all issues with AI agents
In @lexicons/org/hypercerts/claim/measurement.json:
- Line 11: The contributors property currently references a non-existent local
definition; replace its "$ref": "#weightedContributor" with the cross-file
qualified reference "$ref": "org.hypercerts.defs#weightedContributor" (match
existing pattern used for org.hypercerts.defs#uri and
org.hypercerts.defs#smallBlob) inside measurement.json, and also review the
change that added "contributors" to the required array (the "required":
["contributors", "metric", "unit", "value", "createdAt"] line) — either confirm
the breaking intent or remove "contributors" from the required list to avoid
invalidating existing records.
In @lexicons/org/hypercerts/claim/outcome.json:
- Around line 1-83: Add documentation entries for the new lexicon
org.hypercerts.claim.outcome: update README.md to describe the outcome record
(include its id org.hypercerts.claim.outcome), list and explain the properties
title, shortDescription (and shortDescriptionFacets), description (and
descriptionFacets), relatedActivities, startDate, endDate, locations, and
createdAt and their formats/constraints; and update ERD.puml to add an Outcome
entity representing org.hypercerts.claim.outcome and draw relationships from
Outcome to Activity (for relatedActivities / com.atproto.repo.strongRef) and to
Location (for locations / com.atproto.repo.strongRef), noting cardinality for
arrays (many) where applicable.
- Around line 55-64: The startDate and endDate properties in the outcome schema
lack constraint guidance; update the description text for "startDate" and
"endDate" in outcome.json (the startDate and endDate fields) to state the
expected ordering (endDate MUST be the same as or after startDate, and for
one-time outcomes endDate should equal startDate), and additionally add a short
note to the lexicon README clarifying this relationship and any validation
expectations so consumers know to enforce endDate >= startDate.
🧹 Nitpick comments (2)
lexicons/org/hypercerts/claim/outcome.json (1)
47-54: Consider adding a maxLength constraint to relatedActivities.The
relatedActivitiesarray has no upper bound, which could lead to unbounded growth. For consistency, thelocationsarray (lines 65-73) has amaxLengthof 100. Consider adding a similar constraint to prevent potential storage and performance issues.📏 Suggested constraint
"relatedActivities": { "type": "array", "description": "Optional references to activity claims that may have contributed. Links can be added later as understanding of (causal) relationships develops.", "items": { "type": "ref", "ref": "com.atproto.repo.strongRef" - } + }, + "maxLength": 100 }lexicons/org/hypercerts/claim/measurement.json (1)
45-54: Reconsider datetime semantics for instantaneous measurements.The description states "If it was a one time measurement, the endDate should be equal to the startDate." This requires clients to duplicate the same timestamp for point-in-time measurements, which is awkward and error-prone.
Consider making
endDateoptional: if omitted, treat the measurement as instantaneous atstartDate. This simplifies the common case while still supporting measurement periods.♻️ Proposed refinement
"endDate": { "type": "string", "format": "datetime", - "description": "The end date and time when the measurement ended. If it was a one time measurement, the endDate should be equal to the startDate." + "description": "The end date and time when the measurement ended. If omitted, the measurement is considered instantaneous at startDate." },And remove
endDatefrom the required fields if it's added there.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
lexicons/org/hypercerts/claim/evaluation.jsonlexicons/org/hypercerts/claim/measurement.jsonlexicons/org/hypercerts/claim/outcome.json
🧰 Additional context used
📓 Path-based instructions (2)
lexicons/**/*.json
📄 CodeRabbit inference engine (Custom checks)
lexicons/**/*.json: When adding, modifying, or deleting files in lexicons//*.json, update README.md to reflect changes (document new lexicons, update modified properties, remove deleted lexicons from documentation)
When adding, modifying, or deleting files in lexicons//*.json, update ERD.puml if entity relationships changed (add new entities, modify relationships, remove deleted entities)
Verify that lexicon IDs in JSON files match what's documented in README.md
lexicons/**/*.json: After modifying lexicon JSON files, regenerate TypeScript types by runningnpm run gen-api
Lexicon JSON files should follow the ATProto lexicon schema v1 specification
Runnpm run checkbefore committing to validate lexicon syntax and ensure valid lexicon definitions
UpdateERD.pumlwhen modifying lexicon structures to reflect entity relationship changes
UpdateREADME.mddocumentation when adding or modifying lexicon definitions
Organize lexicon files by namespace following the directory structure pattern (e.g.,org/hypercerts/claim/*.json)
Files:
lexicons/org/hypercerts/claim/outcome.jsonlexicons/org/hypercerts/claim/measurement.jsonlexicons/org/hypercerts/claim/evaluation.json
!(types)/**/*.{js,ts,tsx,json,md}
📄 CodeRabbit inference engine (AGENTS.md)
Run
npm run formatwith Prettier before committing to ensure consistent code formatting
Files:
lexicons/org/hypercerts/claim/outcome.jsonlexicons/org/hypercerts/claim/measurement.jsonlexicons/org/hypercerts/claim/evaluation.json
🧠 Learnings (9)
📓 Common learnings
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to lexicons/**/*.json : When adding, modifying, or deleting files in lexicons/**/*.json, update README.md to reflect changes (document new lexicons, update modified properties, remove deleted lexicons from documentation)
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.871Z
Learning: This repository contains ATProto lexicon definitions for the Hypercerts protocol with auto-generated TypeScript types - prioritize lexicon accuracy and consistency
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.871Z
Learning: Applies to lexicons/**/*.json : Update `README.md` documentation when adding or modifying lexicon definitions
Learnt from: aspiers
Repo: hypercerts-org/hypercerts-lexicon PR: 37
File: lexicons/org/hypercerts/funding/receipt.json:1-71
Timestamp: 2025-12-15T15:33:27.052Z
Learning: For the hypercerts-org/hypercerts-lexicon repository, do not comment on Prettier formatting issues in code reviews because they are already reported by the lint workflow, and duplicating the report adds noise to the review.
Learnt from: aspiers
Repo: hypercerts-org/hypercerts-lexicon PR: 39
File: README.md:17-17
Timestamp: 2025-12-15T16:39:31.022Z
Learning: In the hypercerts-org/hypercerts-lexicon repository, prefer the spelling "onchain" (without hyphen) over "on-chain" to match the increasingly adopted industry standard.
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to README.md : Ensure all properties documented in README.md match the actual JSON schema definitions in lexicons/**/*.json
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.871Z
Learning: Applies to lexicons/**/*.json : Update `ERD.puml` when modifying lexicon structures to reflect entity relationship changes
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to lexicons/**/*.json : When adding, modifying, or deleting files in lexicons/**/*.json, update ERD.puml if entity relationships changed (add new entities, modify relationships, remove deleted entities)
📚 Learning: 2025-12-11T15:44:24.397Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to lexicons/**/*.json : When adding, modifying, or deleting files in lexicons/**/*.json, update README.md to reflect changes (document new lexicons, update modified properties, remove deleted lexicons from documentation)
Applied to files:
lexicons/org/hypercerts/claim/outcome.json
📚 Learning: 2025-12-15T17:53:11.871Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.871Z
Learning: Applies to lexicons/**/*.json : Update `README.md` documentation when adding or modifying lexicon definitions
Applied to files:
lexicons/org/hypercerts/claim/outcome.json
📚 Learning: 2025-12-15T17:53:11.871Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.871Z
Learning: Applies to lexicons/**/*.json : Organize lexicon files by namespace following the directory structure pattern (e.g., `org/hypercerts/claim/*.json`)
Applied to files:
lexicons/org/hypercerts/claim/outcome.json
📚 Learning: 2025-12-15T17:53:11.871Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.871Z
Learning: Applies to lexicons/**/*.json : Update `ERD.puml` when modifying lexicon structures to reflect entity relationship changes
Applied to files:
lexicons/org/hypercerts/claim/outcome.json
📚 Learning: 2025-12-11T15:44:24.397Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to README.md : Ensure all properties documented in README.md match the actual JSON schema definitions in lexicons/**/*.json
Applied to files:
lexicons/org/hypercerts/claim/outcome.jsonlexicons/org/hypercerts/claim/measurement.json
📚 Learning: 2025-12-11T15:44:24.397Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to lexicons/**/*.json : Verify that lexicon IDs in JSON files match what's documented in README.md
Applied to files:
lexicons/org/hypercerts/claim/outcome.json
📚 Learning: 2025-12-15T10:13:17.689Z
Learnt from: aspiers
Repo: hypercerts-org/hypercerts-lexicon PR: 34
File: lexicons/org/hypercerts/claim/evaluation.json:45-63
Timestamp: 2025-12-15T10:13:17.689Z
Learning: In the hypercerts-lexicon repository, CI automatically runs npm run gen-api and npm run check to regenerate TypeScript types and validate lexicon definitions. Do not include manual reminders to run these commands in code reviews, as CI handles consistency and validation for all lexicon JSON definitions under lexicons/.
Applied to files:
lexicons/org/hypercerts/claim/outcome.jsonlexicons/org/hypercerts/claim/measurement.jsonlexicons/org/hypercerts/claim/evaluation.json
📚 Learning: 2025-12-15T15:33:19.949Z
Learnt from: aspiers
Repo: hypercerts-org/hypercerts-lexicon PR: 37
File: lexicons/org/hypercerts/funding/receipt.json:1-71
Timestamp: 2025-12-15T15:33:19.949Z
Learning: In the hypercerts-lexicon repository, do not comment on Prettier/formatting issues in code reviews since they are reported by the lint workflow. Do not duplicate the lint output in reviews to reduce noise; focus review comments on functional/semantic issues and other non-formatting concerns.
Applied to files:
lexicons/org/hypercerts/claim/outcome.jsonlexicons/org/hypercerts/claim/measurement.jsonlexicons/org/hypercerts/claim/evaluation.json
🪛 GitHub Actions: Test
lexicons/org/hypercerts/claim/outcome.json
[warning] 1-1: Code style issues found by Prettier formatting check. Run 'prettier --write' to fix.
🔇 Additional comments (13)
lexicons/org/hypercerts/claim/outcome.json (2)
1-11: LGTM! Lexicon structure follows ATProto conventions.The lexicon ID, namespace, and record structure are properly defined and follow the repository's directory pattern.
65-73: Theapp.certified.locationlexicon already exists atlexicons/app/certified/location.jsonand is documented in README.md. This reference pattern usingstrongRefis consistent across the codebase (used in activity, project, measurement, and evaluation lexicons) and aligns with ATProto's standard design where type validation is handled at the application level rather than at the schema level.Likely an incorrect or invalid review comment.
lexicons/org/hypercerts/claim/measurement.json (6)
13-21: Consider the design: optionalsubjectswith requiredcontributors.The
subjectsfield is optional, which aligns with the description stating "the measurement can exist before the claim is recorded." However, having requiredcontributorswhilesubjectsis optional means you must know who measured but not necessarily what was measured. Verify this is the intended semantic—it's valid but potentially counterintuitive.
60-64: LGTM: Naming standardization.The rename from
methodURItomeasurementMethodUriproperly follows camelCase conventions for the lexicon.
77-90: LGTM: Rich text support for comments.The addition of
commentwithcommentFacetsfollows the established pattern for rich text annotations. The maxLength (3000 bytes) and maxGraphemes (300 characters) constraints provide reasonable limits with proper multi-byte character handling.
91-99: LGTM: Locations now support multiple references.The change from
location(singular) tolocations(array) is a breaking change but provides necessary flexibility. The use ofstrongRefwith a description noting theapp.certified.locationlexicon constraint is appropriate for ATProto's dynamic cross-lexicon references.
1-109: Ensure documentation is updated to reflect lexicon changes.This file has substantial changes including new fields (
contributors,unit,startDate,endDate,comment,commentFacets), renamed fields (subject→subjects,location→locations,evidenceURI→resources,methodURI→measurementMethodUri), and modified required fields.Per repository learnings, ensure that
README.mdis updated to document these changes andERD.pumlis updated if entity relationships changed.Based on learnings and coding guidelines.
65-76: Type definitions are correctly defined and properly referenced.Both
org.hypercerts.defs#uriandorg.hypercerts.defs#smallBlobare properly defined inlexicons/org/hypercerts/defs.jsonwith appropriate schemas (uri as a string object with URI format, smallBlob as a blob object with 10MB max size). The union reference in theresourcesfield is syntactically correct and the lexicon file is valid. README.md and ERD.puml have also been updated to reflect the measurement lexicon.lexicons/org/hypercerts/claim/evaluation.json (5)
32-36: LGTM: Clear subject semantics.The updated description properly clarifies that evaluations reference a single subject and explicitly lists the acceptable types (activity claim, outcome claim, measurement, attachment, or evaluation). This constraint makes sense for evaluation semantics.
37-41: LGTM: Useful dimension categorization.The new
evaluationDimensionfield with illustrative examples (activityValidity, evidenceQuality, etc.) provides valuable categorization for evaluations. Making it optional is appropriate for backward compatibility.
71-84: LGTM: Rich text support for summaries.The addition of
summaryFacetsfor rich text annotations follows the established pattern. The constraints (maxLength: 5000 bytes, maxGraphemes: 1000 characters) are reasonable and properly handle multi-byte characters.
90-98: LGTM: Consistent locations pattern.The change from singular
locationto plurallocationsarray matches the pattern in measurement.json and provides necessary flexibility. This is a breaking change but aligns with the broader refactoring.
1-108: Ensure documentation reflects these substantial changes.This file has breaking changes including renamed fields (
content→inputs,location→locations,evaluators→contributors), new fields (evaluationDimension,summaryFacets), and modified required fields (summaryno longer required,subjectnow required).Per repository learnings, update
README.mdto document all changes and updateERD.pumlif entity relationships changed.Based on learnings and coding guidelines.
There was a problem hiding this comment.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
lexicons/org/hypercerts/claim/activity.json (1)
1-137: Update README.md and ERD.puml to match the activity.json schema changes.The documentation is out of sync with the JSON schema:
- Missing from README.md:
shortDescriptionFacets,descriptionFacets, andcontributorsfields are not documented- Incorrect in README.md: Field names are wrong—
contributionsshould becontributors, andlocationshould belocations(plural array)- Missing from ERD.puml: The richtext facet fields (
shortDescriptionFacets,descriptionFacets) are not shown- Incorrect in ERD.puml: Activity class shows
contributions[]?andlocation?instead ofcontributors[]?andlocations[]?Per coding guidelines, both README.md and ERD.puml must be updated whenever lexicon definitions are modified to maintain consistency across documentation and schema definitions.
🤖 Fix all issues with AI agents
In @lexicons/org/hypercerts/claim/activity.json:
- Around line 59-66: The contributors item currently uses a local JSON Schema
ref "#weightedContributor" but that symbol lives in the external lexicon file
org.hypercerts.defs.json; update the ref for the contributors.items to point to
the full lexicon path (replace the local "#weightedContributor" with the
external reference to org.hypercerts.defs.json including the fragment for
weightedContributor) so the schema resolves the weightedContributor definition
correctly.
- Around line 81-88: README.md is out of sync with the lexicon: the schema in
lexicons/org/hypercerts/claim/activity.json defines "locations" (array) that
references the app.certified.location lexicon and no longer includes a
"contributions" field, while README.md still documents the old "contributions"
and uses singular "location" and provides an incomplete Location Lexicon
description. Update README.md to remove the obsolete "contributions" entry,
change any `location` mentions to `locations` and document it as an array of
references to app.certified.location (including the maxLength constraint if
documented), expand the Location Lexicon section to accurately describe the
referenced schema, and verify/adjust ERD.puml to reflect the plural "locations"
relationship and current field names.
- Line 11: Update the README.md table to reflect that startDate and endDate are
optional per the activity.json lexicon: change the table entries for startDate
and endDate (currently marked ✅) to ❌ so they match the "required": ["title",
"shortDescription", "createdAt"] definition in activity.json and ensure the
wording/tooltip for those columns matches the optional status.
In @lexicons/org/hypercerts/claim/attachment.json:
- Around line 33-40: The contributors array schema is missing the maxLength
constraint; update the "contributors" property in the attachment JSON schema
(the array with "items": { "type": "ref", "ref":
"org.hypercerts.defs#weightedContributor" }) to include "maxLength": 100 so it
matches the pattern used for "subjects", "content", and "locations".
- Around line 1-104: Add a dedicated README section titled "###
org.hypercerts.claim.attachment" that documents this standalone lexicon
(org.hypercerts.claim.attachment) and lists each property with brief
descriptions and types: subjects (array of com.atproto.repo.strongRef),
attachmentType (string), relationType (knownValues:
supports|challenges|clarifies), contributors (array of
org.hypercerts.defs#weightedContributor), title, shortDescription (+
shortDescriptionFacets), description (+ descriptionFacets), content (union of
org.hypercerts.defs#uri and org.hypercerts.defs#smallBlob), locations (array of
com.atproto.repo.strongRef), and createdAt (datetime); then update ERD.puml to
add an attachment dataclass entity for org.hypercerts.claim.attachment and model
relationships: subjects and locations as strongRef arrays, contributors as
weightedContributor refs, and content as union of uri/smallBlob so the
attachment appears as a standalone node rather than only a field inside rights.
🧹 Nitpick comments (1)
lexicons/org/hypercerts/claim/attachment.json (1)
1-11: Consider making "contributors" optional.Requiring "contributors" (line 11) may be overly restrictive for attachments where authorship is unknown, anonymous, or institutional. Many evidence documents or reports may not have clearly identifiable individual contributors.
♻️ Suggested adjustment
- "required": ["contributors", "title", "createdAt"], + "required": ["title", "createdAt"],
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
lexicons/org/hypercerts/claim/activity.jsonlexicons/org/hypercerts/claim/attachment.jsonlexicons/org/hypercerts/claim/outcome.json
🚧 Files skipped from review as they are similar to previous changes (1)
- lexicons/org/hypercerts/claim/outcome.json
🧰 Additional context used
📓 Path-based instructions (2)
lexicons/**/*.json
📄 CodeRabbit inference engine (Custom checks)
lexicons/**/*.json: When adding, modifying, or deleting files in lexicons//*.json, update README.md to reflect changes (document new lexicons, update modified properties, remove deleted lexicons from documentation)
When adding, modifying, or deleting files in lexicons//*.json, update ERD.puml if entity relationships changed (add new entities, modify relationships, remove deleted entities)
Verify that lexicon IDs in JSON files match what's documented in README.md
lexicons/**/*.json: After modifying lexicon JSON files, regenerate TypeScript types by runningnpm run gen-api
Lexicon JSON files should follow the ATProto lexicon schema v1 specification
Runnpm run checkbefore committing to validate lexicon syntax and ensure valid lexicon definitions
UpdateERD.pumlwhen modifying lexicon structures to reflect entity relationship changes
UpdateREADME.mddocumentation when adding or modifying lexicon definitions
Organize lexicon files by namespace following the directory structure pattern (e.g.,org/hypercerts/claim/*.json)
Files:
lexicons/org/hypercerts/claim/activity.jsonlexicons/org/hypercerts/claim/attachment.json
!(types)/**/*.{js,ts,tsx,json,md}
📄 CodeRabbit inference engine (AGENTS.md)
Run
npm run formatwith Prettier before committing to ensure consistent code formatting
Files:
lexicons/org/hypercerts/claim/activity.jsonlexicons/org/hypercerts/claim/attachment.json
🧠 Learnings (9)
📓 Common learnings
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to lexicons/**/*.json : When adding, modifying, or deleting files in lexicons/**/*.json, update README.md to reflect changes (document new lexicons, update modified properties, remove deleted lexicons from documentation)
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.871Z
Learning: This repository contains ATProto lexicon definitions for the Hypercerts protocol with auto-generated TypeScript types - prioritize lexicon accuracy and consistency
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.871Z
Learning: Applies to lexicons/**/*.json : Update `README.md` documentation when adding or modifying lexicon definitions
Learnt from: aspiers
Repo: hypercerts-org/hypercerts-lexicon PR: 37
File: lexicons/org/hypercerts/funding/receipt.json:1-71
Timestamp: 2025-12-15T15:33:27.052Z
Learning: For the hypercerts-org/hypercerts-lexicon repository, do not comment on Prettier formatting issues in code reviews because they are already reported by the lint workflow, and duplicating the report adds noise to the review.
Learnt from: aspiers
Repo: hypercerts-org/hypercerts-lexicon PR: 39
File: README.md:17-17
Timestamp: 2025-12-15T16:39:31.022Z
Learning: In the hypercerts-org/hypercerts-lexicon repository, prefer the spelling "onchain" (without hyphen) over "on-chain" to match the increasingly adopted industry standard.
Learnt from: holkexyz
Repo: hypercerts-org/hypercerts-lexicon PR: 54
File: lexicons/app/certified/badge/definition.json:32-45
Timestamp: 2026-01-09T18:16:34.221Z
Learning: In lexicon JSON files, richtext facets arrays (e.g., descriptionFacets referencing app.bsky.richtext.facet) should follow the Bluesky ATProto pattern and not include maxLength constraints, as seen in app.bsky.feed.post.json and other Bluesky lexicons.
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to README.md : Ensure all properties documented in README.md match the actual JSON schema definitions in lexicons/**/*.json
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.871Z
Learning: Applies to lexicons/**/*.json : Update `ERD.puml` when modifying lexicon structures to reflect entity relationship changes
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to lexicons/**/*.json : When adding, modifying, or deleting files in lexicons/**/*.json, update ERD.puml if entity relationships changed (add new entities, modify relationships, remove deleted entities)
📚 Learning: 2025-12-15T10:13:17.689Z
Learnt from: aspiers
Repo: hypercerts-org/hypercerts-lexicon PR: 34
File: lexicons/org/hypercerts/claim/evaluation.json:45-63
Timestamp: 2025-12-15T10:13:17.689Z
Learning: In the hypercerts-lexicon repository, CI automatically runs npm run gen-api and npm run check to regenerate TypeScript types and validate lexicon definitions. Do not include manual reminders to run these commands in code reviews, as CI handles consistency and validation for all lexicon JSON definitions under lexicons/.
Applied to files:
lexicons/org/hypercerts/claim/activity.jsonlexicons/org/hypercerts/claim/attachment.json
📚 Learning: 2025-12-15T15:33:19.949Z
Learnt from: aspiers
Repo: hypercerts-org/hypercerts-lexicon PR: 37
File: lexicons/org/hypercerts/funding/receipt.json:1-71
Timestamp: 2025-12-15T15:33:19.949Z
Learning: In the hypercerts-lexicon repository, do not comment on Prettier/formatting issues in code reviews since they are reported by the lint workflow. Do not duplicate the lint output in reviews to reduce noise; focus review comments on functional/semantic issues and other non-formatting concerns.
Applied to files:
lexicons/org/hypercerts/claim/activity.jsonlexicons/org/hypercerts/claim/attachment.json
📚 Learning: 2026-01-09T18:16:34.221Z
Learnt from: holkexyz
Repo: hypercerts-org/hypercerts-lexicon PR: 54
File: lexicons/app/certified/badge/definition.json:32-45
Timestamp: 2026-01-09T18:16:34.221Z
Learning: In all lexicon JSON files under lexicons, ensure richtext facets arrays (e.g., descriptionFacets referencing app.bsky.richtext.facet) follow the Bluesky ATProto pattern and do not include maxLength constraints. Specifically, remove or omit maxLength constraints on descriptionFacets, aligning with Bluesky lexicons such as app.bsky.feed.post.json. Verify the facet objects conform to ATProto richtext facet structure and avoid introducing maxLength properties in these arrays.
Applied to files:
lexicons/org/hypercerts/claim/activity.jsonlexicons/org/hypercerts/claim/attachment.json
📚 Learning: 2025-12-15T17:53:11.871Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.871Z
Learning: Applies to lexicons/**/*.json : Organize lexicon files by namespace following the directory structure pattern (e.g., `org/hypercerts/claim/*.json`)
Applied to files:
lexicons/org/hypercerts/claim/attachment.json
📚 Learning: 2025-12-11T15:44:24.397Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to lexicons/**/*.json : When adding, modifying, or deleting files in lexicons/**/*.json, update README.md to reflect changes (document new lexicons, update modified properties, remove deleted lexicons from documentation)
Applied to files:
lexicons/org/hypercerts/claim/attachment.json
📚 Learning: 2025-12-15T17:53:11.871Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.871Z
Learning: Applies to lexicons/**/*.json : Update `README.md` documentation when adding or modifying lexicon definitions
Applied to files:
lexicons/org/hypercerts/claim/attachment.json
📚 Learning: 2025-12-15T17:53:11.871Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.871Z
Learning: Applies to lexicons/**/*.json : Lexicon JSON files should follow the ATProto lexicon schema v1 specification
Applied to files:
lexicons/org/hypercerts/claim/attachment.json
📚 Learning: 2025-12-15T17:53:11.871Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.871Z
Learning: This repository contains ATProto lexicon definitions for the Hypercerts protocol with auto-generated TypeScript types - prioritize lexicon accuracy and consistency
Applied to files:
lexicons/org/hypercerts/claim/attachment.json
🔇 Additional comments (9)
lexicons/org/hypercerts/claim/activity.json (4)
24-31: LGTM! Richtext facets correctly follow ATProto pattern.The
shortDescriptionFacetsfield properly referencesapp.bsky.richtext.facetwithout imposing amaxLengthconstraint on the array, consistent with Bluesky's ATProto richtext pattern.Based on learnings from previous reviews in this repository.
[scratchpad_end] -->
38-45: LGTM! Consistent richtext facets implementation.The
descriptionFacetsfield correctly mirrors the pattern used inshortDescriptionFacets, following ATProto conventions.[scratchpad_end] -->
54-58: Implement application-level validation for the bidirectional project-activity link.The schema allows an activity to reference a project and a project to maintain an activities array, but it cannot enforce the constraint that if an activity references a project, that project must reference the activity back. This bidirectional consistency must be validated at the application level to prevent orphaned or inconsistent references.
⛔ Skipped due to learnings
Learnt from: CR Repo: hypercerts-org/hypercerts-lexicon PR: 0 File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0 Timestamp: 2025-12-11T15:44:24.397Z Learning: Applies to ERD.puml : Verify that entity names in ERD.puml match lexicon IDs (e.g., 'activity' entity should correspond to org.hypercerts.claim.activity lexicon)
111-112: No action needed: maxLength constraints on workScope labels are appropriate for this new lexicon.The
maxLength: 128constraint on string items inwithinAllOf,withinAnyOf, andwithinNoneOfis reasonable and properly structured. Sinceactivity.jsonis a newly added lexicon file, there are no existing records to impact. Documentation has already been updated in README.md and ERD.puml.lexicons/org/hypercerts/claim/attachment.json (5)
13-21: LGTM!The subjects property is correctly defined as optional with appropriate constraints and type references.
22-32: LGTM!The attachmentType and relationType properties are well-designed with appropriate constraints and clear semantics.
46-73: LGTM! Correct richtext facet pattern.The shortDescription/shortDescriptionFacets and description/descriptionFacets pairs correctly follow the ATProto pattern. The facets arrays appropriately omit maxLength constraints, consistent with Bluesky lexicons.
Based on learnings, richtext facets arrays should not have maxLength constraints.
86-99: LGTM!The locations and createdAt properties are correctly defined with appropriate types and constraints.
74-85: External type references are valid. Bothorg.hypercerts.defs#uriandorg.hypercerts.defs#smallBlobare properly defined indefs.jsonand can be safely referenced.
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In @ERD.puml:
- Around line 90-102: The ERD's dataclass outcome is missing the facet array
fields from the lexicon schema; update the outcome dataclass to add
shortDescriptionFacets[]? and descriptionFacets[]? (optional array fields)
alongside the existing shortDescription? and description? entries so the ERD
matches outcome.json, and while editing confirm that the optional markers for
startDate and endDate in the outcome dataclass reflect the intended domain
requirements.
- Around line 74-88: The ERD's attachment dataclass is missing the two optional
rich-text facet fields from the lexicon; add optional fields
shortDescriptionFacets[]? and descriptionFacets[]? to the attachment dataclass
(reference: dataclass attachment) so the diagram fully reflects
attachment.json's schema while keeping them marked optional like the other facet
fields.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
ERD.pumlREADME.mdlexicons/org/hypercerts/claim/activity.jsonlexicons/org/hypercerts/claim/contribution.jsonlexicons/org/hypercerts/claim/measurement.json
🚧 Files skipped from review as they are similar to previous changes (1)
- lexicons/org/hypercerts/claim/contribution.json
🧰 Additional context used
📓 Path-based instructions (4)
README.md
📄 CodeRabbit inference engine (Custom checks)
README.md: Ensure that all lexicons documented in README.md exist as JSON files in the lexicons/ directory
Ensure all properties documented in README.md match the actual JSON schema definitions in lexicons/**/*.json
Files:
README.md
!(types)/**/*.{js,ts,tsx,json,md}
📄 CodeRabbit inference engine (AGENTS.md)
Run
npm run formatwith Prettier before committing to ensure consistent code formatting
Files:
README.mdlexicons/org/hypercerts/claim/measurement.jsonERD.pumllexicons/org/hypercerts/claim/activity.json
lexicons/**/*.json
📄 CodeRabbit inference engine (Custom checks)
lexicons/**/*.json: When adding, modifying, or deleting files in lexicons//*.json, update README.md to reflect changes (document new lexicons, update modified properties, remove deleted lexicons from documentation)
When adding, modifying, or deleting files in lexicons//*.json, update ERD.puml if entity relationships changed (add new entities, modify relationships, remove deleted entities)
Verify that lexicon IDs in JSON files match what's documented in README.md
lexicons/**/*.json: After modifying lexicon JSON files, regenerate TypeScript types by runningnpm run gen-api
Lexicon JSON files should follow the ATProto lexicon schema v1 specification
Runnpm run checkbefore committing to validate lexicon syntax and ensure valid lexicon definitions
UpdateERD.pumlwhen modifying lexicon structures to reflect entity relationship changes
UpdateREADME.mddocumentation when adding or modifying lexicon definitions
Organize lexicon files by namespace following the directory structure pattern (e.g.,org/hypercerts/claim/*.json)
Files:
lexicons/org/hypercerts/claim/measurement.jsonlexicons/org/hypercerts/claim/activity.json
ERD.puml
📄 CodeRabbit inference engine (Custom checks)
ERD.puml: Ensure that all entities referenced in ERD.puml correspond to lexicons defined in lexicons//*.json
Ensure all relationships shown in ERD.puml are valid based on the JSON lexicon schemas in lexicons//*.json
Verify that entity names in ERD.puml match lexicon IDs (e.g., 'activity' entity should correspond to org.hypercerts.claim.activity lexicon)
Files:
ERD.puml
🧠 Learnings (16)
📓 Common learnings
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to lexicons/**/*.json : When adding, modifying, or deleting files in lexicons/**/*.json, update README.md to reflect changes (document new lexicons, update modified properties, remove deleted lexicons from documentation)
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.871Z
Learning: This repository contains ATProto lexicon definitions for the Hypercerts protocol with auto-generated TypeScript types - prioritize lexicon accuracy and consistency
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.871Z
Learning: Applies to lexicons/**/*.json : Update `README.md` documentation when adding or modifying lexicon definitions
Learnt from: aspiers
Repo: hypercerts-org/hypercerts-lexicon PR: 37
File: lexicons/org/hypercerts/funding/receipt.json:1-71
Timestamp: 2025-12-15T15:33:27.052Z
Learning: For the hypercerts-org/hypercerts-lexicon repository, do not comment on Prettier formatting issues in code reviews because they are already reported by the lint workflow, and duplicating the report adds noise to the review.
Learnt from: aspiers
Repo: hypercerts-org/hypercerts-lexicon PR: 39
File: README.md:17-17
Timestamp: 2025-12-15T16:39:31.022Z
Learning: In the hypercerts-org/hypercerts-lexicon repository, prefer the spelling "onchain" (without hyphen) over "on-chain" to match the increasingly adopted industry standard.
Learnt from: holkexyz
Repo: hypercerts-org/hypercerts-lexicon PR: 54
File: lexicons/app/certified/badge/definition.json:32-45
Timestamp: 2026-01-09T18:16:34.221Z
Learning: In lexicon JSON files, richtext facets arrays (e.g., descriptionFacets referencing app.bsky.richtext.facet) should follow the Bluesky ATProto pattern and not include maxLength constraints, as seen in app.bsky.feed.post.json and other Bluesky lexicons.
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to lexicons/**/*.json : When adding, modifying, or deleting files in lexicons/**/*.json, update ERD.puml if entity relationships changed (add new entities, modify relationships, remove deleted entities)
📚 Learning: 2025-12-11T15:44:24.397Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to lexicons/**/*.json : When adding, modifying, or deleting files in lexicons/**/*.json, update README.md to reflect changes (document new lexicons, update modified properties, remove deleted lexicons from documentation)
Applied to files:
README.mdlexicons/org/hypercerts/claim/measurement.jsonlexicons/org/hypercerts/claim/activity.json
📚 Learning: 2025-12-11T15:44:24.397Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to README.md : Ensure all properties documented in README.md match the actual JSON schema definitions in lexicons/**/*.json
Applied to files:
README.mdlexicons/org/hypercerts/claim/measurement.jsonlexicons/org/hypercerts/claim/activity.json
📚 Learning: 2025-12-15T17:53:11.871Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.871Z
Learning: Applies to lexicons/**/*.json : Update `README.md` documentation when adding or modifying lexicon definitions
Applied to files:
README.mdlexicons/org/hypercerts/claim/measurement.jsonlexicons/org/hypercerts/claim/activity.json
📚 Learning: 2025-12-15T17:53:11.871Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.871Z
Learning: This repository contains ATProto lexicon definitions for the Hypercerts protocol with auto-generated TypeScript types - prioritize lexicon accuracy and consistency
Applied to files:
README.md
📚 Learning: 2025-12-15T17:53:11.871Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.871Z
Learning: Applies to lexicons/**/*.json : Update `ERD.puml` when modifying lexicon structures to reflect entity relationship changes
Applied to files:
README.mdERD.pumllexicons/org/hypercerts/claim/activity.json
📚 Learning: 2025-12-11T15:44:24.397Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to lexicons/**/*.json : When adding, modifying, or deleting files in lexicons/**/*.json, update ERD.puml if entity relationships changed (add new entities, modify relationships, remove deleted entities)
Applied to files:
README.mdERD.pumllexicons/org/hypercerts/claim/activity.json
📚 Learning: 2025-12-15T16:39:23.964Z
Learnt from: aspiers
Repo: hypercerts-org/hypercerts-lexicon PR: 39
File: README.md:17-17
Timestamp: 2025-12-15T16:39:23.964Z
Learning: In the hypercerts-lexicon repository, standardize on the hyphenless spelling 'onchain' across Markdown documentation (e.g., README.md and other md files) to match the industry standard. Update any occurrences of 'on-chain' to 'onchain' and ensure consistency throughout all documentation.
Applied to files:
README.md
📚 Learning: 2025-12-11T15:44:24.397Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to lexicons/**/*.json : Verify that lexicon IDs in JSON files match what's documented in README.md
Applied to files:
lexicons/org/hypercerts/claim/measurement.jsonlexicons/org/hypercerts/claim/activity.json
📚 Learning: 2025-12-15T10:13:17.689Z
Learnt from: aspiers
Repo: hypercerts-org/hypercerts-lexicon PR: 34
File: lexicons/org/hypercerts/claim/evaluation.json:45-63
Timestamp: 2025-12-15T10:13:17.689Z
Learning: In the hypercerts-lexicon repository, CI automatically runs npm run gen-api and npm run check to regenerate TypeScript types and validate lexicon definitions. Do not include manual reminders to run these commands in code reviews, as CI handles consistency and validation for all lexicon JSON definitions under lexicons/.
Applied to files:
lexicons/org/hypercerts/claim/measurement.jsonlexicons/org/hypercerts/claim/activity.json
📚 Learning: 2025-12-15T15:33:19.949Z
Learnt from: aspiers
Repo: hypercerts-org/hypercerts-lexicon PR: 37
File: lexicons/org/hypercerts/funding/receipt.json:1-71
Timestamp: 2025-12-15T15:33:19.949Z
Learning: In the hypercerts-lexicon repository, do not comment on Prettier/formatting issues in code reviews since they are reported by the lint workflow. Do not duplicate the lint output in reviews to reduce noise; focus review comments on functional/semantic issues and other non-formatting concerns.
Applied to files:
lexicons/org/hypercerts/claim/measurement.jsonlexicons/org/hypercerts/claim/activity.json
📚 Learning: 2026-01-09T18:16:34.221Z
Learnt from: holkexyz
Repo: hypercerts-org/hypercerts-lexicon PR: 54
File: lexicons/app/certified/badge/definition.json:32-45
Timestamp: 2026-01-09T18:16:34.221Z
Learning: In all lexicon JSON files under lexicons, ensure richtext facets arrays (e.g., descriptionFacets referencing app.bsky.richtext.facet) follow the Bluesky ATProto pattern and do not include maxLength constraints. Specifically, remove or omit maxLength constraints on descriptionFacets, aligning with Bluesky lexicons such as app.bsky.feed.post.json. Verify the facet objects conform to ATProto richtext facet structure and avoid introducing maxLength properties in these arrays.
Applied to files:
lexicons/org/hypercerts/claim/measurement.jsonlexicons/org/hypercerts/claim/activity.json
📚 Learning: 2025-12-11T15:44:24.397Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to ERD.puml : Verify that entity names in ERD.puml match lexicon IDs (e.g., 'activity' entity should correspond to org.hypercerts.claim.activity lexicon)
Applied to files:
ERD.pumllexicons/org/hypercerts/claim/activity.json
📚 Learning: 2025-12-11T15:44:24.397Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to ERD.puml : Ensure that all entities referenced in ERD.puml correspond to lexicons defined in lexicons/**/*.json
Applied to files:
ERD.pumllexicons/org/hypercerts/claim/activity.json
📚 Learning: 2025-12-11T15:44:24.397Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to README.md : Ensure that all lexicons documented in README.md exist as JSON files in the lexicons/ directory
Applied to files:
lexicons/org/hypercerts/claim/activity.json
📚 Learning: 2025-12-11T15:44:24.397Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to ERD.puml : Ensure all relationships shown in ERD.puml are valid based on the JSON lexicon schemas in lexicons/**/*.json
Applied to files:
lexicons/org/hypercerts/claim/activity.json
🪛 LanguageTool
README.md
[style] ~180-~180: In American English, abbreviations like “etc.” require a period.
Context: ...Description` (mentions, URLs, hashtags, etc). | ...
(ETC_PERIOD)
[style] ~182-~182: In American English, abbreviations like “etc.” require a period.
Context: ...description` (mentions, URLs, hashtags, etc). | ...
(ETC_PERIOD)
[style] ~191-~191: This phrase is redundant. Consider writing “created”.
Context: ...declared timestamp when this record was originally created | ...
(ORIGINALLY_CREATED)
[style] ~218-~218: ‘exact same’ might be wordy. Consider a shorter alternative.
Context: ...tContribution, then they would have the exact same role. | | description | string...
(EN_WORDINESS_PREMIUM_EXACT_SAME)
[style] ~220-~220: In American English, abbreviations like “etc.” require a period.
Context: ...description` (mentions, URLs, hashtags, etc). ...
(ETC_PERIOD)
[style] ~223-~223: This phrase is redundant. Consider writing “created”.
Context: ...declared timestamp when this record was originally created ...
(ORIGINALLY_CREATED)
[style] ~245-~245: In American English, abbreviations like “etc.” require a period.
Context: ...or summary (mentions, URLs, hashtags, etc). | ...
(ETC_PERIOD)
[style] ~248-~248: This phrase is redundant. Consider writing “created”.
Context: ...declared timestamp when this record was originally created | ...
(ORIGINALLY_CREATED)
[style] ~270-~270: In American English, abbreviations like “etc.” require a period.
Context: ...Description` (mentions, URLs, hashtags, etc). | ...
(ETC_PERIOD)
[style] ~272-~272: In American English, abbreviations like “etc.” require a period.
Context: ...description` (mentions, URLs, hashtags, etc). | ...
(ETC_PERIOD)
[style] ~275-~275: This phrase is redundant. Consider writing “created”.
Context: ...declared timestamp when this record was originally created | ...
(ORIGINALLY_CREATED)
[style] ~293-~293: In American English, abbreviations like “etc.” require a period.
Context: ...Description` (mentions, URLs, hashtags, etc). | ...
(ETC_PERIOD)
[style] ~295-~295: In American English, abbreviations like “etc.” require a period.
Context: ...description` (mentions, URLs, hashtags, etc). | ...
(ETC_PERIOD)
[style] ~300-~300: This phrase is redundant. Consider writing “created”.
Context: ...declared timestamp when this record was originally created | ...
(ORIGINALLY_CREATED)
[grammar] ~322-~322: Use a hyphen to join words.
Context: ...n the measurement ended. If it was a one time measurement, the endDate should be ...
(QB_NEW_EN_HYPHEN)
[style] ~327-~327: In American English, abbreviations like “etc.” require a period.
Context: ...or comment (mentions, URLs, hashtags, etc). | ...
(ETC_PERIOD)
[style] ~329-~329: This phrase is redundant. Consider writing “created”.
Context: ...declared timestamp when this record was originally created | ...
(ORIGINALLY_CREATED)
[style] ~347-~347: In American English, abbreviations like “etc.” require a period.
Context: ...Description` (mentions, URLs, hashtags, etc). | ...
(ETC_PERIOD)
[style] ~349-~349: In American English, abbreviations like “etc.” require a period.
Context: ...description` (mentions, URLs, hashtags, etc). | ...
(ETC_PERIOD)
[style] ~353-~353: This phrase is redundant. Consider writing “created”.
Context: ...declared timestamp when this record was originally created | ...
(ORIGINALLY_CREATED)
[style] ~376-~376: This phrase is redundant. Consider writing “created”.
Context: ...declared timestamp when this record was originally created | ...
(ORIGINALLY_CREATED)
🔇 Additional comments (12)
README.md (2)
176-330: Documentation accurately reflects lexicon schema changes.The README documentation has been properly updated to reflect the changes in the provided lexicon files:
- Activity documentation matches
activity.jsonschema- Measurement documentation matches
measurement.jsonschema- Rich text facet fields are correctly documented throughout
- Field renames (e.g.,
location→locations,subject→subjects) are consistently applied
252-300: No changes needed. Bothorg.hypercerts.claim.attachmentandorg.hypercerts.claim.outcomelexicon files exist with accurate schema definitions that match the README documentation. All required fields and property types are correctly documented.lexicons/org/hypercerts/claim/measurement.json (5)
11-21: LGTM! Subject field refactored to support multiple references.The rename from
subjecttosubjects(array) is a sensible enhancement that allows measurements to relate to multiple entities. The use ofcom.atproto.repo.strongRefis correct, and making it optional enables measurements to be created before their related claims.
35-39: Good addition of required unit field.Adding
unitas a required field improves data quality by ensuring measurements always specify their unit of measure. The examples provided in the description are helpful.
83-90: Correctly follows ATProto richtext facet pattern.The
commentFacetsarray correctly referencesapp.bsky.richtext.facetand omitsmaxLengthconstraint on the array itself, following the Bluesky ATProto pattern.Based on learnings.
22-29: No action needed. TheweightedContributordefinition exists inlexicons/org/hypercerts/defs.jsonand is properly structured with the requiredcontributorfield and optionalweightfield. The reference frommeasurement.jsonis valid.
65-76: Shared type definitions for resources union are correctly referenced.Both
org.hypercerts.defs#uriandorg.hypercerts.defs#smallBlobexist and are properly defined in defs.json. The union reference is valid.lexicons/org/hypercerts/claim/activity.json (3)
24-31: Correctly implements ATProto richtext facets.Both
shortDescriptionFacetsanddescriptionFacetscorrectly referenceapp.bsky.richtext.facetand omit array-levelmaxLengthconstraints, following the Bluesky ATProto pattern.Based on learnings.
Also applies to: 38-45
54-58: Good documentation of bidirectional linking requirement.The
projectfield description clearly specifies the requirement for bidirectional linking between activity and project. This helps prevent orphaned references and maintains data integrity.
111-133: Sensible constraint on workScope labels.Adding
maxLength: 128to individual label strings inwithinAllOf,withinAnyOf, andwithinNoneOfis a reasonable constraint that prevents abuse while allowing sufficiently long labels. This is a breaking change but improves data quality.ERD.puml (2)
104-121: ERD accurately reflects measurement lexicon changes.The measurement entity in the ERD correctly shows:
subjects[]?(plural, optional)contributors[](new required field)unit(new required field)resources[]?(replaces evidenceURI)comment?andlocations[]?(new optional fields)These changes accurately match the
measurement.jsonlexicon.Based on learnings.
56-72: ERD correctly updated for activity and relationship changes.The ERD accurately reflects:
- Activity entity with new
contributors[]?andlocations[]?fields- Updated relationships for attachment, outcome, and measurement entities
- Bidirectional links preserved (e.g., activity ↔ project)
- Contributor relationships properly modeled
Based on learnings.
Also applies to: 286-348
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
README.md (1)
176-192: Document the facet type explicitly (app.bsky.richtext.facet[]) to remove ambiguity.Right now the README introduces many
*Facetsfields as “rich text annotations”, but doesn’t state the concrete type anywhere in the docs.Proposed README clarification (minimal)
@@ ## Notes - All timestamps use the `datetime` format (ISO 8601) - Strong references (`com.atproto.repo.strongRef`) include both the URI and CID of the referenced record - Union types allow multiple possible formats (e.g., URI or blob) +- Rich text facet arrays (e.g., `descriptionFacets`, `summaryFacets`) are arrays of `app.bsky.richtext.facet` - Array items may have constraints like `maxLength` to limit the number of elements - String fields may have both `maxLength` (bytes) and `maxGraphemes` (Unicode grapheme clusters) constraintsAlso applies to: 214-224, 237-249, 262-276, 289-301, 314-330
lexicons/org/hypercerts/claim/evaluation.json (1)
42-49: Add amaxLengthto requiredcontributorsarray to avoid unbounded records.Nearly every other array here is capped at 100 items;
contributorsbeing required but unbounded is an easy footgun for record size.Proposed change
@@ "contributors": { "type": "array", "description": "List of contributors to this evaluation with optional relative weights. If omitted, `weight` defaults to 1. For richer semantics, use separate contribution records.", "items": { "type": "ref", "ref": "org.hypercerts.defs#weightedContributor" - } + }, + "maxLength": 100 },
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
README.mdlexicons/app/bsky/richtext/facet.jsonlexicons/org/hypercerts/claim/evaluation.json
🧰 Additional context used
📓 Path-based instructions (3)
lexicons/**/*.json
📄 CodeRabbit inference engine (Custom checks)
lexicons/**/*.json: When adding, modifying, or deleting files in lexicons//*.json, update README.md to reflect changes (document new lexicons, update modified properties, remove deleted lexicons from documentation)
When adding, modifying, or deleting files in lexicons//*.json, update ERD.puml if entity relationships changed (add new entities, modify relationships, remove deleted entities)
Verify that lexicon IDs in JSON files match what's documented in README.md
lexicons/**/*.json: After modifying lexicon JSON files, regenerate TypeScript types by runningnpm run gen-api
Lexicon JSON files should follow the ATProto lexicon schema v1 specification
Runnpm run checkbefore committing to validate lexicon syntax and ensure valid lexicon definitions
UpdateERD.pumlwhen modifying lexicon structures to reflect entity relationship changes
UpdateREADME.mddocumentation when adding or modifying lexicon definitions
Organize lexicon files by namespace following the directory structure pattern (e.g.,org/hypercerts/claim/*.json)
Files:
lexicons/app/bsky/richtext/facet.jsonlexicons/org/hypercerts/claim/evaluation.json
!(types)/**/*.{js,ts,tsx,json,md}
📄 CodeRabbit inference engine (AGENTS.md)
Run
npm run formatwith Prettier before committing to ensure consistent code formatting
Files:
lexicons/app/bsky/richtext/facet.jsonlexicons/org/hypercerts/claim/evaluation.jsonREADME.md
README.md
📄 CodeRabbit inference engine (Custom checks)
README.md: Ensure that all lexicons documented in README.md exist as JSON files in the lexicons/ directory
Ensure all properties documented in README.md match the actual JSON schema definitions in lexicons/**/*.json
Files:
README.md
🧠 Learnings (14)
📓 Common learnings
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to lexicons/**/*.json : When adding, modifying, or deleting files in lexicons/**/*.json, update README.md to reflect changes (document new lexicons, update modified properties, remove deleted lexicons from documentation)
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.871Z
Learning: This repository contains ATProto lexicon definitions for the Hypercerts protocol with auto-generated TypeScript types - prioritize lexicon accuracy and consistency
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.871Z
Learning: Applies to lexicons/**/*.json : Update `README.md` documentation when adding or modifying lexicon definitions
Learnt from: aspiers
Repo: hypercerts-org/hypercerts-lexicon PR: 37
File: lexicons/org/hypercerts/funding/receipt.json:1-71
Timestamp: 2025-12-15T15:33:27.052Z
Learning: For the hypercerts-org/hypercerts-lexicon repository, do not comment on Prettier formatting issues in code reviews because they are already reported by the lint workflow, and duplicating the report adds noise to the review.
Learnt from: aspiers
Repo: hypercerts-org/hypercerts-lexicon PR: 39
File: README.md:17-17
Timestamp: 2025-12-15T16:39:31.022Z
Learning: In the hypercerts-org/hypercerts-lexicon repository, prefer the spelling "onchain" (without hyphen) over "on-chain" to match the increasingly adopted industry standard.
Learnt from: holkexyz
Repo: hypercerts-org/hypercerts-lexicon PR: 54
File: lexicons/app/certified/badge/definition.json:32-45
Timestamp: 2026-01-09T18:16:34.221Z
Learning: In lexicon JSON files, richtext facets arrays (e.g., descriptionFacets referencing app.bsky.richtext.facet) should follow the Bluesky ATProto pattern and not include maxLength constraints, as seen in app.bsky.feed.post.json and other Bluesky lexicons.
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to lexicons/**/*.json : When adding, modifying, or deleting files in lexicons/**/*.json, update ERD.puml if entity relationships changed (add new entities, modify relationships, remove deleted entities)
📚 Learning: 2026-01-09T18:16:34.221Z
Learnt from: holkexyz
Repo: hypercerts-org/hypercerts-lexicon PR: 54
File: lexicons/app/certified/badge/definition.json:32-45
Timestamp: 2026-01-09T18:16:34.221Z
Learning: In all lexicon JSON files under lexicons, ensure richtext facets arrays (e.g., descriptionFacets referencing app.bsky.richtext.facet) follow the Bluesky ATProto pattern and do not include maxLength constraints. Specifically, remove or omit maxLength constraints on descriptionFacets, aligning with Bluesky lexicons such as app.bsky.feed.post.json. Verify the facet objects conform to ATProto richtext facet structure and avoid introducing maxLength properties in these arrays.
Applied to files:
lexicons/app/bsky/richtext/facet.jsonlexicons/org/hypercerts/claim/evaluation.json
📚 Learning: 2025-12-15T17:53:11.871Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.871Z
Learning: Applies to lexicons/**/*.json : Update `README.md` documentation when adding or modifying lexicon definitions
Applied to files:
lexicons/app/bsky/richtext/facet.jsonlexicons/org/hypercerts/claim/evaluation.jsonREADME.md
📚 Learning: 2025-12-11T15:44:24.397Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to lexicons/**/*.json : When adding, modifying, or deleting files in lexicons/**/*.json, update README.md to reflect changes (document new lexicons, update modified properties, remove deleted lexicons from documentation)
Applied to files:
lexicons/app/bsky/richtext/facet.jsonlexicons/org/hypercerts/claim/evaluation.jsonREADME.md
📚 Learning: 2025-12-15T17:53:11.871Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.871Z
Learning: Applies to lexicons/**/*.json : Lexicon JSON files should follow the ATProto lexicon schema v1 specification
Applied to files:
lexicons/app/bsky/richtext/facet.jsonlexicons/org/hypercerts/claim/evaluation.json
📚 Learning: 2025-12-11T15:44:24.397Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to README.md : Ensure all properties documented in README.md match the actual JSON schema definitions in lexicons/**/*.json
Applied to files:
lexicons/app/bsky/richtext/facet.jsonlexicons/org/hypercerts/claim/evaluation.jsonREADME.md
📚 Learning: 2025-12-15T17:53:11.871Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.871Z
Learning: Applies to lexicons/**/*.json : Update `ERD.puml` when modifying lexicon structures to reflect entity relationship changes
Applied to files:
lexicons/app/bsky/richtext/facet.jsonlexicons/org/hypercerts/claim/evaluation.jsonREADME.md
📚 Learning: 2025-12-15T17:53:11.871Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.871Z
Learning: This repository contains ATProto lexicon definitions for the Hypercerts protocol with auto-generated TypeScript types - prioritize lexicon accuracy and consistency
Applied to files:
lexicons/app/bsky/richtext/facet.json
📚 Learning: 2025-12-15T10:13:17.689Z
Learnt from: aspiers
Repo: hypercerts-org/hypercerts-lexicon PR: 34
File: lexicons/org/hypercerts/claim/evaluation.json:45-63
Timestamp: 2025-12-15T10:13:17.689Z
Learning: In the hypercerts-lexicon repository, CI automatically runs npm run gen-api and npm run check to regenerate TypeScript types and validate lexicon definitions. Do not include manual reminders to run these commands in code reviews, as CI handles consistency and validation for all lexicon JSON definitions under lexicons/.
Applied to files:
lexicons/app/bsky/richtext/facet.jsonlexicons/org/hypercerts/claim/evaluation.json
📚 Learning: 2025-12-15T15:33:19.949Z
Learnt from: aspiers
Repo: hypercerts-org/hypercerts-lexicon PR: 37
File: lexicons/org/hypercerts/funding/receipt.json:1-71
Timestamp: 2025-12-15T15:33:19.949Z
Learning: In the hypercerts-lexicon repository, do not comment on Prettier/formatting issues in code reviews since they are reported by the lint workflow. Do not duplicate the lint output in reviews to reduce noise; focus review comments on functional/semantic issues and other non-formatting concerns.
Applied to files:
lexicons/app/bsky/richtext/facet.jsonlexicons/org/hypercerts/claim/evaluation.json
📚 Learning: 2025-12-11T15:44:24.397Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to lexicons/**/*.json : Verify that lexicon IDs in JSON files match what's documented in README.md
Applied to files:
lexicons/org/hypercerts/claim/evaluation.json
📚 Learning: 2025-12-11T15:44:24.397Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to README.md : Ensure that all lexicons documented in README.md exist as JSON files in the lexicons/ directory
Applied to files:
lexicons/org/hypercerts/claim/evaluation.json
📚 Learning: 2025-12-11T15:44:24.397Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2025-12-11T15:44:24.397Z
Learning: Applies to lexicons/**/*.json : When adding, modifying, or deleting files in lexicons/**/*.json, update ERD.puml if entity relationships changed (add new entities, modify relationships, remove deleted entities)
Applied to files:
README.md
📚 Learning: 2025-12-15T16:39:23.964Z
Learnt from: aspiers
Repo: hypercerts-org/hypercerts-lexicon PR: 39
File: README.md:17-17
Timestamp: 2025-12-15T16:39:23.964Z
Learning: In the hypercerts-lexicon repository, standardize on the hyphenless spelling 'onchain' across Markdown documentation (e.g., README.md and other md files) to match the industry standard. Update any occurrences of 'on-chain' to 'onchain' and ensure consistency throughout all documentation.
Applied to files:
README.md
🪛 GitHub Actions: Test
lexicons/app/bsky/richtext/facet.json
[error] 1-1: Prettier formatting check failed. Run 'prettier --write' to fix code style issues in this file.
🪛 LanguageTool
README.md
[style] ~180-~180: In American English, abbreviations like “etc.” require a period.
Context: ...Description` (mentions, URLs, hashtags, etc). ...
(ETC_PERIOD)
[style] ~191-~191: This phrase is redundant. Consider writing “created”.
Context: ...declared timestamp when this record was originally created ...
(ORIGINALLY_CREATED)
[style] ~218-~218: ‘exact same’ might be wordy. Consider a shorter alternative.
Context: ...tContribution, then they would have the exact same role. | | description | `string...
(EN_WORDINESS_PREMIUM_EXACT_SAME)
[style] ~223-~223: This phrase is redundant. Consider writing “created”.
Context: ...declared timestamp when this record was originally created ...
(ORIGINALLY_CREATED)
[style] ~248-~248: This phrase is redundant. Consider writing “created”.
Context: ...declared timestamp when this record was originally created ...
(ORIGINALLY_CREATED)
[style] ~275-~275: This phrase is redundant. Consider writing “created”.
Context: ...declared timestamp when this record was originally created ...
(ORIGINALLY_CREATED)
[style] ~300-~300: This phrase is redundant. Consider writing “created”.
Context: ...declared timestamp when this record was originally created ...
(ORIGINALLY_CREATED)
[grammar] ~322-~322: Use a hyphen to join words.
Context: ...n the measurement ended. If it was a one time measurement, the endDate should be ...
(QB_NEW_EN_HYPHEN)
[style] ~329-~329: This phrase is redundant. Consider writing “created”.
Context: ...declared timestamp when this record was originally created ...
(ORIGINALLY_CREATED)
[style] ~353-~353: This phrase is redundant. Consider writing “created”.
Context: ...declared timestamp when this record was originally created ...
(ORIGINALLY_CREATED)
[style] ~376-~376: This phrase is redundant. Consider writing “created”.
Context: ...declared timestamp when this record was originally created | ...
(ORIGINALLY_CREATED)
[style] ~396-~396: This phrase is redundant. Consider writing “created”.
Context: ...declared timestamp when this record was originally created | ...
(ORIGINALLY_CREATED)
🔇 Additional comments (5)
lexicons/org/hypercerts/claim/evaluation.json (2)
71-84:summary+summaryFacetspairing looks aligned with the intended richtext facet pattern.No
maxLengthon the facets array (per learnings), andsummaryhas appropriate length constraints.
30-49: Schema is correct—no mismatch between documentation and weightedContributor definition.The
weightfield inorg.hypercerts.defs#weightedContributoris optional (not in therequiredarray), and its schema description explicitly states "If omitted, treat as 1," which matches the comment inevaluation.json. The lexicon semantics are consistent.README.md (2)
367-376: README.md accurately reflects the schema—org.hypercerts.claim.project.descriptionis intentionally a Leaflet document.The schema confirms this design choice: project uses
pub.leaflet.pages.linearDocument#mainfor rich-text storage, while other entities (activity, contribution, outcome, collection, attachment, badge) use the string +descriptionFacetspattern. This architectural difference is by design and the README documentation matches the actual schema definitions.
262-276: No action needed—README accurately matches the lexicon schemas.The README correctly documents
inputsfor Evaluation andcontentfor Attachment, matching the actual definitions in evaluation.json and attachment.json. Both fields serve similar purposes (holding URIs or blobs) but intentionally use distinct names within their respective schemas, and the README reflects this accurately. The properties, descriptions, and types all align between the documentation and the lexicon files.lexicons/app/bsky/richtext/facet.json (1)
1-52: File matches canonical Bluesky/ATProto upstream definition.Verification confirms
lexicons/app/bsky/richtext/facet.jsonaligns with the official ATProto repository lexicon, including thetagfield constraints (maxLength: 640, maxGraphemes: 64) and all other structure. No drift detected.
|
@holkexyz I haven't looked at this properly yet but I suspect it will make sense to split into some smaller PRs. I can help with that and fix the merge conflicts at the same time, unless someone else wants to do it. |
Makes sense. I can split it into smaller PRs |
Actually, it is quite the pain to split it now:D @s-adamantine did you already have a look at it? |
| "key": "tid", | ||
| "record": { | ||
| "type": "object", | ||
| "required": ["contributors", "title", "createdAt"], |
There was a problem hiding this comment.
shouldn't the content also be required?
|
not relevant anymore |
Summary by CodeRabbit
New Features
Updates
Removed
✏️ Tip: You can customize this high-level summary in your review settings.