Skip to content

FEP-044f quote authorization#457

Merged
dahlia merged 30 commits intofedify-dev:mainfrom
dahlia:fep-044f
Apr 28, 2026
Merged

FEP-044f quote authorization#457
dahlia merged 30 commits intofedify-dev:mainfrom
dahlia:fep-044f

Conversation

@dahlia
Copy link
Copy Markdown
Member

@dahlia dahlia commented Apr 28, 2026

  • Implements FEP-044f consent-respecting quote posts on top of Hollo’s Mastodon-compatible quote APIs, using the Fedify 2.2 vocabulary support added for QuoteRequest and QuoteAuthorization.
  • Adds quote state, quote target IRI, quote authorization IRI, and quote approval policy persistence via src/schema.ts and drizzle/0086_quote_controls.sql.
  • Implements Mastodon-compatible quote policy behavior in src/api/v1/statuses.ts, including quote_approval_policy, PUT /api/v1/statuses/:id/interaction_policy, accepted-only quote listings, and quote revocation behavior based on the Mastodon statuses API, Quote entity, and QuoteApproval entity.
  • Serializes quote states and approval information through src/entities/status.ts, while keeping legacy accepted quotes compatible with existing data.
  • Publishes and parses FEP-044f quote, quoteAuthorization, and interactionPolicy.canQuote ActivityPub properties in src/federation/post.ts, while preserving quoteUrl compatibility.
  • Handles the federation quote lifecycle in src/federation/inbox.ts, src/federation/index.ts, and src/federation/objects.ts: outbound QuoteRequest, inbound QuoteRequest, Accept(QuoteRequest), Reject(QuoteRequest), Delete(QuoteAuthorization), and dereferenceable local QuoteAuthorization objects.
  • Updates quote counts, quote notifications, and media cleanup paths so only accepted quotes count as active quotes.
  • Adds coverage in src/api/v1/statuses.test.ts, src/federation/post.test.ts, and src/federation/inbox.test.ts.
  • Adds the changelog entry under the unreleased CHANGES.md Version 0.9.0 section.

dahlia added 3 commits April 28, 2026 15:27
Add persistent quote state, approval policy, and authorization fields so
Hollo can track pending, accepted, rejected, revoked, and unauthorized
quotes.  Serialize FEP-044f quote properties and interaction policy data,
and parse incoming quote targets from the FEP-044f quote vocabulary.

Implement Mastodon-compatible quote policy editing, quote listing, and
quote revocation behavior.  Add QuoteRequest, Accept, Reject, and
QuoteAuthorization Delete handling for federation, plus a dispatcher for
local QuoteAuthorization objects.

Cover the Mastodon API behavior, ActivityPub serialization and parsing,
and the federation quote request lifecycle with tests.

Assisted-by: Codex:gpt-5.5
Add a changelog entry under the unreleased 0.9.0 section describing the
new FEP-044f quote authorization and quote policy behavior.

Assisted-by: Codex:gpt-5.5
@dahlia dahlia added this to the Hollo 0.9 milestone Apr 28, 2026
@dahlia dahlia self-assigned this Apr 28, 2026
@dahlia dahlia added the enhancement New feature or request label Apr 28, 2026
@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 28, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f05a8c14ff

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

Comment thread src/federation/inbox.ts
Comment thread src/federation/inbox.ts Outdated
Comment thread src/entities/status.ts
dahlia added 2 commits April 28, 2026 16:33
Require QuoteAuthorization Delete activities to come from the account that
issued the authorization before revoking local quote state. Also reject
QuoteRequest activities whose actor does not match the attributed quote
object before persisting the quote or mutating counters.

Fixes fedify-dev#457 (comment)
Fixes fedify-dev#457 (comment)

Assisted-by: Codex:gpt-5.5
Load the current viewer's approved follow relationship while serializing
statuses so followers-only quote policies report current_user as automatic
for approved followers instead of denied.

Fixes fedify-dev#457 (comment)

Assisted-by: Codex:gpt-5.5
@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 28, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a447a6916c

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

Comment thread src/federation/inbox.ts Outdated
Comment thread src/federation/inbox.ts Outdated
Accept and Reject responses for quote requests now require the responder to
match the quoted post author before mutating quote state. Responses that use
the stored QuoteRequest IRI form are also resolved from the local pending
quote, so peers do not have to embed the QuoteRequest object.

Fixes fedify-dev#457 (comment)
Fixes fedify-dev#457 (comment)

Assisted-by: Codex:gpt-5.5
@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 28, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3183bef73d

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

Comment thread src/federation/inbox.ts
Comment thread src/federation/post.ts Outdated
dahlia added 2 commits April 28, 2026 17:17
Ignore inbound QuoteRequest activities when the persisted quote instrument
quotes a different object than the requested local target, preventing invalid
state changes, authorization responses, and counter updates.

Fixes fedify-dev#457 (comment)

Assisted-by: Codex:gpt-5.5
Do not persist remote manual-only canQuote interaction policies as public.
When Hollo cannot represent a remote manual approval requirement locally,
store it conservatively as nobody while preserving the no-policy public
default and followers automatic approvals.

Fixes fedify-dev#457 (comment)

Assisted-by: Codex:gpt-5.5
@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 28, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bcdc439121

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

Comment thread src/api/v1/statuses.ts Outdated
Comment thread src/api/v1/statuses.ts
@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 28, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2fdd597fab

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

Comment thread src/federation/inbox.ts Outdated
@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 28, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 47105dbb56

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

Comment thread src/federation/post.ts
Comment thread src/federation/inbox.ts Outdated
@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 28, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9f75b628da

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

Comment thread src/federation/inbox.ts Outdated
@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 28, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f1d32cde7c

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

Comment thread src/federation/post.ts
Only publish FEP-044f quote and quoteUrl fields for accepted quotes or
legacy quotes without a stored quote state.  This prevents pending,
rejected, revoked, or unauthorized quote rows from federating as active
quotes.

Fixes fedify-dev#457 (comment)

Assisted-by: Codex:gpt-5.5
@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 28, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1c108e42b7

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

Comment thread src/api/v1/statuses.ts Outdated
Comment thread src/federation/post.ts Outdated
Hide quote fallback content and Link tags for inactive quote states during
normal ActivityPub serialization, while still including the quote target in
pending QuoteRequest instruments so receivers can process the request.

Fixes fedify-dev#457 (comment)
Fixes fedify-dev#457 (comment)

Assisted-by: Codex:gpt-5.5
@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 28, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 39bb3d2235

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

Comment thread src/api/v1/statuses.ts Outdated
Avoid follower fan-out when the interaction policy endpoint updates a
direct status, while still delivering the update to explicitly mentioned
recipients.

Fixes fedify-dev#457 (comment)

Assisted-by: Codex:gpt-5.5
@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 28, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 03101d0942

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

Comment thread src/api/v1/statuses.ts
Comment thread src/federation/inbox.ts Outdated
Treat private status quote policies as effectively nobody across the
Mastodon API serializer, local quote validation, ActivityPub canQuote
serialization, and inbound QuoteRequest auto-accept handling.

Fixes fedify-dev#457 (comment)
Fixes fedify-dev#457 (comment)

Assisted-by: Codex:gpt-5.5
@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 28, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f6050532f0

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

Comment thread src/federation/inbox.ts
Refresh the previous accepted quote target when an inbound QuoteRequest
moves the same remote quote object to a different local target, so stale
quotes_count values do not remain on the old target.

Fixes fedify-dev#457 (comment)

Assisted-by: Codex:gpt-5.5
@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 28, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f19bb250f1

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

Comment thread src/federation/inbox.ts
Ignore retried inbound QuoteRequests for quote objects that were already
revoked locally, so at-least-once delivery cannot silently reactivate a
revoked quote authorization.

Fixes fedify-dev#457 (comment)

Assisted-by: Codex:gpt-5.5
@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 28, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c461e72197

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

Comment thread src/federation/index.ts Outdated
Handle Delete activities whose object is an embedded QuoteAuthorization
without an object id, so quote revocations can still locate the
interacting object and clear accepted quote state.

Fixes fedify-dev#457 (comment)

Assisted-by: Codex:gpt-5.5
@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 28, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9dd007b5c3

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

Comment thread src/federation/inbox.ts Outdated
Use the Accept or Reject object id when an embedded QuoteRequest omits
its instrument, so quote request responses can still resolve the local
quote and update pending quote state.

Fixes fedify-dev#457 (comment)

Assisted-by: Codex:gpt-5.5
@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 28, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1f97d34960

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

Comment thread src/api/v1/statuses.ts
Exempt self-quotes from the direct quote mention requirement so users
can quote their own statuses as direct posts without mentioning
themselves.

Fixes fedify-dev#457 (comment)

Assisted-by: Codex:gpt-5.5
@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 28, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

ℹ️ 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 1de0784 into fedify-dev:main Apr 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant