Skip to content

fix(backend): handle relay-delivered Announce activities correctly#17308

Merged
syuilo merged 5 commits intomisskey-dev:developfrom
sinoru:bugfix/11056
Apr 15, 2026
Merged

fix(backend): handle relay-delivered Announce activities correctly#17308
syuilo merged 5 commits intomisskey-dev:developfrom
sinoru:bugfix/11056

Conversation

@sinoru
Copy link
Copy Markdown
Contributor

@sinoru sinoru commented Apr 13, 2026

What

リレーアクター経由で届いたAnnounceアクティビティを通常のRenoteと区別し、内包された元ノートをノートストリームに直接公開するように変更しました。

Changed the handling of Announce activities from relay actors so that the inner note is published directly to the notes stream, instead of being treated as a regular Renote.

Why

リレー経由で配信されたノートはリレーアクターのAnnounceで包まれているため、既存のロジックではRenoteとして表示されてしまう問題がありました。

Notes delivered through relays are wrapped in an Announce activity by the relay actor, causing them to appear as Renotes of the original instead of standalone notes.

Fix #11056

Additional info (optional)

リレーアクターの判定は、アクターのinboxまたはsharedInboxを承認済みリレーのエントリと照合して行います。

Relay actor detection works by matching the actor's inbox or sharedInbox against accepted relay entries.

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Apr 13, 2026
@github-actions github-actions bot added the packages/backend Server side specific issue/PR label Apr 13, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 13, 2026

Codecov Report

❌ Patch coverage is 17.24138% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.63%. Comparing base (8e536eb) to head (0eb63f9).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
packages/backend/src/core/RelayService.ts 29.41% 12 Missing ⚠️
...ges/backend/src/core/activitypub/ApInboxService.ts 0.00% 12 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #17308      +/-   ##
===========================================
- Coverage    63.64%   63.63%   -0.02%     
===========================================
  Files         1162     1162              
  Lines       116551   116575      +24     
  Branches      8456     8457       +1     
===========================================
- Hits         74181    74179       -2     
- Misses       40165    40211      +46     
+ Partials      2205     2185      -20     

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 13, 2026

このPRによるapi.jsonの差分
差分はありません。
Get diff files from Workflow Page

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 13, 2026

Backend memory usage comparison

Before GC

Metric base (MB) head (MB) Diff (MB) Diff (%)
VmRSS 315.09 MB 320.32 MB +5.22 MB +1.65%
VmHWM 315.09 MB 320.32 MB +5.22 MB +1.65%
VmSize 23108.72 MB 23114.74 MB +6.02 MB +0.02%
VmData 1378.82 MB 1385.61 MB +6.79 MB +0.49%

After GC

Metric base (MB) head (MB) Diff (MB) Diff (%)
VmRSS 315.10 MB 320.32 MB +5.22 MB +1.65%
VmHWM 315.10 MB 320.32 MB +5.22 MB +1.65%
VmSize 23108.72 MB 23114.82 MB +6.10 MB +0.02%
VmData 1378.82 MB 1385.69 MB +6.87 MB +0.49%

After Request

Metric base (MB) head (MB) Diff (MB) Diff (%)
VmRSS 315.57 MB 320.60 MB +5.03 MB +1.59%
VmHWM 315.57 MB 320.60 MB +5.03 MB +1.59%
VmSize 23108.88 MB 23114.82 MB +5.93 MB +0.02%
VmData 1378.98 MB 1385.53 MB +6.54 MB +0.47%

See workflow logs for details

Relay Announce activities now use the target note URI instead of the
Announce URI for federation allowlist checks, dedup locking, and
existence lookups. Notes delivered via relay are published directly to
the notes stream without creating a renote.

Closes misskey-dev#11056
@kakkokari-gtyih kakkokari-gtyih requested a review from syuilo April 14, 2026 09:16
Comment thread packages/backend/src/core/RelayService.ts Outdated
Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
@syuilo syuilo merged commit 277a1ef into misskey-dev:develop Apr 15, 2026
39 of 41 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in [実験中] 管理用 Apr 15, 2026
@syuilo
Copy link
Copy Markdown
Member

syuilo commented Apr 15, 2026

🙏

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

Labels

packages/backend Server side specific issue/PR size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Development

Successfully merging this pull request may close these issues.

Publish notes announced by relay

3 participants