Skip to content

[codex] Add federation export preflight scaffold#4761

Open
mashbean wants to merge 14 commits intodevelopfrom
codex/g2a-federation-export-preflight
Open

[codex] Add federation export preflight scaffold#4761
mashbean wants to merge 14 commits intodevelopfrom
codex/g2a-federation-export-preflight

Conversation

@mashbean
Copy link
Copy Markdown

@mashbean mashbean commented May 2, 2026

Summary

  • Adds server-side federation export eligibility scaffolding for selected public Matters articles.
  • Adds author/article federation setting migration scaffold for durable export policy state.
  • Adds optional strict gate support in FederationExportService by joining user_federation_setting and article_federation_setting only when requested.
  • Adds decisionReport support with selected, eligible, skipped, and per-article gate reasons.
  • Preserves coverage from each Jest shard by writing shard coverage into separate coverage/* subdirectories before Codecov upload.
  • Updates @matters/ipns-site-generator to published 0.1.9 for existing server IPFS publication compatibility, but removes the Fediverse bundle generation path from matters-server.

Architecture boundary

  • matters-server owns DB state, public-only rules, opt-in gate decisions, and read-only candidate loading.
  • matters-server no longer builds ActivityPub bundles, writes export files, or exposes a federation export CLI.
  • Bundle generation and retryable publication are being moved to lambda-handlers in https://github.com/thematters/lambda-handlers/pull/217.

Safety

  • No production credentials are used.
  • No production migration has been run.
  • No production deployment is included.
  • No ActivityPub delivery, IPFS/IPNS publishing, background job, or file writing is attached to the server runtime.

Validation

  • Node 18 npm run build passed locally.
  • Targeted federation export service Jest passed locally: 9/9.
  • federationExportService.ts targeted line coverage is 100% locally.
  • Targeted ESLint passed locally.
  • git diff --check passed locally.
  • Repository pre-commit hook build/gen/lint/format completed.

Current gate

  • PR remains draft for engineering review and develop/staging validation.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.56%. Comparing base (a0b044b) to head (cfd0cb6).

Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #4761       +/-   ##
============================================
+ Coverage    57.82%   71.56%   +13.74%     
============================================
  Files         1008     1011        +3     
  Lines        19868    20031      +163     
  Branches      4259     4308       +49     
============================================
+ Hits         11489    14336     +2847     
+ Misses        7649     5230     -2419     
+ Partials       730      465      -265     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mashbean mashbean marked this pull request as ready for review May 5, 2026 21:43
@mashbean mashbean requested a review from a team as a code owner May 5, 2026 21:43
Copy link
Copy Markdown
Contributor

@zeckli zeckli left a comment

Choose a reason for hiding this comment

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

Leave one comment, but it's not a blocker.

siteDomain: string
articleId: string
shortHash?: string | null
}) => `https://${siteDomain}/a/${shortHash || articleId}`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we don't support article id anymore 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants