Add FEP-7aa9 vocabulary support#914
Conversation
✅ Deploy Preview for fedify-json-schema canceled.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
💤 Files with no reviewable changes (2)
📝 WalkthroughWalkthroughAdds FEP-7aa9 vocabulary support: new entity schemas, a preloaded JSON-LD context, featuredCollections properties on actor types, an InteractionPolicy canFeature sub-policy, tests, and documentation updates. ChangesFEP-7aa9 Vocabulary
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
|
@codex review |
There was a problem hiding this comment.
Pull request overview
Adds first-class vocabulary (schemas, contexts, and tests) for FEP-7aa9 so Fedify can compact/expand and round-trip “featured recommendation” collections and related consent artifacts without treating them as opaque JSON-LD.
Changes:
- Added generated vocab schemas/types for
FeaturedCollection,FeaturedItem,FeatureRequest, andFeatureAuthorization, plus actorfeaturedCollectionsandInteractionPolicy.canFeature. - Added the FEP-7aa9 JSON-LD context to
@fedify/vocab-runtimepreloaded contexts and to the fixture document loader. - Expanded test coverage and snapshots to validate JSON-LD compaction/expansion and round-trips for the new terms.
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/vocab/src/vocab.test.ts | Adds JSON-LD round-trip tests and expected contexts for the new FEP-7aa9 vocab terms. |
| packages/vocab/src/snapshots/vocab.test.ts.snap | Updates snapshots for new generated properties/types. |
| packages/vocab/src/featuredcollection.yaml | Defines the FeaturedCollection entity and its topic/discoverable properties. |
| packages/vocab/src/featureditem.yaml | Defines the FeaturedItem entity and its featuredObject/featureAuthorization properties. |
| packages/vocab/src/featurerequest.yaml | Defines the FeatureRequest activity entity (reusing AS object/instrument). |
| packages/vocab/src/featureauthorization.yaml | Defines the FeatureAuthorization entity (reusing GoToSocial interaction authorization fields). |
| packages/vocab/src/interactionpolicy.yaml | Adds InteractionPolicy.canFeature and includes the FEP-7aa9 context in the default context list. |
| packages/vocab/src/application.yaml | Adds actor-level featuredCollections context mapping and property. |
| packages/vocab/src/group.yaml | Adds actor-level featuredCollections context mapping and property. |
| packages/vocab/src/organization.yaml | Adds actor-level featuredCollections context mapping and property. |
| packages/vocab/src/person.yaml | Adds actor-level featuredCollections context mapping and property. |
| packages/vocab/src/service.yaml | Adds actor-level featuredCollections context mapping and property. |
| packages/vocab-runtime/src/contexts/fep-7aa9.json | Adds the preloaded FEP-7aa9 JSON-LD context document. |
| packages/vocab-runtime/src/contexts.ts | Registers the FEP-7aa9 context in the preloaded context registry. |
| packages/fixture/src/fixtures/w3id.org/fep/7aa9.json | Adds a fixture copy of the FEP-7aa9 context for mock document loader usage in tests. |
| FEDERATION.md | Documents FEP-7aa9 as supported and links the new vocab types in the ActivityPub listings. |
| CHANGES.md | Adds changelog entries for @fedify/vocab and @fedify/vocab-runtime updates related to FEP-7aa9. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Code Review
This pull request implements vocabulary support for FEP-7aa9, introducing new entities such as FeaturedCollection, FeaturedItem, FeatureRequest, and FeatureAuthorization, along with properties like featuredCollections for actors and canFeature for InteractionPolicy. It also preloads the FEP-7aa9 JSON-LD context and updates the corresponding tests and snapshots. The review feedback suggests improving test coverage in vocab.test.ts by adding explicit assertions to verify the correct deserialization of the newly introduced canFeature policy and FeaturedCollection properties.
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.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 61c1a35ec1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/featuredcollection.yaml`:
- Around line 16-19: Remove the unused sensitive term mapping from the
FeaturedCollection default context, since the schema only defines topic and
discoverable properties and does not expose a sensitive field. Update the
context block in featuredcollection.yaml near the existing
toot/discoverable/Hashtag entries, or if FeaturedCollection should support
sensitivity, add a matching sensitive property to the schema so the mapping is
actually used.
In `@packages/vocab/src/vocab.test.ts`:
- Around line 1609-1717: The test cases for FeaturedItem.toJsonLd(),
FeatureAuthorization.fromJsonLd(), and FeatureRequest.toJsonLd() repeat the same
`@context` entries, so extract a shared base context constant to remove
duplication. Define a reusable constant near the existing test helpers (similar
to FEATURED_COLLECTION_CONTEXT) and build each expected context array from it,
with FeatureRequest prepending its extra identity entry.
🪄 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: 8b9afdc1-3f56-4c6f-9c2a-7203427e7384
⛔ Files ignored due to path filters (2)
packages/vocab-tools/src/__snapshots__/class.test.ts.deno.snapis excluded by!**/*.snappackages/vocab/src/__snapshots__/vocab.test.ts.snapis excluded by!**/*.snap
📒 Files selected for processing (16)
CHANGES.mdFEDERATION.mdpackages/fixture/src/fixtures/w3id.org/fep/7aa9.jsonpackages/vocab-runtime/src/contexts.tspackages/vocab-runtime/src/contexts/fep-7aa9.jsonpackages/vocab/src/application.yamlpackages/vocab/src/featureauthorization.yamlpackages/vocab/src/featuredcollection.yamlpackages/vocab/src/featureditem.yamlpackages/vocab/src/featurerequest.yamlpackages/vocab/src/group.yamlpackages/vocab/src/interactionpolicy.yamlpackages/vocab/src/organization.yamlpackages/vocab/src/person.yamlpackages/vocab/src/service.yamlpackages/vocab/src/vocab.test.ts
Add the FEP-7aa9 featured collection vocabulary to @fedify/vocab, including feature request, authorization, item, and collection types plus actor featuredCollections and canFeature policy support. Preload the FEP-7aa9 context and add the fixture, documentation, changelog entry, and JSON-LD round-trip coverage. Closes fedify-dev#810 Assisted-by: Codex:gpt-5.5
Add the missing featuredCollections term to the preloaded FEP-7aa9 context and fixture so compact actors using that context deserialize the actor collection link correctly. Expand the FEP-7aa9 tests to assert deserialized interaction policies and featured collection fields, share the repeated feature context in fixtures, and drop an unused sensitive term from the featured collection context. fedify-dev#914 (comment) fedify-dev#914 (comment) fedify-dev#914 (comment) fedify-dev#914 (comment) fedify-dev#914 (comment) Assisted-by: Codex:gpt-5.5
|
@codex review |
|
/gemini review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b42dca8de2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Code Review
This pull request introduces vocabulary support for FEP-7aa9, adding new entities such as FeaturedCollection, FeaturedItem, FeatureRequest, and FeatureAuthorization, along with properties like featuredCollections for actors and canFeature for interaction policies. Feedback from the review highlights that featuredCollections is not defined in the published FEP-7aa9 context. Consequently, it should be removed from the preloaded context and fixture files to ensure accuracy, and tests should be updated to define this property inline to reflect realistic real-world usage.
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.
The preloaded context and fixture should mirror the JSON-LD context served from https://w3id.org/fep/7aa9. Keep featuredCollections as an inline actor term in the test case instead of treating it as part of that remote context. fedify-dev#914 (comment) fedify-dev#914 (comment) fedify-dev#914 (comment) Assisted-by: Codex:gpt-5.5
|
@codex review |
|
/gemini review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f305b2550a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
|
/gemini review |
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request implements vocabulary support for FEP-7aa9, which introduces featuring recommendations using dedicated collections. It adds new vocabulary schemas for FeaturedCollection, FeaturedItem, FeatureRequest, and FeatureAuthorization, along with actor properties like featuredCollections and InteractionPolicy.canFeature. Additionally, the FEP-7aa9 JSON-LD context is preloaded into the runtime registry, and corresponding tests, snapshots, and documentation are updated. There are no review comments, and I have no feedback to provide.
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.
This adds vocabulary support for FEP-7aa9, so Fedify can read and write featured recommendation collections without treating the FEP terms as opaque JSON-LD.
The implementation keeps the FEP context in packages/vocab-runtime/src/contexts/fep-7aa9.json matching the published context at https://w3id.org/fep/7aa9. That matters because the context is preloaded as a remote-document substitute, not as a Fedify-specific extension point. The published context does not define
featuredCollections, so the actor vocab schemas add that mapping inline in their default contexts. This lets actor documents compactfeaturedCollectionswhile still keeping the preloaded FEP context faithful to the source document.The four FEP-defined entity types are modeled as normal generated vocab types:
FeaturedCollection,FeaturedItem,FeatureRequest, andFeatureAuthorization.FeaturedCollectionextendsOrderedCollectionbecause the FEP uses it as a dedicated ordered collection of recommendation items.FeaturedItemcarries the featured object and its authorization, whileFeatureRequestreuses the existing ActivityStreamsobjectandinstrumentproperties instead of adding duplicate schema fields.InteractionPolicy.canFeatureis added beside the existing GoToSocial interaction policy properties because the FEP builds on the same interaction rule shape. The default context forInteractionPolicynow includes both the GoToSocial namespace and the FEP-7aa9 context, so standalone policy objects can compactcanFeaturewithout relying on an enclosing actor context.Tests cover compacted JSON-LD output and round trips for the new types, the actor
featuredCollectionsproperty, andcanFeature. The fixture copy of the FEP context lets those tests use the same mock document loader pattern as the rest of packages/vocab.Closes #810.