Skip to content

Add FEP-044f quote vocabulary and recurse support#679

Merged
dahlia merged 6 commits intofedify-dev:mainfrom
dahlia:feat/452-fep-044f-vocab
Apr 15, 2026
Merged

Add FEP-044f quote vocabulary and recurse support#679
dahlia merged 6 commits intofedify-dev:mainfrom
dahlia:feat/452-fep-044f-vocab

Conversation

@dahlia
Copy link
Copy Markdown
Member

@dahlia dahlia commented Apr 15, 2026

Closes #452.

What may look surprising first

This PR started as vocabulary work, but it also updates packages/cli/src/lookup.ts, packages/cli/src/config.ts, packages/cli/src/lookup.test.ts, packages/fedify/src/federation/handler.test.ts, and packages/fedify/src/sig/proof.test.ts. That is intentional. Adding the new FEP-044f quote terms changed the compact JSON-LD contexts emitted by @fedify/vocab, so a few @fedify/fedify expectations became stale, and the CLI needed explicit --recurse=quote support so the new quote surface would not be second-class next to the older quoteUrl compatibility path.

What changed

The main change is in packages/vocab/src/. This adds QuoteRequest and QuoteAuthorization, extends InteractionPolicy with canQuote, and adds quote plus quoteAuthorization to Article, ChatMessage, Note, and Question. It also updates the wrapper contexts in files such as packages/vocab/src/create.yaml, packages/vocab/src/collection.yaml, and related collection and activity definitions so inline compaction keeps working when quoted objects or quote authorization terms appear inside nested payloads.

The branch also updates generated and snapshot-based coverage in packages/vocab/src/snapshots/vocab.test.ts.snap and packages/vocab-tools/src/snapshots/. The hand-written coverage in packages/vocab/src/vocab.test.ts now checks the new FEP-044f terms directly.

On the CLI side, packages/cli/src/lookup.ts now treats quote and https://w3id.org/fep/044f#quote as valid recurse targets, and docs/cli.md documents that alongside the existing quoteUrl path.

Things I was careful about

I kept quote separate from the existing legacy quoteUrl abstraction. The old quoteUrl surface still maps the compatibility properties used by ActivityStreams, Misskey, and Fedibird, but the new FEP-044f quote property is modeled independently so it keeps IRI semantics instead of being flattened into another URL-like alias.

I also avoided treating https://w3id.org/fep/044f as if it were a JSON-LD context URL. The FEP terms are added through embedded term definitions in the relevant defaultContext entries, while https://gotosocial.org/ns remains the actual preloaded remote context for the GoToSocial vocabulary.

canQuote is implemented as part of the existing GoToSocial interaction-policy model in packages/vocab/src/interactionpolicy.yaml, not as a parallel FEP-specific structure. Likewise, QuoteAuthorization is a FEP-defined type, but it still reuses GoToSocial property terms for interactingObject and interactionTarget, so I preserved that mix instead of inventing new FEP-native field names.

Places where it was easy to make a mistake

The biggest trap was assuming the examples in the FEP could be copied mechanically into YAML. I double-checked the actual URIs instead, especially around _misskey_quote, quoteAuthorization, and the boundary between the FEP namespace and the GoToSocial namespace.

Another easy mistake was forgetting that adding new compact terms changes serialized @context output even for objects that do not set those properties. That is why packages/fedify/src/federation/handler.test.ts and packages/fedify/src/sig/proof.test.ts needed updates after the vocabulary work itself was already done. The proof test in particular failed because the canonicalized JSON-LD changed, which changed the expected proof bytes.

The CLI follow-up was another one. It would have been easy to stop after the vocab work and leave fedify lookup --recurse understanding only quoteUrl. That would have made the new quote property feel half-supported in practice, so I added the recurse support and tests before wrapping up.

Validation

I regenerated the vocabulary output, refreshed the Deno, Node.js, and Bun snapshots, and reran the full mise test suite after fixing the stale @fedify/fedify expectations and the Bun-side CLI recurse coverage.

Files worth reviewing first

If you want to review this in a focused order, I would start with packages/vocab/src/quoterequest.yaml, packages/vocab/src/quoteauthorization.yaml, packages/vocab/src/interactionpolicy.yaml, packages/vocab/src/note.yaml, packages/vocab/src/article.yaml, packages/vocab/src/chatmessage.yaml, packages/vocab/src/question.yaml, then look at packages/cli/src/lookup.ts and packages/fedify/src/federation/handler.test.ts. The large snapshot updates are mostly fallout from those changes.

dahlia added 3 commits April 15, 2026 23:44
Add QuoteRequest and QuoteAuthorization to @fedify/vocab, extend
InteractionPolicy with canQuote, and expose quote-related properties
on Article, ChatMessage, Note, and Question.

This keeps quoteUrl as the legacy compatibility surface while adding
spec-correct FEP-044f terms, plus coverage tests and refreshed
Deno, Node.js, and Bun snapshots.

fedify-dev#452

Assisted-by: OpenCode:gpt-5.4
Update CHANGES.md for the new quote-post vocabulary work and add a
short note to the vocabulary manual explaining how the new FEP-044f
quote surface relates to the existing legacy quoteUrl compatibility
surface.

fedify-dev#452

Assisted-by: OpenCode:gpt-5.4
Extend the lookup command's recurse handling so it can follow the
FEP-044f quote relation as well as the older quoteUrl compatibility
properties.

This updates the CLI config schema, recursive lookup logic, tests, and
user documentation, and notes the addition in CHANGES.md.

fedify-dev#452

Assisted-by: OpenCode:gpt-5.4
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 292f564d-4879-458e-a408-8f4b75894c0e

📥 Commits

Reviewing files that changed from the base of the PR and between f23a4a7 and 3c7cf6d.

📒 Files selected for processing (5)
  • packages/fedify/src/federation/handler.test.ts
  • packages/fedify/src/sig/proof.test.ts
  • packages/fixture/src/fixtures/gotosocial.org/ns.json
  • packages/vocab-runtime/src/contexts/gotosocial.json
  • packages/vocab/src/vocab.test.ts

📝 Walkthrough

Walkthrough

Adds FEP-044f (Mastodon-style quote posts) support: new QuoteRequest and QuoteAuthorization vocab types, quote/quoteAuthorization properties on core objects, canQuote in InteractionPolicy, JSON-LD context additions, CLI recursion support for quote, and tests/docs updates.

Changes

Cohort / File(s) Summary
Core Vocab Types
packages/vocab/src/quoterequest.yaml, packages/vocab/src/quoteauthorization.yaml
Introduce QuoteRequest (Activity) and QuoteAuthorization (Object) vocab entities with contexts and metadata.
Object Properties
packages/vocab/src/article.yaml, packages/vocab/src/chatmessage.yaml, packages/vocab/src/note.yaml, packages/vocab/src/question.yaml
Add quote (IRI → ActivityStreams:Object) and quoteAuthorization (→ fep:QuoteAuthorization) as functional properties and JSON‑LD context entries.
Context Additions (bulk)
packages/vocab/src/announce.yaml, packages/vocab/src/collection.yaml, packages/vocab/src/collectionpage.yaml, packages/vocab/src/create.yaml, packages/vocab/src/delete.yaml, packages/vocab/src/orderedcollection.yaml, packages/vocab/src/orderedcollectionpage.yaml, packages/vocab/src/update.yaml, packages/vocab/src/announce.yaml
Add FEP-044f context terms (quote, QuoteAuthorization, QuoteRequest, quoteAuthorization) across many defaultContext blocks (repetitive context expansions).
Interaction Policy & Object Docs
packages/vocab/src/interactionpolicy.yaml, packages/vocab/src/object.yaml
Add exported canQuote property (https://gotosocial.org/ns#canQuote, range InteractionRule) and update interactionPolicy docs to include quote/canQuote.
CLI: lookup recursion
packages/cli/src/config.ts, packages/cli/src/lookup.ts, packages/cli/src/lookup.test.ts
Accept quote and https://w3id.org/fep/044f#quote as --recurse targets; add QUOTE_IRI, include in recurse set; update extraction logic and tests for short-form and IRI forms (compat with legacy quoteUrl).
Tests — vocab & federation
packages/vocab/src/vocab.test.ts, packages/fedify/src/federation/handler.test.ts
Add JSON‑LD round‑trip and compaction tests for QuoteRequest/QuoteAuthorization; add Note.quote/quoteAuthorization and interactionPolicy.canQuote tests; update handler test contexts to include quote terms.
Fixtures / Context runtime
packages/fixture/src/fixtures/gotosocial.org/ns.json, packages/vocab-runtime/src/contexts/gotosocial.json
Replace gts-scoped quote IRIs with W3ID FEP IRIs for QuoteRequest, QuoteAuthorization, and quoteAuthorization.
Proof test tweak
packages/fedify/src/sig/proof.test.ts
Remove debug import/log and update expected proof.proofValue hex in the test.
Docs & Changelog
CHANGES.md, docs/cli.md, docs/manual/vocab.md
Document FEP-044f additions, add CLI examples for --recurse=quote and note dual support for legacy quoteUrl and FEP-044f quote.

Sequence Diagram(s)

sequenceDiagram
    participant Client as Client
    participant QuotingServer as Quoting Server
    participant QuotedServer as Quoted Server
    participant QuotedAuthor as Quoted Author

    Client->>QuotingServer: Submit quote post (includes `quote` id)
    QuotingServer->>QuotedServer: GET quoted object + interactionPolicy
    QuotedServer-->>QuotingServer: Return object and interactionPolicy

    alt Authorization required
        QuotingServer->>QuotedServer: POST QuoteRequest (object, instrument)
        QuotedServer->>QuotedAuthor: Notify quote request
        QuotedAuthor->>QuotedServer: Accept or Reject
        QuotedServer->>QuotingServer: Return Accept with QuoteAuthorization
        QuotingServer->>Client: Publish quote post (authorized)
    else Public quoting allowed
        QuotingServer->>Client: Publish quote post immediately
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~35 minutes

Suggested labels

component/integration

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and concisely summarizes the main changes: adding FEP-044f quote vocabulary support and CLI recurse support, matching the primary objectives of the PR.
Description check ✅ Passed The PR description provides detailed context about vocabulary additions, CLI changes, design decisions, potential pitfalls, and validation steps. It is comprehensive and directly related to the changeset.
Linked Issues check ✅ Passed The PR successfully implements FEP-044f quote post support [#452]: adds QuoteRequest/QuoteAuthorization types, extends InteractionPolicy with canQuote, adds quote/quoteAuthorization properties to Article/ChatMessage/Note/Question, provides CLI recurse support for the new quote property, and maintains legacy quoteUrl compatibility while emitting the spec-compliant quote property.
Out of Scope Changes check ✅ Passed Updates to handler test, proof test, and CLI modules are in-scope follow-up changes directly necessitated by the vocabulary additions (JSON-LD context changes and new recurse target support), not extraneous modifications.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@issues-auto-labeler issues-auto-labeler bot added activitypub/interop Interoperability issues component/cli CLI tools related component/federation Federation object related component/testing Testing utilities (@fedify/testing) labels Apr 15, 2026
@dahlia dahlia self-assigned this Apr 15, 2026
@dahlia dahlia added this to the Fedify 2.2 milestone Apr 15, 2026
Copy link
Copy Markdown
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 implements support for Mastodon-style quote posts as defined in FEP-044f. It introduces new vocabulary types QuoteRequest and QuoteAuthorization, adds quote and quoteAuthorization properties to core ActivityStreams objects (Article, ChatMessage, Note, Question), and includes a canQuote rule in InteractionPolicy. The fedify lookup CLI tool is also updated to support recursive traversal of the new quote property alongside the legacy quoteUrl. Comprehensive tests and documentation updates are included. I have no feedback to provide.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/fedify/src/federation/handler.test.ts (1)

701-735: 🧹 Nitpick | 🔵 Trivial

Reduce repeated quote-context literals to a shared test fixture.

The same quote-related context object is duplicated many times; extracting it will lower snapshot churn and future update risk.

♻️ Optional refactor sketch
+const QUOTE_CONTEXT_TERMS = {
+  QuoteAuthorization: "https://w3id.org/fep/044f#QuoteAuthorization",
+  quote: {
+    "@id": "https://w3id.org/fep/044f#quote",
+    "@type": "@id",
+  },
+  quoteAuthorization: {
+    "@id": "https://w3id.org/fep/044f#quoteAuthorization",
+    "@type": "@id",
+  },
+};
...
-      QuoteAuthorization: "https://w3id.org/fep/044f#QuoteAuthorization",
-      quote: { "@id": "https://w3id.org/fep/044f#quote", "@type": "@id" },
-      quoteAuthorization: {
-        "@id": "https://w3id.org/fep/044f#quoteAuthorization",
-        "@type": "@id",
-      },
+      ...QUOTE_CONTEXT_TERMS,

Also applies to: 1670-1734

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/fedify/src/federation/handler.test.ts` around lines 701 - 735, The
test repeatedly inlines the same quote-related context object inside the
createCtx array (seen in the createCtx variable), causing duplication across
tests; extract that nested object into a single shared constant (e.g., const
QUOTE_CONTEXT = { ... } or quoteContext) and replace each duplicated inline
object in createCtx and other test fixtures (including the occurrences around
lines 1670-1734) with a reference to that constant so snapshots share the same
literal and future updates only change the single fixture; update
imports/exports if you move the constant to a shared test helper module and run
tests to ensure no snapshot diffs remain from the refactor.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/vocab/src/vocab.test.ts`:
- Around line 1157-1186: Extract the repeated "@context" note/quote object into
a single shared constant (e.g., NOTE_QUOTE_CONTEXT or getNoteQuoteContext()) at
the top of the test file and replace the inline duplicated blocks in each test
(the expected object used in assertions such as the one bound to expected) with
references to that constant; ensure you export or reuse the same constant within
the same file scope, update each test that currently copies the block (the
occurrences you saw in the expected objects) to reference the shared constant,
and run the tests to confirm no shape or ordering changes were introduced.

---

Outside diff comments:
In `@packages/fedify/src/federation/handler.test.ts`:
- Around line 701-735: The test repeatedly inlines the same quote-related
context object inside the createCtx array (seen in the createCtx variable),
causing duplication across tests; extract that nested object into a single
shared constant (e.g., const QUOTE_CONTEXT = { ... } or quoteContext) and
replace each duplicated inline object in createCtx and other test fixtures
(including the occurrences around lines 1670-1734) with a reference to that
constant so snapshots share the same literal and future updates only change the
single fixture; update imports/exports if you move the constant to a shared test
helper module and run tests to ensure no snapshot diffs remain from the
refactor.
🪄 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: 7f70958b-109d-4d80-92c0-02ff71f10f2f

📥 Commits

Reviewing files that changed from the base of the PR and between 4c2bace and 46257c8.

⛔ Files ignored due to path filters (4)
  • 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
  • packages/vocab/src/__snapshots__/vocab.test.ts.snap is excluded by !**/*.snap
📒 Files selected for processing (25)
  • CHANGES.md
  • docs/cli.md
  • docs/manual/vocab.md
  • packages/cli/src/config.ts
  • packages/cli/src/lookup.test.ts
  • packages/cli/src/lookup.ts
  • packages/fedify/src/federation/handler.test.ts
  • packages/fedify/src/sig/proof.test.ts
  • packages/vocab/src/announce.yaml
  • packages/vocab/src/article.yaml
  • packages/vocab/src/chatmessage.yaml
  • packages/vocab/src/collection.yaml
  • packages/vocab/src/collectionpage.yaml
  • packages/vocab/src/create.yaml
  • packages/vocab/src/delete.yaml
  • packages/vocab/src/interactionpolicy.yaml
  • packages/vocab/src/note.yaml
  • packages/vocab/src/object.yaml
  • packages/vocab/src/orderedcollection.yaml
  • packages/vocab/src/orderedcollectionpage.yaml
  • packages/vocab/src/question.yaml
  • packages/vocab/src/quoteauthorization.yaml
  • packages/vocab/src/quoterequest.yaml
  • packages/vocab/src/update.yaml
  • packages/vocab/src/vocab.test.ts

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

codecov bot commented Apr 15, 2026

Codecov Report

❌ Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
packages/cli/src/lookup.ts 87.50% 0 Missing and 1 partial ⚠️
Files with missing lines Coverage Δ
packages/cli/src/config.ts 94.28% <100.00%> (+0.11%) ⬆️
packages/cli/src/lookup.ts 68.67% <87.50%> (+0.13%) ⬆️

... and 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.

Extract shared quote-related test context fixtures in the vocab and
Fedify handler tests so future vocabulary changes only need updates in
one place.

This is a follow-up cleanup from the FEP-044f quote support work and
keeps the existing assertions unchanged while reducing duplication.

fedify-dev#679

Assisted-by: OpenCode:gpt-5.4
@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 15, 2026

Addressed the remaining CodeRabbit review note about duplicated quote-context literals in packages/fedify/src/federation/handler.test.ts in 9be94bc by introducing a shared QUOTE_CONTEXT_TERMS fixture. I also pulled the repeated Note quote context in packages/vocab/src/vocab.test.ts into a shared constant and reran the relevant Deno and Node tests after the cleanup.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
packages/vocab/src/vocab.test.ts (1)

291-301: 🧹 Nitpick | 🔵 Trivial

Consider finishing context deduplication for quote fixtures.

Line 291 and Line 1286 still keep large inline context blocks that overlap NOTE_QUOTE_CONTEXT. Reusing a composed fixture here would further reduce drift risk when context terms change.

Also applies to: 1286-1321

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/vocab/src/vocab.test.ts` around lines 291 - 301, The test contains
duplicated large inline JSON-LD context blocks for the quote fixtures (including
terms like QuoteAuthorization, fedibird, misskey, and the
quote/quoteAuthorization entries) instead of reusing the shared
NOTE_QUOTE_CONTEXT fixture; replace the inline context objects at the quote
fixtures with a reference that composes or imports NOTE_QUOTE_CONTEXT (e.g.,
merge or spread NOTE_QUOTE_CONTEXT into the fixture or set the fixture's context
to NOTE_QUOTE_CONTEXT) so the tests reuse the single canonical context and avoid
drift when context terms change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@packages/vocab/src/vocab.test.ts`:
- Around line 291-301: The test contains duplicated large inline JSON-LD context
blocks for the quote fixtures (including terms like QuoteAuthorization,
fedibird, misskey, and the quote/quoteAuthorization entries) instead of reusing
the shared NOTE_QUOTE_CONTEXT fixture; replace the inline context objects at the
quote fixtures with a reference that composes or imports NOTE_QUOTE_CONTEXT
(e.g., merge or spread NOTE_QUOTE_CONTEXT into the fixture or set the fixture's
context to NOTE_QUOTE_CONTEXT) so the tests reuse the single canonical context
and avoid drift when context terms change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: cd39783a-2fe0-430b-9d0c-c2ceaf1adf4f

📥 Commits

Reviewing files that changed from the base of the PR and between 46257c8 and 9be94bc.

📒 Files selected for processing (2)
  • packages/fedify/src/federation/handler.test.ts
  • packages/vocab/src/vocab.test.ts

@dahlia dahlia requested a review from Copilot April 15, 2026 15:47
@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 15, 2026

@codex review

@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 15, 2026

/gemini review

Copy link
Copy Markdown
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 implements [FEP-044f] vocabulary support for Mastodon-style quote posts, introducing QuoteRequest and QuoteAuthorization classes along with quote and quoteAuthorization properties for several ActivityStreams objects. It also adds canQuote to the InteractionPolicy and updates the CLI to support recursive lookups for quotes. Feedback suggests adding the QuoteRequest term to the defaultContext of several collection and activity YAML files—specifically collection.yaml, collectionpage.yaml, delete.yaml, orderedcollection.yaml, and orderedcollectionpage.yaml—to ensure proper JSON-LD compaction when these activities appear in collections or as targets of other activities.

Comment thread packages/vocab/src/collection.yaml
Comment thread packages/vocab/src/collectionpage.yaml
Comment thread packages/vocab/src/delete.yaml
Comment thread packages/vocab/src/orderedcollection.yaml
Comment thread packages/vocab/src/orderedcollectionpage.yaml
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

ℹ️ 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".

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds first-class FEP-044f “quote posts” vocabulary support to @fedify/vocab (including quote authorization/request types and quoting-related fields) and updates dependent packages/tests and CLI recursion so quoted-object traversal works with the new quote surface.

Changes:

  • Introduces FEP-044f types/properties (QuoteRequest, QuoteAuthorization, quote, quoteAuthorization) and extends GoToSocial InteractionPolicy with canQuote.
  • Updates multiple wrapper/activity/collection contexts to keep JSON-LD compaction working when quote-related terms appear in nested payloads.
  • Extends fedify lookup --recurse to support quote (short name and FEP IRI) and refreshes affected snapshots/tests (including proof bytes impacted by canonicalization changes).

Reviewed changes

Copilot reviewed 26 out of 29 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
packages/vocab/src/vocab.test.ts Adds explicit tests for quote, quoteAuthorization, canQuote, and new FEP types.
packages/vocab/src/update.yaml Adds quote-related terms to Update default JSON-LD context.
packages/vocab/src/quoterequest.yaml Defines new FEP-044f QuoteRequest type and context terms for nested compaction.
packages/vocab/src/quoteauthorization.yaml Defines new FEP-044f QuoteAuthorization type and properties.
packages/vocab/src/question.yaml Adds quote / quoteAuthorization properties and context terms to Question.
packages/vocab/src/orderedcollectionpage.yaml Adds quote-related terms to collection page context for nested compaction.
packages/vocab/src/orderedcollection.yaml Adds quote-related terms to ordered collection context for nested compaction.
packages/vocab/src/object.yaml Updates interaction-policy documentation to include quoting.
packages/vocab/src/note.yaml Adds quote / quoteAuthorization properties and context terms to Note.
packages/vocab/src/interactionpolicy.yaml Adds canQuote sub-policy to the GoToSocial interaction policy model.
packages/vocab/src/delete.yaml Adds quote-related terms to Delete context for nested compaction.
packages/vocab/src/create.yaml Adds quote-related terms to Create context for nested compaction.
packages/vocab/src/collectionpage.yaml Adds quote-related terms to collection page context for nested compaction.
packages/vocab/src/collection.yaml Adds quote-related terms to collection context for nested compaction.
packages/vocab/src/chatmessage.yaml Adds quote / quoteAuthorization properties and context terms to ChatMessage.
packages/vocab/src/article.yaml Adds quote / quoteAuthorization properties and context terms to Article.
packages/vocab/src/announce.yaml Adds quote-related terms to Announce context for nested compaction.
packages/vocab/src/snapshots/vocab.test.ts.snap Updates snapshots for new properties/types and changed serialization/inspection output.
packages/fedify/src/sig/proof.test.ts Updates expected proof bytes after JSON-LD canonicalization changes; removes debug output.
packages/fedify/src/federation/handler.test.ts Updates expected emitted contexts to include the new quote-related term definitions.
packages/cli/src/lookup.ts Adds recurse support for quote (short name + FEP IRI) in recursive traversal.
packages/cli/src/lookup.test.ts Adds tests for parsing/recursing with quote and FEP quote IRI.
packages/cli/src/config.ts Extends CLI config schema to allow quote recurse values.
docs/manual/vocab.md Documents the new FEP-044f quote surface alongside legacy quoteUrl mapping.
docs/cli.md Documents --recurse=quote and the FEP quote IRI as supported recurse targets.
CHANGES.md Adds changelog entries for the new vocabulary and CLI recurse support.

Comment thread packages/vocab/src/quoteauthorization.yaml
Comment thread packages/vocab/src/quoterequest.yaml
Comment thread packages/vocab/src/note.yaml
Comment thread packages/vocab/src/article.yaml
Comment thread packages/vocab/src/chatmessage.yaml
Comment thread packages/vocab/src/question.yaml
Add QuoteRequest term mappings to collection and activity wrapper
contexts so embedded quote request activities compact consistently.

This also finishes deduplicating the new quote-related fixtures in
vocab tests, adds coverage for embedded QuoteRequest serialization,
and refreshes the generated class snapshots.

fedify-dev#679

Assisted-by: OpenCode:gpt-5.4
@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 15, 2026

Addressed the follow-up CodeRabbit duplicate note in f23a4a7 as well. I finished deduplicating the remaining quote-related context fixtures in packages/vocab/src/vocab.test.ts, added QuoteRequest coverage for embedded collection and Delete serialization, refreshed the vocab-tools snapshots, and reran mise test.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

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 the current code and only fix it if needed.

Inline comments:
In `@packages/vocab/src/vocab.test.ts`:
- Around line 48-125: Add brief JSDoc comments above NOTE_QUOTE_CONTEXT,
QUOTE_REQUEST_CONTEXT, and DELETE_QUOTE_REQUEST_CONTEXT that reference the
authoritative source YAML (e.g., filename or section) and a one-line description
of what the constant represents; this will make it easy to trace back where the
context definitions originate when the YAML changes. Ensure each JSDoc mentions
the YAML path or identifier and stays succinct (one or two lines) and place them
directly above the corresponding constant declarations.
🪄 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: 88d70fe5-91ed-4baa-bc8c-1f861044e31e

📥 Commits

Reviewing files that changed from the base of the PR and between 9be94bc and f23a4a7.

⛔ 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 (9)
  • packages/vocab/src/announce.yaml
  • packages/vocab/src/collection.yaml
  • packages/vocab/src/collectionpage.yaml
  • packages/vocab/src/create.yaml
  • packages/vocab/src/delete.yaml
  • packages/vocab/src/orderedcollection.yaml
  • packages/vocab/src/orderedcollectionpage.yaml
  • packages/vocab/src/update.yaml
  • packages/vocab/src/vocab.test.ts

Comment thread packages/vocab/src/vocab.test.ts
Treat the preloaded GoToSocial quote-post terms as compatibility
aliases for the FEP-044f QuoteRequest, QuoteAuthorization, and
quoteAuthorization IRIs during parsing.

This updates both the runtime preloaded context and the fixture copy,
adds vocabulary tests that decode compact GoToSocial payloads, and
refreshes the affected Fedify expectations that changed after the
compatibility shim. Verified with mise test.

fedify-dev#679

Assisted-by: OpenCode:gpt-5.4
@dahlia dahlia requested a review from Copilot April 15, 2026 16:51
@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 15, 2026

@codex review

@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 15, 2026

/gemini review

Copy link
Copy Markdown
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 implements Mastodon-style quote post support based on the FEP-044f specification. It adds QuoteRequest and QuoteAuthorization vocabulary types, introduces quote and quoteAuthorization properties to several ActivityStreams objects, and updates the CLI to support recursive quote lookups. Review feedback suggests aligning property URIs and context mappings in quoteauthorization.yaml with the FEP-044f namespace to improve interoperability and JSON-LD compactness.

Comment thread packages/vocab/src/quoteauthorization.yaml
Comment thread packages/vocab/src/quoteauthorization.yaml
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds first-class FEP-044f quote-post vocabulary support across @fedify/vocab (types, properties, and compaction contexts) and updates downstream consumers/tests (Fedify + CLI) to understand and traverse the new quote relation.

Changes:

  • Add FEP-044f terms: QuoteRequest, QuoteAuthorization, quote, quoteAuthorization, and InteractionPolicy.canQuote, plus wrapper-context updates to keep nested JSON-LD compaction working.
  • Update preloaded/fixture GoToSocial context mappings so GoToSocial quote terms expand to the FEP-044f IRIs during parsing.
  • Extend fedify lookup --recurse to accept/follow quote (short name and FEP IRI), and refresh impacted snapshots/canonicalization expectations.

Reviewed changes

Copilot reviewed 28 out of 31 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/vocab/src/quoterequest.yaml Introduces QuoteRequest Activity type and its default JSON-LD context for compaction.
packages/vocab/src/quoteauthorization.yaml Introduces QuoteAuthorization object type and GoToSocial-linked properties for authorization proofs.
packages/vocab/src/interactionpolicy.yaml Extends interaction policy model with canQuote.
packages/vocab/src/{note,article,chatmessage,question}.yaml Adds quote + quoteAuthorization properties and context terms to core content types.
packages/vocab/src/{collection,collectionpage,orderedcollection,orderedcollectionpage,create,announce,delete,update}.yaml Updates wrapper/activity contexts so embedded quote-related terms compact correctly.
packages/vocab/src/object.yaml Updates interaction policy property description to include quoting.
packages/vocab/src/vocab.test.ts Adds explicit test coverage for FEP-044f terms and compaction behavior.
packages/vocab/src/snapshots/vocab.test.ts.snap Refreshes snapshots reflecting new properties/terms.
packages/vocab-runtime/src/contexts/gotosocial.json Adjusts GoToSocial preloaded context to expand quote-post terms to FEP-044f IRIs.
packages/fixture/src/fixtures/gotosocial.org/ns.json Keeps fixture copy aligned with the preloaded GoToSocial context mapping changes.
packages/fedify/src/federation/handler.test.ts Updates expectations for emitted compact contexts after vocab changes.
packages/fedify/src/sig/proof.test.ts Updates proof bytes after JSON-LD canonicalization changes and removes debug logging.
packages/cli/src/lookup.ts Adds quote recurse target support and resolves recursion via quoteId.
packages/cli/src/config.ts Allows quote and the FEP-044f quote IRI as valid lookup.recurse values.
packages/cli/src/lookup.test.ts Adds/extends tests for --recurse=quote and FEP quote IRI handling.
docs/manual/vocab.md Documents the relationship between legacy quoteUrl and FEP-044f quote surfaces.
docs/cli.md Documents --recurse support for quote in addition to quoteUrl.
CHANGES.md Adds release notes for the new vocab + CLI recurse support.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

ℹ️ 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".

@dahlia dahlia merged commit 290cbf4 into fedify-dev:main Apr 15, 2026
21 checks passed
@dahlia dahlia deleted the feat/452-fep-044f-vocab branch April 15, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

activitypub/interop Interoperability issues component/cli CLI tools related component/federation Federation object related component/testing Testing utilities (@fedify/testing)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FEP-044f capabilities (Mastodon-style quote posts)

2 participants