Skip to content

Conversation

@2chanhaeng
Copy link
Contributor

Summary

Separate vocabularies to @fedify/vocab.

Related Issue

Changes

This PR has changes across the entire codebase. This is because the Vocabulary API, which was separated in this PR, was being used throughout the codebase. However, since most of the changes occur in import statements, there shouldn't be any complex changes.

Checklist

  • Did you add a changelog entry to the CHANGES.md?
  • Did you write some relevant docs about this change (if it's a new feature)?
  • Did you write a regression test to reproduce the bug (if it's a bug fix)?
  • Did you write some tests for this change (if it's a new feature)?
  • Did you run deno task test-all on your machine?

Additional Notes

In issue #437, it was suggested to completely separate @fedify/fedify/vocab. However, @fedify/fedify/vocab references @fedify/fedify/webfinger. Therefore, to fully separate @fedify/vocab, webfinger must also be separated. @dahlia suggested that separating webfinger would be burdensome, so I implemented it based on the proposal to only separate the generated vocab.ts.

@issues-auto-labeler issues-auto-labeler bot added breaking change Breaking change component/federation Federation object related component/vocab Activity Vocabulary related labels Dec 23, 2025
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @2chanhaeng, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request undertakes a significant refactoring effort by isolating the Activity Vocabulary API into its own @fedify/vocab package. This change improves the overall architecture by decoupling the core Fedify framework from its ActivityPub vocabulary definitions, leading to a more organized and maintainable codebase. The primary impact is a widespread update of import statements, ensuring that all components correctly reference the newly separated vocabulary types.

Highlights

  • Vocabulary API Separation: The Activity Vocabulary (vocab) API has been extracted from @fedify/fedify into a new, dedicated package: @fedify/vocab. This enhances modularity and clarifies dependencies.
  • Import Path Updates: All references to ActivityPub vocabulary types (e.g., Actor, Note, Follow) across the codebase, documentation, and examples have been updated to import from the new @fedify/vocab package.
  • Build System Adjustments: The project's build configuration (deno.json, package.json, pnpm-lock.yaml, pnpm-workspace.yaml) has been updated to reflect the new @fedify/vocab package, including its dependencies and build tasks.
  • OpenTelemetry Documentation Refinement: Documentation related to OpenTelemetry tracing in docs/manual/opentelemetry.md has been adjusted, removing specific span events and attributes that are no longer relevant to the core @fedify/fedify package after the vocabulary separation.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@codecov
Copy link

codecov bot commented Dec 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Files with missing lines Coverage Δ
packages/cli/src/lookup.ts 38.91% <100.00%> (+0.25%) ⬆️
packages/fastify/src/index.ts 81.96% <ø> (ø)
packages/fedify/src/compat/transformers.ts 100.00% <ø> (ø)
packages/fedify/src/federation/builder.ts 46.63% <ø> (ø)
packages/fedify/src/federation/handler.ts 83.42% <100.00%> (ø)
packages/fedify/src/federation/inbox.ts 78.22% <100.00%> (ø)
packages/fedify/src/federation/keycache.ts 90.69% <100.00%> (ø)
packages/fedify/src/federation/middleware.ts 95.28% <100.00%> (ø)
packages/fedify/src/sig/http.ts 73.11% <100.00%> (ø)
packages/fedify/src/sig/key.ts 86.23% <100.00%> (ø)
... and 11 more
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

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 effectively separates the vocabulary definitions into a new @fedify/vocab package. The core refactoring of moving generated code and updating dependencies is well-executed. However, there are several areas that need attention. A number of import paths in the documentation and examples have been updated incorrectly, moving helper functions that remain in @fedify/fedify to the new @fedify/vocab package. There's also a significant, and likely unintentional, removal of OpenTelemetry documentation. Lastly, I've found a couple of configuration issues in the deno.json files for the new package and one of the examples. Addressing these points will ensure the codebase remains consistent and the documentation accurate.

@2chanhaeng
Copy link
Contributor Author

As I wrote in the Additional Notes, I originally planned to separate the entire @fedify/fedify/vocab into @fedify/vocab, but I couldn't do it because of the dependency on @fedify/fedify/webfinger.
After discussing this issue with @dahlia, we agreed that it's not a good idea to only separate the generated Vocabulary API code into @fedify/vocab. Instead, we both agreed that it's better to also separate @fedify/fedify/webfinger into @fedify/webfinger and follow the original plan. So, I close this PR and rework on a new PR that separates @fedify/webfinger and @fedify/vocab.

@2chanhaeng 2chanhaeng closed this Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Breaking change component/federation Federation object related component/vocab Activity Vocabulary related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant