Skip to content

Increase activity work scope string limit - #212

Merged
s-adamantine merged 2 commits into
mainfrom
karma/hyper-355-workscope-max-graphemes-is-too-small
Jun 4, 2026
Merged

Increase activity work scope string limit#212
s-adamantine merged 2 commits into
mainfrom
karma/hyper-355-workscope-max-graphemes-is-too-small

Conversation

@Kzoeps

@Kzoeps Kzoeps commented May 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Increase org.hypercerts.claim.activity#workScopeString.scope to 1,000 graphemes
  • Set corresponding maxLength to 4,000 bytes
  • Add a changeset for the schema change
  • Update SCHEMAS.md generation so field constraints on schema defs are included and don’t drift

Tests

  • npm run check

Summary by CodeRabbit

  • Documentation
    • Enhanced schema documentation across many definitions with added validation constraints, length and grapheme limits, and richer field annotations.
    • Increased free-form work scope input limits from 100 to 1,000 graphemes, with an accompanying 10,000-byte cap.

@claude claude 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.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@changeset-bot

changeset-bot Bot commented May 14, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 46dee45

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@hypercerts-org/lexicon Minor

Not sure what this means? Click here to learn what changesets are.

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

@coderabbitai

coderabbitai Bot commented May 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f9a73923-b78a-4f10-84f1-c5cd6cef1425

📥 Commits

Reviewing files that changed from the base of the PR and between ecfad2d and 46dee45.

📒 Files selected for processing (4)
  • .changeset/increase-workscope-string-limit.md
  • SCHEMAS.md
  • lexicons/org/hypercerts/claim/activity.json
  • scripts/generate-schemas.js
✅ Files skipped from review due to trivial changes (2)
  • .changeset/increase-workscope-string-limit.md
  • SCHEMAS.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • scripts/generate-schemas.js
  • lexicons/org/hypercerts/claim/activity.json

📝 Walkthrough

Walkthrough

This PR raises the activity work scope free-text limit (maxGraphemes 100 → 1,000; maxLength 1,000 → 10,000), records a minor changeset describing the change and byte cap, updates the schema doc generator to show property comments, and regenerates SCHEMAS.md with new constraint metadata.

Changes

Work Scope String Limit and Schema Documentation Update

Layer / File(s) Summary
Work scope string schema constraint update
lexicons/org/hypercerts/claim/activity.json
The workScopeString.scope field increases maxLength to 10000 and maxGraphemes to 1000.
Release metadata
.changeset/increase-workscope-string-limit.md
Changeset documents a minor release and the grapheme/byte limit increase with explanatory rationale.
Schema documentation generation and regeneration
scripts/generate-schemas.js, SCHEMAS.md
Generator now conditionally includes a "Comments" column for defs; SCHEMAS.md regenerated to include maxLength, maxGraphemes, maxSize, and accepts constraints across contributor fields, collection/evaluation/funding fields, certified defs, EVM proof/message fields, blob/image/video wrappers, richtext tags, board configs, and alignment known values.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • holkexyz
  • s-adamantine

Poem

🐇 I nibble at limits, stretch the scope wide,

Graphemes now tenfold, a roomy new stride.
Docs bloom with comments, constraints in a row,
Hypercerts hop forward — onward we go!

🚥 Pre-merge checks | ✅ 6 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (6 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 summarizes the main change: increasing the activity work scope string limit from 100 to 1,000 graphemes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Lexicon Documentation Sync ✅ Passed Activity lexicon modified with field constraint updates only. SCHEMAS.md correctly updated with constraints. README and ERD unchanged (appropriate—no structural changes or relationship modifications).
Lexicons Styleguide Compliance ✅ Passed Lexicon file complies with atproto style guide: proper lowerCamelCase naming, ASCII alphanumeric field names, maxLength/maxGraphemes ratio of 10.0 within recommended 10-20 range.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch karma/hyper-355-workscope-max-graphemes-is-too-small

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

🧹 Nitpick comments (1)
.changeset/increase-workscope-string-limit.md (1)

5-5: ⚡ Quick win

Include the 4,000-character limit in the changeset note.

The schema change updates both grapheme and character limits; documenting both here avoids ambiguous release notes for consumers.

Proposed wording
-Increase the free-form activity work scope string limit to 1,000 graphemes.
+Increase the free-form activity work scope string limit to 1,000 graphemes (maxLength: 4,000 characters).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.changeset/increase-workscope-string-limit.md at line 5, Update the
changeset note so it documents both limits: change the single sentence "Increase
the free-form activity work scope string limit to 1,000 graphemes." to
explicitly state the grapheme and character limits (e.g., "Increase the
free-form activity work scope string limit to 1,000 graphemes (up to 4,000
characters)"). Ensure the new wording appears in the
.changeset/increase-workscope-string-limit.md content so release notes clearly
convey both the grapheme and 4,000-character constraints.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@lexicons/org/hypercerts/claim/activity.json`:
- Around line 150-151: The schema changes increased workScopeString.scope limits
in lexicons/org/hypercerts/claim/activity.json (now "maxLength": 4000,
"maxGraphemes": 1000); update SCHEMAS.md to reflect these new constraints for
the workScopeString.scope field, add the new numeric limits and any
example/description text that references the previous sizes, and ensure the
SCHEMAS.md entry matches the lexicon JSON exactly so field-level docs won’t
drift.

---

Nitpick comments:
In @.changeset/increase-workscope-string-limit.md:
- Line 5: Update the changeset note so it documents both limits: change the
single sentence "Increase the free-form activity work scope string limit to
1,000 graphemes." to explicitly state the grapheme and character limits (e.g.,
"Increase the free-form activity work scope string limit to 1,000 graphemes (up
to 4,000 characters)"). Ensure the new wording appears in the
.changeset/increase-workscope-string-limit.md content so release notes clearly
convey both the grapheme and 4,000-character constraints.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ea266de5-ca9f-417b-8833-58495c2420d0

📥 Commits

Reviewing files that changed from the base of the PR and between 254fcf0 and 7dbc7ba.

📒 Files selected for processing (3)
  • .changeset/increase-workscope-string-limit.md
  • README.md
  • lexicons/org/hypercerts/claim/activity.json

Comment thread lexicons/org/hypercerts/claim/activity.json Outdated
@Kzoeps
Kzoeps force-pushed the karma/hyper-355-workscope-max-graphemes-is-too-small branch from 24f9022 to cdefa68 Compare May 14, 2026 06:47
@Kzoeps

Kzoeps commented May 14, 2026

Copy link
Copy Markdown
Contributor Author

See corresponding linear ticket for research on who used it.

@aspiers aspiers 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 think I'm in favour of this in principle, but feel we may need to do a little more work on the community-wide communications. Let's discuss quickly in the call?

Comment thread .changeset/increase-workscope-string-limit.md Outdated
@Kzoeps
Kzoeps force-pushed the karma/hyper-355-workscope-max-graphemes-is-too-small branch from 2b372dd to 76a46bc Compare June 3, 2026 06:54
@Kzoeps
Kzoeps force-pushed the karma/hyper-355-workscope-max-graphemes-is-too-small branch from 76a46bc to ecfad2d Compare June 4, 2026 09:03
@Kzoeps

Kzoeps commented Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

increased max length to 10,000 following the guidelines from atproto

If limiting the length of a string for semantic or visual reasons, grapheme limits should be used to ensure a degree of consistency across human languages. A data size (bytes) limit should also be added in these cases. A ratio of between 10 to 20 bytes to 1 grapheme is recommended.

From style guide

@Kzoeps
Kzoeps force-pushed the karma/hyper-355-workscope-max-graphemes-is-too-small branch from ecfad2d to 871608f Compare June 4, 2026 09:09
@s-adamantine
s-adamantine enabled auto-merge June 4, 2026 10:21
@s-adamantine
s-adamantine merged commit c654639 into main Jun 4, 2026
6 checks passed
@s-adamantine
s-adamantine deleted the karma/hyper-355-workscope-max-graphemes-is-too-small branch June 4, 2026 10:26
s-adamantine added a commit that referenced this pull request Jun 4, 2026
Pulls in #212 (increase activity work scope string limit, minor)
so PR #220 stays up-to-date and the eventual v1.0.0 release
correctly combines both pending changesets.
s-adamantine added a commit that referenced this pull request Jun 4, 2026
The release that ships v1.0.0 will combine this changeset with the
'increase activity work scope string limit' changeset (added via
#212 / 871608f). Reword this changeset so it describes its own
contribution (force major bump only) rather than implying the
whole v1.0.0 release is schema-clean.
@hypercerts-release-bot hypercerts-release-bot Bot mentioned this pull request Jun 10, 2026
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