Skip to content

Add FEP-0837 Agreement and Commitment vocabulary types#817

Open
scammo wants to merge 9 commits into
fedify-dev:mainfrom
54GradSoftware:main
Open

Add FEP-0837 Agreement and Commitment vocabulary types#817
scammo wants to merge 9 commits into
fedify-dev:mainfrom
54GradSoftware:main

Conversation

@scammo

@scammo scammo commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Add FEP-0837 Agreement and Commitment vocabulary types #775
Assisted-by: Claude Code:claude-opus-4-8

@netlify

netlify Bot commented Jun 23, 2026

Copy link
Copy Markdown

Deploy Preview for fedify-json-schema ready!

Name Link
🔨 Latest commit 26ded2e
🔍 Latest deploy log https://app.netlify.com/projects/fedify-json-schema/deploys/6a3b12c01b67d7000813094c
😎 Deploy Preview https://deploy-preview-817--fedify-json-schema.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds two new FEP-0837 vocabulary type definitions (Commitment and Agreement) to @fedify/vocab with JSON-LD context mappings and functional properties. Includes comprehensive roundtrip, spec example parsing, and marketplace flow tests. Updates CHANGES.md for version 2.3.0.

Changes

FEP-0837 Vocabulary: Agreement and Commitment

Layer / File(s) Summary
Commitment vocab definition
packages/vocab/src/commitment.yaml
Defines Commitment with entity: false, defaultContext mappings for vf/om2/ActivityStreams namespaces, and two functional properties: satisfies (anyURI linking to an Intent fragment) and resourceQuantity (om2:Measure with unit and numerical value).
Agreement vocab definition
packages/vocab/src/agreement.yaml
Defines Agreement extending ActivityStreams Object, with complete defaultContext mappings for embedded Commitment and measurement fields, and two functional properties stipulates and stipulatesReciprocal both ranged to vf#Commitment.
Tests and changelog
packages/vocab/src/vocab.test.ts, CHANGES.md
Normalizes import order in vocab.test.ts, expands imports to include Agreement, Commitment, Accept, Intent, Measure, Proposal, and Reject. Adds four FEP-0837 tests: Commitment roundtrip with satisfies and resourceQuantity preservation, Agreement roundtrip with both stipulates properties, spec example parsing with resolved IDs and values, and end-to-end marketplace flow (Proposal → Offer → Accept → Agreement fetch → Reject → Create with Document contexts). Updates CHANGES.md under @fedify/vocab 2.3.0.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

  • Add vocabulary for commitment and agreement #775: This PR directly implements the vocabulary additions requested in issue #775 by introducing commitment.yaml and agreement.yaml defining FEP-0837 vocabulary types with comprehensive serialization/deserialization tests.

Suggested labels

component/federation, activitypub/interop

Suggested reviewers

  • dahlia
🚥 Pre-merge checks | ✅ 4 | ❌ 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 (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add FEP-0837 Agreement and Commitment vocabulary types' directly and clearly summarizes the main change: adding two new vocabulary types (Agreement and Commitment) for FEP-0837 standard support.
Description check ✅ Passed The description is directly related to the changeset, mentioning the FEP-0837 types being added, the associated issue #775, and acknowledging AI assistance in the implementation.
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.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces the second-stage vocabulary types for FEP-0837 (economic resource coordination in federated networks), specifically adding the Agreement and Commitment classes. It includes YAML definitions, updated snapshots, and comprehensive integration tests covering serialization, deserialization, and a full marketplace flow. Feedback is provided regarding a style guide violation in a test description where spaces were incorrectly used around an em dash.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread packages/vocab/src/vocab.test.ts Outdated
@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.
see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread CHANGES.md Outdated

@dahlia dahlia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for finishing the FEP-0837 second stage. The Agreement and Commitment definitions track the existing Proposal/Intent/Measure pattern, the defaultContext blocks cover the embedded objects, and the roundtrip tests are solid. Two small wording nits below, neither blocking.

Disclosure: this review was assisted by Claude Code (claude-opus-4-8).

Comment thread packages/vocab/src/vocab.test.ts Outdated
Comment thread packages/vocab/src/commitment.yaml Outdated
@dahlia dahlia self-assigned this Jun 23, 2026
@dahlia dahlia added this to the Fedify 2.3 milestone Jun 23, 2026
@dahlia dahlia linked an issue Jun 23, 2026 that may be closed by this pull request
@dahlia dahlia added the component/vocab Activity Vocabulary related label Jun 23, 2026

@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

🤖 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 `@packages/vocab/src/commitment.yaml`:
- Around line 30-33: In the commitment.yaml file, fix the markdown formatting
typo on line 33 where there is a missing space between "and" and the backtick in
"and`reciprocal`". Additionally, update the fragment examples from `primary` and
`reciprocal` to `#primary` and `#reciprocal` to explicitly show them as URI
fragments and make their purpose clearer to readers.
🪄 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: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2ca4944f-2cf8-4612-9379-9ff06d1c755f

📥 Commits

Reviewing files that changed from the base of the PR and between b49a383 and 9d71b41.

⛔ Files ignored due to path filters (3)
  • packages/vocab-tools/src/__snapshots__/class.test.ts.deno.snap is excluded by !**/*.snap
  • packages/vocab-tools/src/__snapshots__/class.test.ts.node.snap is excluded by !**/*.snap
  • packages/vocab-tools/src/__snapshots__/class.test.ts.snap is excluded by !**/*.snap
📒 Files selected for processing (2)
  • packages/vocab/src/commitment.yaml
  • packages/vocab/src/vocab.test.ts

Comment thread packages/vocab/src/commitment.yaml Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/vocab Activity Vocabulary related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add vocabulary for commitment and agreement

2 participants