Skip to content

add logic model for workScope - #107

Merged
aspiers merged 1 commit into
developfrom
logic-model-for-workScope
Jan 21, 2026
Merged

add logic model for workScope#107
aspiers merged 1 commit into
developfrom
logic-model-for-workScope

Conversation

@holkexyz

@holkexyz holkexyz commented Jan 21, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Work scope definitions now support nested boolean logic (AND/OR/NOT) for expressive scope expressions.
    • Added reusable scope tag records with hierarchical parent relationships, metadata, aliases, and optional external references.
  • Breaking Changes

    • Existing work scope values must be migrated to the new boolean-expression format to remain compatible.

✏️ 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

🦋 Changeset detected

Latest commit: 678de97

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 Jan 21, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Replaces simple workScope strongRefs with an AST-based work scope logic system: adds workScopeAll/workScopeAny/workScopeNot/workScopeAtom in defs, introduces a reusable workScopeTag record, and updates activity.workScope to accept the new union-based AST (breaking change; migration required).

Changes

Cohort / File(s) Summary
Work scope logic expressions
lexicons/org/hypercerts/defs.json
Added workScopeAll (AND), workScopeAny (OR), workScopeNot (NOT), and workScopeAtom types with op constants and recursive args/arg fields to represent nested boolean ASTs.
Work scope tag definition
lexicons/org/hypercerts/helper/workScopeTag.json
New org.hypercerts.helper.workScopeTag record with createdAt, key, label (required), kind, description, parent (strongRef), aliases, and externalReference (uri/blob).
Activity record update
lexicons/org/hypercerts/claim/activity.json
Replaced workScope com.atproto.repo.strongRef with a union referencing org.hypercerts.defs#workScopeAll, #workScopeAny, #workScopeNot, and #workScopeAtom; now expects a work scope AST (breaking change).
Changelog / changeset
.changeset/add-work-scope-logic.md
Adds a changeset documenting the new AST types, workScopeTag lexicon, and the breaking change to activity.workScope.
Docs update
SCHEMAS.md
Documents the new workScope union and added defs (workScopeAll, workScopeAny, workScopeNot, workScopeAtom) and notes activity.workScope signature change.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • bitbeckers
  • s-adamantine

Poem

🐇 I hop through lexicons, tagging scopes with care,

I braid ANDs and ORs and tuck NOTs in my lair.
Atoms whisper labels, parents hold the tree,
Now work scopes grow branches, nested wild and free. 🥕


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error)
Check name Status Explanation Resolution
Lexicon Documentation Sync ❌ Error Pull request modifies lexicon JSON files but documentation (SCHEMAS.md, README.md, ERD.puml) is not synchronized with changes to workScope field and new workScopeTag entity. Regenerate SCHEMAS.md, update README.md code example to show workScope as boolean logic expression, and update ERD.puml to include workScopeTag entity.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'add logic model for workScope' directly and accurately summarizes the main change: introducing a new work scope logic expression system with boolean operators.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Lexicons Styleguide Compliance ✅ Passed All three lexicon files (workScopeTag.json, defs.json additions, activity.json modification) fully comply with ATProto Lexicon Style Guide requirements.

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.

@holkexyz
holkexyz marked this pull request as ready for review January 21, 2026 08:59

@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/add-work-scope-logic.md:
- Around line 9-25: The changeset text refers to a non-existent `workScopeExpr`
alias and implies activity `workScope` references it; update the release notes
to match the implemented schema by either (A) replacing all mentions of
`workScopeExpr` with the actual union members `workScopeAll`, `workScopeAny`,
`workScopeNot`, and `workScopeAtom` and state that
`org.hypercerts.claim.activity#workScope` references the union of those types,
or (B) add a schema alias named `workScopeExpr` that points to the union of
`workScopeAll/Any/Not/Atom`; reference the symbols `workScopeAll`,
`workScopeAny`, `workScopeNot`, `workScopeAtom`, and
`org.hypercerts.claim.activity#workScope` so readers can find the exact
definitions.

Comment thread .changeset/add-work-scope-logic.md
@holkexyz
holkexyz requested a review from aspiers January 21, 2026 09:21
@aspiers
aspiers force-pushed the logic-model-for-workScope branch from 362726a to 678de97 Compare January 21, 2026 23:17
@aspiers
aspiers merged commit 7528e5b into develop Jan 21, 2026
3 of 4 checks passed
@aspiers
aspiers deleted the logic-model-for-workScope branch January 21, 2026 23:18
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.

2 participants