Skip to content

Allow quoting legacy remote posts without FEP-044f policies#459

Merged
dahlia merged 1 commit intofedify-dev:mainfrom
dahlia:fix/legacy-remote-quotes
Apr 29, 2026
Merged

Allow quoting legacy remote posts without FEP-044f policies#459
dahlia merged 1 commit intofedify-dev:mainfrom
dahlia:fix/legacy-remote-quotes

Conversation

@dahlia
Copy link
Copy Markdown
Member

@dahlia dahlia commented Apr 29, 2026

Summary

This changes remote quote handling so cached or newly fetched remote posts without an advertised FEP-044f canQuote policy are treated as legacy quote targets and can be quoted immediately.

The quote_approval_policy column is now nullable: NULL represents a remote post where no FEP-044f quote policy was observed, while non-null values still represent explicit FEP-044f policies that should use the QuoteRequest authorization flow.

Changes

  • Make src/schema.ts store nullable quote_approval_policy values.
  • Update src/federation/post.ts to persist NULL when a remote object has no interactionPolicy.canQuote.
  • Update src/api/v1/statuses.ts so remote quote targets with NULL quote policy are accepted immediately, while non-null remote policies remain pending and send QuoteRequest.
  • Update drizzle/0087_quote_authorization_requirement.sql to drop NOT NULL and backfill old cached remote public posts to NULL, with a comment documenting the intentional migration tradeoff.
  • Add/update quote behavior tests in src/api/v1/statuses.test.ts and src/federation/post.test.ts.
  • Document the migration generation rule in AGENTS.md.

Testing

  • pnpm migrate:generate
  • pnpm test:ci src/api/v1/statuses.test.ts
  • pnpm test:ci src/federation/post.test.ts
  • pnpm check
  • git diff --check

Treat remote posts without an advertised FEP-044f quote policy as legacy
quote targets.  Those quotes are accepted immediately instead of waiting
for a QuoteRequest response from software that does not implement FEP-044f.

Store missing remote quote policy as null while keeping explicit cached
FEP-044f policies on the authorization path.  Also document that future
schema migrations must be generated with pnpm migrate:generate.

Assisted-by: Codex:gpt-5.5
@dahlia dahlia added this to the Hollo 0.9 milestone Apr 29, 2026
@dahlia dahlia self-assigned this Apr 29, 2026
@dahlia dahlia added the bug Something isn't working label Apr 29, 2026
@dahlia
Copy link
Copy Markdown
Member Author

dahlia commented Apr 29, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant