Skip to content

add funding receipt schema - #37

Merged
aspiers merged 1 commit into
mainfrom
add-funding-record
Dec 16, 2025
Merged

add funding receipt schema#37
aspiers merged 1 commit into
mainfrom
add-funding-record

Conversation

@holkexyz

@holkexyz holkexyz commented Dec 12, 2025

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Added a funding receipt record to track monetary transactions (from/to, amount, currency, optional payment rail/network, transaction ID, optional linked activity, notes, occurredAt and createdAt timestamps).
  • Data Model

    • Introduced a funder entity and funding-receipt relationships connecting funders, contributors, and activities; evaluation records may include optional measurements.
  • Documentation

    • README updated to document the new funding receipt lexicon; timestamps use ISO 8601 and notes have a max length.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Dec 12, 2025

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

Walkthrough

Adds a new funding receipt lexicon org.hypercerts.funding.receipt, introduces funder and fundingReceipt to the ERD with funding relationships and layout hints, and inserts corresponding documentation into the README.

Changes

Cohort / File(s) Summary
Funding Receipt Lexicon
\lexicons/org/hypercerts/funding/receipt.json``
New public lexicon org.hypercerts.funding.receipt with main record keyed by tid. Schema defines from, to, amount, currency, paymentRail, paymentNetwork, transactionId, for (at‑uri), notes (maxLength 500), occurredAt (datetime), createdAt; types, formats and required flags included.
Entity Relationship Diagram
\ERD.puml``
Added entity funder and dataclass fundingReceipt (fields: to, from, for?, amount, currency, paymentRail?, paymentNetwork?, transactionId?, notes?, occurredAt?, createdAt) gated by SHOW_FIELDS. Added edges linking funder→activity (funds), fundingReceipt.from→funder, fundingReceipt.to→contributor, fundingReceipt.for→activity, plus layout/hidden nodes for presentation.
Documentation / README
\README.md``
Inserted lexicon documentation for org.hypercerts.funding.receipt (key: tid) listing properties, required flags, formats (ISO 8601 for datetimes), and constraints; section appears alongside existing lexicon blocks (duplicated insertion present in diff).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–30 minutes

  • Review lexicons/org/hypercerts/funding/receipt.json for schema consistency with existing lexicons (required vs optional, formats, maxLength).
  • Verify ERD.puml gating with SHOW_FIELDS, relationship directions, and that layout/hidden nodes don't break rendering.
  • Reconcile duplicated README insertion and ensure documentation matches the lexicon file.

Suggested reviewers

  • s-adamantine

Poem

🐰 I found a tiny funding slip,
From DID to AT on a carrot ship,
Numbers hopped and timestamps bright,
I tucked the proof away tonight,
Ledger crumbs beneath my whiskers.

Pre-merge checks and finishing touches

✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title 'add funding receipt schema' directly and clearly summarizes the main change: introduction of a new funding receipt lexicon schema across multiple files (JSON definition, ERD diagram, and documentation).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Lexicon Documentation Sync ✅ Passed The JSON lexicon, README.md, and ERD.puml are properly synchronized with matching properties, types, formats, and descriptions across all files.

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a9603d6 and a8a20c4.

⛔ Files ignored due to path filters (4)
  • ERD-with-fields.png is excluded by !**/*.png
  • ERD-with-fields.svg is excluded by !**/*.svg
  • ERD.png is excluded by !**/*.png
  • ERD.svg is excluded by !**/*.svg
📒 Files selected for processing (3)
  • ERD.puml (4 hunks)
  • README.md (1 hunks)
  • lexicons/org/hypercerts/funding/receipt.json (1 hunks)

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

@holkexyz
holkexyz requested a review from pheuberger December 12, 2025 15:01

@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: 2

🧹 Nitpick comments (1)
lexicons/org/hypercerts/funding/receipt.json (1)

18-65: Consider stronger typing/constraints for identifiers & money fields (and avoid for for TS ergonomics).

  • from / to: if ATProto lexicon supports format: "did" (or similar), use it; otherwise consider a regex/pattern or clearer naming (e.g., fromDid, toDid, and separate toDisplayName / anonymous flag) to match the description.
  • amount: using JSON number for money can introduce rounding issues; consider a decimal string (e.g., "type": "string" with a pattern) or split into { amount: string, decimals: int } depending on conventions in this repo.
  • currency: consider constraints (e.g., maxLength, pattern for ISO-4217, or an enum if you have a known set).
  • for: TS generators often make "for" an awkward property to access; consider renaming to relatedTo / subject / reference while this is still new.

(Verification needed: what format values are officially supported by the ATProto lexicon schema v1, and how your generator maps keyword property names.)

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5b3015a and 1e8e4e1.

📒 Files selected for processing (1)
  • lexicons/org/hypercerts/funding/receipt.json (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
lexicons/**/*.json

📄 CodeRabbit inference engine (AGENTS.md)

lexicons/**/*.json: Regenerate TypeScript API types after modifying lexicon JSON files by running npm run gen-api
Lexicon JSON files should follow the ATProto lexicon schema v1 structure with lexicon, id, and defs.main properties
When adding a new lexicon, create a new JSON file in lexicons/ following the namespace structure and then regenerate types
Validate lexicon definitions and regenerate types using npm run check before deployment

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

Files:

  • lexicons/org/hypercerts/funding/receipt.json
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T16:09:09.119Z
Learning: Applies to lexicons/**/*.json : Lexicon JSON files should follow the ATProto lexicon schema v1 structure with `lexicon`, `id`, and `defs.main` properties
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)
📚 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/funding/receipt.json
🪛 GitHub Actions: Lint
lexicons/org/hypercerts/funding/receipt.json

[error] 1-1: Prettier formatting check failed. Run 'prettier --write' to fix code style issues in this file.

Comment thread lexicons/org/hypercerts/funding/receipt.json
Comment thread lexicons/org/hypercerts/funding/receipt.json Outdated

@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: 0

♻️ Duplicate comments (1)
lexicons/org/hypercerts/funding/receipt.json (1)

1-71: CI is failing on Prettier; also ensure gen/types + docs updates land in this PR.

Lint shows prettier --check . failing; please run Prettier and commit the formatted result, then regenerate/validate per repo guidelines:

  • prettier --write lexicons/org/hypercerts/funding/receipt.json (or prettier --write .)
  • npm run gen-api
  • npm run check
    Also ensure README.md documents org.hypercerts.funding.receipt, and update ERD.puml if you treat “funding receipt” as an entity/relationship in the diagram. (Based on learnings & coding guidelines.)
🧹 Nitpick comments (2)
lexicons/org/hypercerts/funding/receipt.json (2)

7-66: Tighten schema semantics (avoid “empty string” sender; constrain amount).

Two small tweaks would reduce downstream ambiguity:

  • Prefer “omit from” over “empty string” (and optionally enforce minLength: 1).
  • Constrain amount to be non-negative (and maybe > 0, depending on whether refunds/voids are represented elsewhere).
           "from": {
             "type": "string",
             "format": "did",
-            "description": "DID of the sender who transferred the funds. Leave empty if sender wants to stay anonymous."
+            "description": "DID of the sender who transferred the funds. Omit if the sender is anonymous."
+            ,"minLength": 1
           },
@@
           "amount": {
             "type": "number",
-            "description": "Amount of funding received."
+            "description": "Amount of funding received."
+            ,"minimum": 0
           },

If amount must always be positive, use "exclusiveMinimum": 0 instead of "minimum": 0.


23-26: to field: schema doesn’t match the stated “DID or clear-text” contract.

Right now to is just string with no way to tell “DID” vs “name”. If consumers need to distinguish, consider modeling to as an object (e.g., { did?: string; name?: string }) or a union style used elsewhere in this repo (if applicable), rather than an overloaded string.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a630234 and 81a470b.

📒 Files selected for processing (1)
  • lexicons/org/hypercerts/funding/receipt.json (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
lexicons/**/*.json

📄 CodeRabbit inference engine (AGENTS.md)

lexicons/**/*.json: Regenerate TypeScript API types after modifying lexicon JSON files by running npm run gen-api
Lexicon JSON files should follow the ATProto lexicon schema v1 structure with lexicon, id, and defs.main properties
When adding a new lexicon, create a new JSON file in lexicons/ following the namespace structure and then regenerate types
Validate lexicon definitions and regenerate types using npm run check before deployment

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

Files:

  • lexicons/org/hypercerts/funding/receipt.json
🧠 Learnings (8)
📓 Common learnings
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T16:09:09.119Z
Learning: Applies to lexicons/**/*.json : Lexicon JSON files should follow the ATProto lexicon schema v1 structure with `lexicon`, `id`, and `defs.main` properties
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T16:09:09.119Z
Learning: Applies to lexicons/**/*.json : When adding a new lexicon, create a new JSON file in `lexicons/` following the namespace structure and then regenerate types
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)
📚 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/funding/receipt.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:

  • lexicons/org/hypercerts/funding/receipt.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/funding/receipt.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/funding/receipt.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/funding/receipt.json
📚 Learning: 2025-12-09T16:09:09.119Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T16:09:09.119Z
Learning: Applies to lexicons/**/*.json : Validate lexicon definitions and regenerate types using `npm run check` before deployment

Applied to files:

  • lexicons/org/hypercerts/funding/receipt.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:

  • lexicons/org/hypercerts/funding/receipt.json
🪛 GitHub Actions: Lint
lexicons/org/hypercerts/funding/receipt.json

[warning] 1-1: Code style issues found in the above file. Run Prettier with --write to fix.


[error] 1-1: Prettier formatting check failed (prettier --check .). Run 'prettier --write .' to fix code style issues in this file.

@satyam-mishra-pce satyam-mishra-pce left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I left some comments.

I have some questions...

  1. Is this lexicon to be used to record transactions after tokenization of hypercerts?
  2. Who holds this record? Receipient, or the Sender?
  3. What is gonna be the actual source of truth? Because the record can be altered by the creator of it.

Comment thread lexicons/org/hypercerts/funding/receipt.json
Comment thread lexicons/org/hypercerts/funding/receipt.json
"record": {
"type": "object",
"required": [
"to",

@aspiers aspiers Dec 15, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@holkexyz Shouldn't from be required in funding receipts? Even with anonymous donations, I think it's better to require explicit declaration that they're anonymous rather than not being able to distinguish between that and "oops the code accidentally forgot to include that field".

"for": {
"type": "string",
"format": "at-uri",
"description": "Optional reference to the activity, project, or organization this funding relates to."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@holkexyz Why is this optional?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

If I just want to record that I sent you some funds. Most of the time, we want to record what it was for, but maybe I just want to record the payment

@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

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 81a470b and 6c478d5.

⛔ Files ignored due to path filters (4)
  • ERD-with-fields.png is excluded by !**/*.png
  • ERD-with-fields.svg is excluded by !**/*.svg
  • ERD.png is excluded by !**/*.png
  • ERD.svg is excluded by !**/*.svg
📒 Files selected for processing (3)
  • ERD.puml (4 hunks)
  • README.md (1 hunks)
  • lexicons/org/hypercerts/funding/receipt.json (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • ERD.puml
🧰 Additional context used
📓 Path-based instructions (2)
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
lexicons/**/*.json

📄 CodeRabbit inference engine (AGENTS.md)

lexicons/**/*.json: Regenerate TypeScript API types after modifying lexicon JSON files by running npm run gen-api
Lexicon JSON files should follow the ATProto lexicon schema v1 structure with lexicon, id, and defs.main properties
When adding a new lexicon, create a new JSON file in lexicons/ following the namespace structure and then regenerate types
Validate lexicon definitions and regenerate types using npm run check before deployment

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

Files:

  • lexicons/org/hypercerts/funding/receipt.json
🧠 Learnings (13)
📓 Common learnings
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T16:09:09.119Z
Learning: Applies to ERD.puml : When a new lexicon affects entity relationships, update `ERD.puml` to reflect the 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)
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)
📚 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.md
  • lexicons/org/hypercerts/funding/receipt.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.md
  • lexicons/org/hypercerts/funding/receipt.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 : 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:

  • lexicons/org/hypercerts/funding/receipt.json
📚 Learning: 2025-12-09T16:09:09.119Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T16:09:09.119Z
Learning: Applies to lexicons/**/*.json : Lexicon JSON files should follow the ATProto lexicon schema v1 structure with `lexicon`, `id`, and `defs.main` properties

Applied to files:

  • lexicons/org/hypercerts/funding/receipt.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/funding/receipt.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/funding/receipt.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/funding/receipt.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/funding/receipt.json
📚 Learning: 2025-12-09T16:09:09.119Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T16:09:09.119Z
Learning: Applies to lexicons/**/*.json : Validate lexicon definitions and regenerate types using `npm run check` before deployment

Applied to files:

  • lexicons/org/hypercerts/funding/receipt.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:

  • lexicons/org/hypercerts/funding/receipt.json
📚 Learning: 2025-12-09T16:09:09.119Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T16:09:09.119Z
Learning: Check code formatting using `npm run lint` or `npm run format:check` before submitting code

Applied to files:

  • lexicons/org/hypercerts/funding/receipt.json
🪛 GitHub Actions: Lint
README.md

[warning] 1-1: Code style issues found in README.md. Run Prettier with --write to fix.


[error] 1-1: Prettier formatting check failed. Run 'prettier --write' to fix code style issues.

🪛 LanguageTool
README.md

[style] ~294-~294: To form a complete sentence, be sure to include a subject.
Context: ...| ✅ | The recipient of the funds. Can be identified by DID or a clear-text na...

(MISSING_IT_THERE)


[grammar] ~299-~299: Ensure spelling is correct
Context: ...yment transaction (e.g. bank reference, onchain transaction hash, or processor-specific...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🔇 Additional comments (3)
README.md (2)

281-305: Properties documentation matches schema accurately.

All fields in the funding receipt lexicon are properly documented with correct required/optional flags, types, and descriptions that align with the JSON schema. The lexicon ID is consistent between README and the JSON file.


281-305: ERD.puml is correctly updated with fundingReceipt entity and all relationships.

The diagram includes the fundingReceipt entity (lines 160-176) with the three required relationships: funder (from), contributor (to), and activity (for). The entity definition and relationships align with the README.md documentation.

lexicons/org/hypercerts/funding/receipt.json (1)

1-66: Schema structure follows ATProto v1 correctly and prior issues are addressed.

The lexicon properly follows the ATProto schema format with lexicon, id, defs.main, and appropriate record definition. Previously identified concerns have been resolved:

  • "occuredAt" typo corrected to "occurredAt" ✓
  • amount field uses string type for fractional values ✓
  • from field is correctly marked as required ✓
  • All properties match their documentation in README.md ✓

Comment thread README.md Outdated
@aspiers
aspiers force-pushed the add-funding-record branch 2 times, most recently from 86fd62c to 937f89b Compare December 15, 2025 16:55
@aspiers

aspiers commented Dec 15, 2025

Copy link
Copy Markdown
Contributor

@satyam-mishra-pce wrote:

I have some questions...

  1. Is this lexicon to be used to record transactions after tokenization of hypercerts?

I think it's only (or at least mainly) for funding pre-tokenization, e.g. donations.

  1. Who holds this record? Receipient, or the Sender?

Probably the platform / broker who is handling the payments.

  1. What is gonna be the actual source of truth? Because the record can be altered by the creator of it.

The platform / broker.

@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

🧹 Nitpick comments (2)
ERD.puml (2)

48-52: Funder entity modeling is consistent; consider updating the surrounding comment.

funder is modeled identically to contributor (DID or name/pseudonym) and fits the existing pattern of non-lexicon entities, so this looks good. For clarity, you might extend the comment above to mention funders as well:

-' Contributors are represented by DIDs or human-readable strings
-' therefore do not require modelling via a lexicon.
+' Contributors and funders are represented by DIDs or human-readable strings
+' therefore do not require modelling via a lexicon.

159-174: FundingReceipt dataclass and relationships align with the lexicon; arrow direction is a minor style nit.

The fundingReceipt fields and their optionality match the JSON lexicon/README (from, to, for?, amount, currency, paymentRail?, paymentNetwork?, transactionId?, notes?, occurredAt?, createdAt), and the relationships

  • funder <-- fundingReceipt::from : from
  • contributor <-- fundingReceipt::to : to
  • activity <-- fundingReceipt::for : for

are consistent with the intended semantics.

If you want diagram consistency, you could flip these to follow the same left-to-right pattern used elsewhere (e.g. contribution::contributors --> contributor):

-funder <-- fundingReceipt::from : from
-contributor <-- fundingReceipt::to : to
-activity <-- fundingReceipt::for : for
+fundingReceipt::from --> funder : from
+fundingReceipt::to --> contributor : to
+fundingReceipt::for --> activity : for

Purely stylistic; current form is functionally fine.

Also applies to: 185-202

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6c478d5 and 937f89b.

⛔ Files ignored due to path filters (4)
  • ERD-with-fields.png is excluded by !**/*.png
  • ERD-with-fields.svg is excluded by !**/*.svg
  • ERD.png is excluded by !**/*.png
  • ERD.svg is excluded by !**/*.svg
📒 Files selected for processing (3)
  • ERD.puml (4 hunks)
  • README.md (1 hunks)
  • lexicons/org/hypercerts/funding/receipt.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • lexicons/org/hypercerts/funding/receipt.json
🧰 Additional context used
📓 Path-based instructions (2)
ERD.puml

📄 CodeRabbit inference engine (AGENTS.md)

When a new lexicon affects entity relationships, update ERD.puml to reflect the changes

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
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 (4)
📓 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 ERD.puml if entity relationships changed (add new entities, modify relationships, remove deleted entities)
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-09T16:09:09.119Z
Learning: Applies to ERD.puml : When a new lexicon affects entity relationships, update `ERD.puml` to reflect the 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 README.md : Ensure that all lexicons documented in README.md exist as JSON files in the lexicons/ directory
📚 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.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 README.md : Ensure all properties documented in README.md match the actual JSON schema definitions in lexicons/**/*.json

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
🪛 LanguageTool
README.md

[grammar] ~299-~299: Ensure spelling is correct
Context: ...yment transaction (e.g. bank reference, onchain transaction hash, or processor-specific...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

@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: 2

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 937f89b and f1cc988.

⛔ Files ignored due to path filters (4)
  • ERD-with-fields.png is excluded by !**/*.png
  • ERD-with-fields.svg is excluded by !**/*.svg
  • ERD.png is excluded by !**/*.png
  • ERD.svg is excluded by !**/*.svg
📒 Files selected for processing (3)
  • ERD.puml (4 hunks)
  • README.md (1 hunks)
  • lexicons/org/hypercerts/funding/receipt.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • lexicons/org/hypercerts/funding/receipt.json
🧰 Additional context used
📓 Path-based instructions (3)
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
!(types)/**/*.{js,ts,tsx,json,md}

📄 CodeRabbit inference engine (AGENTS.md)

Run npm run format with Prettier before committing to ensure consistent code formatting

Files:

  • ERD.puml
  • README.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 (5)
📓 Common learnings
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.862Z
Learning: Applies to lexicons/**/*.json : Update `README.md` documentation when adding or modifying lexicon definitions
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)
📚 Learning: 2025-12-15T17:53:11.862Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.862Z
Learning: Applies to lexicons/**/*.json : Update `README.md` documentation when adding or modifying lexicon definitions

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 : 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.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 README.md : Ensure all properties documented in README.md match the actual JSON schema definitions in lexicons/**/*.json

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
🪛 LanguageTool
README.md

[grammar] ~299-~299: Ensure spelling is correct
Context: ...yment transaction (e.g. bank reference, onchain transaction hash, or processor-specific...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🔇 Additional comments (2)
ERD.puml (2)

48-52: New funder entity added correctly.

The new funder entity follows the same pattern as the existing contributor entity, appropriately marked with entity stereotype and color #FFD4A3.


159-174: fundingReceipt dataclass structure matches documentation.

The field list in the fundingReceipt dataclass aligns with the properties documented in README.md (lines 291-303). All required and optional fields are correctly represented.

Comment thread ERD.puml Outdated
Comment thread README.md
"key": "tid",
"record": {
"type": "object",
"required": ["from", "to", "amount", "currency", "createdAt"],

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I left out "from" intentionally, as an anonymous donation would be an empty "from" field. I think that is cleaner than having "anon" or so in the field. Or is there a different best practice? @aspiers

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes I think there is a different best practice as mentioned in #37 (comment)

When data is omitted, it is open to different interpretations as well as buggy code which accidentally omits the value. In contrast when it's explicitly marked as anonymous then there is no doubt of the intended meaning, and requiring a value will reveal omission bugs early.

"key": "tid",
"record": {
"type": "object",
"required": ["to", "amount", "currency", "createdAt"],

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I removed "from" as required because an empty field represents an anon donation. Or is there a different best practice for that?

@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: 0

♻️ Duplicate comments (1)
lexicons/org/hypercerts/funding/receipt.json (1)

11-16: Verify resolution of the from field requirement contradiction.

The from field remains in the required array while its description states "Leave empty if sender wants to stay anonymous." Required fields cannot be empty in practice, and an empty string would fail DID format validation.

This contradiction was flagged in previous reviews and marked as addressed, but appears to persist in the current code.

Verify the current resolution status:

#!/bin/bash
# Check the current state of the from field in the lexicon
echo "=== Checking 'from' field requirement status ==="
cat lexicons/org/hypercerts/funding/receipt.json | jq '.defs.main.record.required, .defs.main.record.properties.from'

echo -e "\n=== Checking README documentation ==="
grep -A 1 "| \`from\`" README.md | head -2
🧹 Nitpick comments (1)
ERD.puml (1)

272-275: Consider removing redundant direct funding relationship.

Line 272 creates a direct funder --> activity : funds relationship, while line 275 shows fundingReceipt::for --> activity : funds. Both represent the same "funds" relationship type to activity, which appears redundant.

The lexicon schema models funding through the fundingReceipt record (with from, to, and for fields), not as a direct funder→activity relationship. The three join-table relationships (lines 273-275) already fully represent the funding model.

Consider removing line 272 to eliminate redundancy:

-funder --> activity : funds
 fundingReceipt::from --> funder
 fundingReceipt::to --> contributor
 fundingReceipt::for --> activity : funds

Alternatively, if showing both conceptual and implementation relationships is intentional, add a comment explaining the distinction.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1076a6c and a9603d6.

⛔ Files ignored due to path filters (4)
  • ERD-with-fields.png is excluded by !**/*.png
  • ERD-with-fields.svg is excluded by !**/*.svg
  • ERD.png is excluded by !**/*.png
  • ERD.svg is excluded by !**/*.svg
📒 Files selected for processing (3)
  • ERD.puml (4 hunks)
  • README.md (1 hunks)
  • lexicons/org/hypercerts/funding/receipt.json (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
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 running npm run gen-api
Lexicon JSON files should follow the ATProto lexicon schema v1 specification
Run npm run check before committing to validate lexicon syntax and ensure valid lexicon definitions
Update ERD.puml when modifying lexicon structures to reflect entity relationship changes
Update README.md documentation 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/funding/receipt.json
!(types)/**/*.{js,ts,tsx,json,md}

📄 CodeRabbit inference engine (AGENTS.md)

Run npm run format with Prettier before committing to ensure consistent code formatting

Files:

  • lexicons/org/hypercerts/funding/receipt.json
  • ERD.puml
  • README.md
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
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 (20)
📓 Common learnings
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.862Z
Learning: Applies to lexicons/**/*.json : Update `README.md` documentation when adding or modifying lexicon definitions
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)
📚 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/funding/receipt.json
  • README.md
📚 Learning: 2025-12-15T17:53:11.862Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.862Z
Learning: Applies to lexicons/**/*.json : Update `README.md` documentation when adding or modifying lexicon definitions

Applied to files:

  • lexicons/org/hypercerts/funding/receipt.json
  • README.md
📚 Learning: 2025-12-15T17:53:11.862Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.862Z
Learning: Applies to lexicons/**/*.json : Update `ERD.puml` when modifying lexicon structures to reflect entity relationship changes

Applied to files:

  • lexicons/org/hypercerts/funding/receipt.json
  • ERD.puml
📚 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:

  • lexicons/org/hypercerts/funding/receipt.json
  • ERD.puml
📚 Learning: 2025-12-15T17:53:11.862Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.862Z
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/funding/receipt.json
📚 Learning: 2025-12-15T17:53:11.862Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.862Z
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/funding/receipt.json
  • README.md
📚 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/funding/receipt.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/funding/receipt.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/funding/receipt.json
  • README.md
📚 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/funding/receipt.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/funding/receipt.json
📚 Learning: 2025-12-15T17:53:11.862Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.862Z
Learning: Applies to lexicons/**/*.json : Run `npm run check` before committing to validate lexicon syntax and ensure valid lexicon definitions

Applied to files:

  • lexicons/org/hypercerts/funding/receipt.json
📚 Learning: 2025-12-15T17:53:11.862Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.862Z
Learning: The `.prettierignore` file excludes `types/` directory since it contains generated code that should not be manually formatted

Applied to files:

  • lexicons/org/hypercerts/funding/receipt.json
📚 Learning: 2025-12-15T17:53:11.862Z
Learnt from: CR
Repo: hypercerts-org/hypercerts-lexicon PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-15T17:53:11.862Z
Learning: Applies to lexicons/**/*.json : Lexicon JSON files should follow the ATProto lexicon schema v1 specification

Applied to files:

  • lexicons/org/hypercerts/funding/receipt.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.puml
📚 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:

  • ERD.puml
📚 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.puml
📚 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: 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.

Applied to files:

  • ERD.puml
📚 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
🪛 LanguageTool
README.md

[grammar] ~324-~324: Ensure spelling is correct
Context: ...yment transaction (e.g. bank reference, onchain transaction hash, or processor-specific...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🔇 Additional comments (3)
lexicons/org/hypercerts/funding/receipt.json (1)

1-66: Lexicon structure is well-designed.

The lexicon follows ATProto v1 schema correctly with appropriate field types, format constraints, and optional/required designations. The use of string types for amount and avoidance of enum constraints align with extensibility best practices.

README.md (1)

306-330: Documentation is complete and consistent with lexicon schema.

The README section accurately documents all properties from the lexicon JSON file, including types, requirements, formats, and constraints. Field descriptions match the schema definitions.

Note: LanguageTool flags "onchain" at line 324, but per repository standards, the hyphenless spelling is correct.

Based on learnings, this repository standardizes on the hyphenless spelling "onchain" across documentation.

ERD.puml (1)

175-202: Entity and dataclass definitions are accurate.

The funder entity and fundingReceipt dataclass correctly reflect the lexicon schema. The funder follows the same pattern as contributor (DID or name-based entity), and the fundingReceipt includes all fields with correct optionality markers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants