-
Notifications
You must be signed in to change notification settings - Fork 3
Remove collection weight sum constraint #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughDocumentation and schema definition updates to the activityWeight property in the Hypercerts Defs lexicon. The README layout was reformatted with a dedicated "Required" column, and the activity.json schema description was updated to reflect that weights are flexible positive numeric values without requiring summation to a specific total. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (4 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
aspiers
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks Copilot I guess I'm no longer useful in society except as an AI's pet
|
@copilot rebase this and resolve the conflict. |
Rebase completed and merge conflicts resolved in commit 52d640b. The README.md conflict has been resolved to keep the updated weight description without the Comments column. However, I'm unable to force push the rebased branch due to authentication limitations. The local branch has been successfully rebased onto main and is ready. You may need to manually force push or grant push permissions: git push --force-with-lease origin copilot/remove-weight-constraintChanges:
|
Updated activityWeight description to allow flexible weight values that don't need to sum to 100. This removes unnecessary complexity around weight recalculation when modifying collections while maintaining backward compatibility. Frontends can normalize weights as needed for display. Closes #18 Co-authored-by: aspiers <[email protected]>
7ee9ffc to
47cb722
Compare
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
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
📒 Files selected for processing (2)
README.md(1 hunks)lexicons/org/hypercerts/claim/activity.json(1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
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/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/activity.json
🧠 Learnings (7)
📓 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 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.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
📚 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.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.json
🔇 Additional comments (1)
README.md (1)
195-198: Documentation correctly reflects the lexicon changes.The
activityWeighttable has been properly updated to match the modified schema definition inactivity.json. The description accurately reflects the new flexible weight policy, and the three-column layout with a dedicated "Required" column improves clarity.Based on coding guidelines, the documentation properly maintains consistency with the JSON schema definitions.
activityWeightweight description inlexicons/org/hypercerts/claim/activity.jsonto remove the "should add up to 100" constraintREADME.mdto reflect the relaxed constraintnpm run gen-apiThis PR addresses issue #18 by removing the hard requirement that collection weights must sum to 100, allowing more flexibility in weight assignment while maintaining backward compatibility.
Changes Made
Lexicon Update
Updated the
weightfield description inactivityWeightdefinition to:Documentation Update
Updated the README.md table to reflect the new, more flexible weight description (without the Comments column, per PR #46)
Rebase
Successfully rebased onto main branch (commit 52d640b) and resolved merge conflicts with README.md
Benefits
Testing
npm run gen-api)npm run lint)Notes
The generated TypeScript types in the
types/directory have been updated but are not committed (as they are in.gitignoreand are generated during build).Original prompt
This pull request was created from Copilot chat.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
Summary by CodeRabbit
Documentation
Updates
✏️ Tip: You can customize this high-level summary in your review settings.