add work scope logic expressions - #129
Conversation
🦋 Changeset detectedLatest commit: 5c982e8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds three new work-scope lexicons/structures (org.hypercerts.helper.ops, org.hypercerts.helper.workScopeExpr, org.hypercerts.helper.workScopeTag), updates activity.workScope description to reference them, and adds ERD and documentation entries describing flat and nested boolean scope expressions. Changes
Sequence Diagram(s)(Skipped) Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
Poem
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error, 1 warning)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@lexicons/org/hypercerts/helper/ops.json`:
- Around line 1-34: Add the new lexicon to the generated docs and ER diagram:
run the documentation generator (npm run gen-schemas-md) to regenerate
SCHEMAS.md so it includes the new org.hypercerts.helper.ops record (with fields
createdAt, op, args), then update ERD.puml to add an ops entity node showing
createdAt, op, args (omit facet fields) and commit both updated SCHEMAS.md and
ERD.puml; verify the lexicon id "org.hypercerts.helper.ops" and the record
properties (createdAt, op, args) appear correctly in the outputs.
There was a problem hiding this comment.
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)
1-4:⚠️ Potential issue | 🟡 MinorPipeline failure: SCHEMAS.md is out of sync with generated output.
The CI check reports
git diff --exit-codedetected changes in SCHEMAS.md, meaning the committed file diverges from whatnpm run gen-schemas-mdproduces. Please regenerate withnpm run gen-schemas-mdand commit the result.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@SCHEMAS.md` around lines 1 - 4, SCHEMAS.md was modified and is out of sync with the generated output; run the generator and commit the regenerated file: execute the command npm run gen-schemas-md to regenerate SCHEMAS.md, review the changes (git diff), stage the updated SCHEMAS.md, and commit and push so CI passes; ensure you don’t make manual edits to SCHEMAS.md since it’s auto-generated from the lexicon definitions.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@SCHEMAS.md`:
- Around line 1-4: SCHEMAS.md was modified and is out of sync with the generated
output; run the generator and commit the regenerated file: execute the command
npm run gen-schemas-md to regenerate SCHEMAS.md, review the changes (git diff),
stage the updated SCHEMAS.md, and commit and push so CI passes; ensure you don’t
make manual edits to SCHEMAS.md since it’s auto-generated from the lexicon
definitions.
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
SCHEMAS.md (1)
44-44: Nit: sentence fragment inworkScopedescription."May be a string..." has no grammatical subject. Consider "It may be a string..." or "The field may be a string..." for clarity.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@SCHEMAS.md` at line 44, The `workScope` description contains a sentence fragment ("May be a string..."); update the text for grammatical clarity by adding an explicit subject (e.g., change "May be a string, a structured scope expression..." to "It may be a string, a structured scope expression..." or "The field may be a string, a structured scope expression...") in the `workScope` entry so the description reads as a complete sentence.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@SCHEMAS.md`:
- Line 307: Update the `createdAt` field description in the SCHEMAS.md table to
match the project's standard phrasing; replace "Timestamp when this work-scope
expression was created." with "Client-declared timestamp when this record was
originally created" for the `createdAt` entry (the table row that currently
references the work-scope expression) so it is consistent with other lexicons.
---
Nitpick comments:
In `@SCHEMAS.md`:
- Line 44: The `workScope` description contains a sentence fragment ("May be a
string..."); update the text for grammatical clarity by adding an explicit
subject (e.g., change "May be a string, a structured scope expression..." to "It
may be a string, a structured scope expression..." or "The field may be a
string, a structured scope expression...") in the `workScope` entry so the
description reads as a complete sentence.
| | `allOf` | `ref` | ❌ | All referenced tags must match for something to be considered in-scope. Typically refs to org.hypercerts.helper.workScopeTag. | maxLength: 100 | | ||
| | `anyOf` | `ref` | ❌ | At least one referenced tag must match (if anyOf is present and non-empty). Typically refs to org.hypercerts.helper.workScopeTag. | maxLength: 100 | | ||
| | `noneOf` | `ref` | ❌ | None of the referenced tags may match. If any excluded tag matches, the contribution or activity is considered out-of-scope. | maxLength: 100 | | ||
| | `createdAt` | `string` | ✅ | Timestamp when this work-scope expression was created. | | |
There was a problem hiding this comment.
createdAt description is inconsistent with the rest of the document.
Every other lexicon uses "Client-declared timestamp when this record was originally created" for this field. Line 307 uses "Timestamp when this work-scope expression was created." which deviates from the established pattern.
🔧 Proposed fix
-| `createdAt` | `string` | ✅ | Timestamp when this work-scope expression was created. | |
+| `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created. | |📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| | `createdAt` | `string` | ✅ | Timestamp when this work-scope expression was created. | | | |
| | `createdAt` | `string` | ✅ | Client-declared timestamp when this record was originally created. | | |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@SCHEMAS.md` at line 307, Update the `createdAt` field description in the
SCHEMAS.md table to match the project's standard phrasing; replace "Timestamp
when this work-scope expression was created." with "Client-declared timestamp
when this record was originally created" for the `createdAt` entry (the table
row that currently references the work-scope expression) so it is consistent
with other lexicons.
|
not implementing this for now. in favor of CEL implementation |
Summary by CodeRabbit
New Features
Documentation