Skip to content

renaming fields to contributorIdentity and contributionWeight in activity claim - #114

Merged
aspiers merged 1 commit into
developfrom
rename-contributor-items-in-activity-claim
Jan 21, 2026
Merged

renaming fields to contributorIdentity and contributionWeight in activity claim#114
aspiers merged 1 commit into
developfrom
rename-contributor-items-in-activity-claim

Conversation

@holkexyz

@holkexyz holkexyz commented Jan 21, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Contributor tracking now uses structured contributor objects with a required identity plus optional weight and details.
    • Activity records can include multiple locations and per-item weights.
  • Breaking Changes

    • Field previously holding simple contributor references is now a contributors array of objects; migration guidance and examples included.
    • Some activity/location fields changed from single references to arrays.
  • Documentation

    • Added migration examples and guidance for adding locations to activities.

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

@changeset-bot

changeset-bot Bot commented Jan 21, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: d0a03bb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jan 21, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Refactors activity contributors: contributionscontributors and replaces an array of strongRefs with an array of contributor objects (identity, weight, details). Adds new contributor defs and removes org.hypercerts.claim.contributor. Provides migration guidance. README adds a locations-as-array documentation subsection.

Changes

Cohort / File(s) Summary
Contributor schema refactor
lexicons/org/hypercerts/claim/activity.json, SCHEMAS.md, .changeset/refactor-contributions-structure.md
Renamed contributionscontributors; element type changed from strongRef to object org.hypercerts.claim.activity#contributor with required contributorIdentity (string or strongRef), optional contributionWeight (string numeric), optional contributionDetails (string or strongRef). Removed public lexicon org.hypercerts.claim.contributor. Migration example added.
Defs and property renames
lexicons/org/hypercerts/claim/activity.json, SCHEMAS.md
Internal/public defs added/renamed: contributorIdentity, contributorRole; contributorInformationcontributorIdentity; weightcontributionWeight. Descriptions updated to reference new paths.
Docs: locations & examples
README.md, SCHEMAS.md
README adds "Adding Locations to Activities" describing locations as an array of strongRefs with validation notes. SCHEMAS.md updated to reflect property/name changes and example migration JSON.

Sequence Diagram(s)

(omitted — schema/data-model changes only)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • s-adamantine

Poem

🐰 A tiny hop through lexicon trees,

contributors now sway in gentle breeze,
identities, weights, and details bloom,
locations gather room by room,
a rabbit cheers for schema ease.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and clearly describes the primary change: renaming contributorInformation to contributorIdentity and weight to contributionWeight in the activity claim lexicon.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Lexicon Documentation Sync ✅ Passed The lexicon documentation is properly synchronized across activity.json, SCHEMAS.md, and README.md with correctly renamed fields and new locations feature.
Lexicons Styleguide Compliance ✅ Passed The lexicon file fully complies with the ATProto lexicon style guide with proper documentation, camelCase conventions, and correct namespace notation.

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


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@lexicons/org/hypercerts/claim/activity.json`:
- Around line 86-90: Update the description for the contributorIdentity property
to reference the current lexicon name instead of the old
org.hypercerts.claim.contributorInformation#main; locate the contributorIdentity
object (type: "union", refs: ["#contributorIdentity",
"com.atproto.repo.strongRef"]) and change the description text to mention the
new contributorIdentity identifier (e.g.,
org.hypercerts.claim.contributorIdentity#main) or otherwise remove the outdated
lexicon name so the description matches the refs and current property name.

Comment thread lexicons/org/hypercerts/claim/activity.json

@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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
SCHEMAS.md (1)

27-27: Correct the type specification for the contributors property in SCHEMAS.md.

The contributors property is incorrectly documented as type ref on line 27. According to the lexicon definition in lexicons/org/hypercerts/claim/activity.json, contributors is actually an array type with items that reference the contributor definition. Update line 27 to document the type as array to match the actual schema structure.

@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

🤖 Fix all issues with AI agents
In `@SCHEMAS.md`:
- Line 29: Update README.md to document the activity record's locations field
now being an array: explain that "locations" is an array of strongRef objects
pointing to records conforming to app.certified.location, show the strongRef
shape used elsewhere in the repo (key fields and example), and describe the
sidecar pattern for embedding location metadata similar to the existing location
and collection sidecar examples; include a short example activity JSON with a
locations array referencing two app.certified.location records and a brief note
on validation/expectations.

Comment thread SCHEMAS.md Outdated
@holkexyz holkexyz linked an issue Jan 21, 2026 that may be closed by this pull request
@aspiers
aspiers force-pushed the rename-contributor-items-in-activity-claim branch from 2cc43c6 to d0a03bb Compare January 21, 2026 22:41
@aspiers
aspiers merged commit b8d34a8 into develop Jan 21, 2026
3 of 4 checks passed
@aspiers
aspiers deleted the rename-contributor-items-in-activity-claim branch January 21, 2026 22:43

@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

🤖 Fix all issues with AI agents
In @.changeset/refactor-contributions-structure.md:
- Around line 25-40: The migration example uses a fenced block labeled "json"
but contains inline comments ("// Before"/"// After") which makes it invalid
JSON; update the fenced block language to "jsonc" or remove the inline comment
lines so the example is valid JSON, and ensure the example shows the original
"contributions" array and the new "contributors" array with fields like
"contributorIdentity", "contributionWeight", and "contributionDetails" exactly
as in the diff so readers can copy/paste without syntax errors.

Comment on lines +25 to +40
```json
// Before
"contributions": [strongRef1, strongRef2]

// After
"contributors": [
{
"contributorIdentity": "did:example:123",
"contributionWeight": "1.5",
"contributionDetails": "Lead developer"
},
{
"contributorIdentity": strongRefToContributorInfo,
"contributionDetails": strongRefToContributionDetails
}
]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Use valid JSON (or label as JSONC) in the migration example.

The // Before/// After comments make the json block invalid to copy/paste. Consider switching to jsonc or removing the inline comments.

💡 Suggested tweak
-```json
+```jsonc
🤖 Prompt for AI Agents
In @.changeset/refactor-contributions-structure.md around lines 25 - 40, The
migration example uses a fenced block labeled "json" but contains inline
comments ("// Before"/"// After") which makes it invalid JSON; update the fenced
block language to "jsonc" or remove the inline comment lines so the example is
valid JSON, and ensure the example shows the original "contributions" array and
the new "contributors" array with fields like "contributorIdentity",
"contributionWeight", and "contributionDetails" exactly as in the diff so
readers can copy/paste without syntax errors.

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.

change weight to contributionWeight in activity claim

2 participants