Skip to content

チャンネルのセンシティブを連合する - #31

Merged
kozakura913 merged 5 commits into
cheripia-dev:developfrom
kozakura913:issue-26
Nov 13, 2026
Merged

kozakura913 merged 5 commits into
cheripia-dev:developfrom
kozakura913:issue-26

Conversation

@kozakura913

@kozakura913 kozakura913 commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

What

連合にチャンネルのセンシティブフラグを投げる/連合から受け取る

Why

resolve: #26

Additional info (optional)

連合テストはあっても良さそう
後で書く

Checklist

  • コントリビューションガイドを読みました( Read the contribution guide)
  • ローカル環境で動作しました(Test working in a local environment)
  • (必要なら)CHANGELOG_CHERIPIA.mdの更新((If needed) Update CHANGELOG_CHERIPIA.md)
  • (必要なら)テストの追加((If possible) Add tests)

@kozakura913
kozakura913 requested a review from 4ster1sk November 12, 2026 15:38
@kozakura913 kozakura913 self-assigned this Nov 12, 2026
@kozakura913 kozakura913 added this to the 1.14.0 milestone Nov 12, 2026
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

🖥 Frontend Diagnostics Report

(No significant changes)

View details

Requests by resource type
Type Requests Encoded bytes
Base Head Δ Base Head Δ
Document 2 2 0 39 KB 39 KB 0 B
Script 155 155 0 3.3 MB 3.3 MB $\color{green}{\text{-6 B}}$
Stylesheet 68 68 0 338 KB 338 KB $\color{orange}{\text{+10 B}}$
Fetch 22 22 0 55 KB 55 KB 0 B
Image 10 10 0 386 KB 386 KB 0 B
Font 6 6 0 8.4 MB 8.4 MB $\color{orange}{\text{+120 B}}$
Other 9 9 0 354 KB 354 KB $\color{orange}{\text{+3 B}}$
V8 heap snapshot statistics
Metric @ Base @ Head Δ MAD
$\color{gray}{\rule{8pt}{8pt}}$ Total 19 MB
± 9.5 KB
19 MB
± 6.6 KB
$\text{-1.5 KB}$
$\text{-0\%}$
12 KB
$\color{orange}{\rule{8pt}{8pt}}$ Code 3.6 MB 3.6 MB $\text{+15 KB}$ 3.3 KB
$\color{red}{\rule{8pt}{8pt}}$ Strings 2.4 MB 2.4 MB $\text{-128 B}$ 372 B
$\color{cyan}{\rule{8pt}{8pt}}$ JS arrays 156 KB 156 KB $\text{+36 B}$ 56 B
$\color{green}{\rule{8pt}{8pt}}$ Typed arrays 0 B 0 B 0 B 0 B
$\color{yellow}{\rule{8pt}{8pt}}$ System objects 0 B 0 B 0 B 0 B
$\color{violet}{\rule{8pt}{8pt}}$ Other JS objs 4.9 MB 4.9 MB $\text{+36 B}$ 107 B
$\color{pink}{\rule{8pt}{8pt}}$ Other non-JS objs 7.5 MB 7.5 MB $\text{+2 KB}$ 6.2 KB

Download representative heap snapshot: base / head

📦 Bundle Stats

Chunk size diff (0 updated, 0 added, 0 removed)
Chunk Base Head Δ Δ (%)
(total) 7.5 MB 7.5 MB 0 B 0%
(other generated chunks) 2.4 MB 2.4 MB 0 B 0%
Startup chunk size (0 updated, 0 added, 0 removed)
Chunk Base Head Δ Δ (%)
(total) 1.4 MB 1.4 MB 0 B 0%
(other generated chunks) 902 KB 902 KB 0 B 0%
(other) 548 KB 548 KB 0 B 0%

Startup chunks are the Vite entry for src/_boot_.ts and its static imports.

Bundles Modules Entries Imports Size
Static Dynamic Rendered Gzip Brotli
Base 525 3,743 23 15,135 395 13 MB 3.6 MB 3.1 MB
Head 525 3,743 23 15,135 395 13 MB 3.6 MB 3.1 MB
Δ 0 0 0 0 0 0 B $\text{-15 B}$ $\text{-38 B}$
Δ (%) 0% 0% 0% 0% 0% 0% $\text{-0\%}$ $\text{-0\%}$

Open treemap HTML

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

⚙️ Backend Diagnostics Report

Memory: After GC

(No significant changes)

V8 Heap Snapshot Statistics

Metric @ Base @ Head Δ MAD
$\color{gray}{\rule{8pt}{8pt}}$ Total 105 MB
± 3.9 KB
105 MB
± 2.6 KB
$\text{+10 KB}$
$\text{+0\%}$
4.7 KB
$\color{orange}{\rule{8pt}{8pt}}$ Code 29 MB 29 MB $\text{+9.6 KB}$ 4 KB
$\color{red}{\rule{8pt}{8pt}}$ Strings 40 MB 40 MB $\text{+96 B}$ 125 B
$\color{cyan}{\rule{8pt}{8pt}}$ JS arrays 5.9 MB 5.9 MB 0 B 0 B
$\color{green}{\rule{8pt}{8pt}}$ Typed arrays 610 KB 610 KB 0 B 0 B
$\color{yellow}{\rule{8pt}{8pt}}$ System objects 2.3 MB 2.3 MB $\text{+288 B}$ 578 B
$\color{violet}{\rule{8pt}{8pt}}$ Other JS objs 27 MB 27 MB $\text{+184 B}$ 243 B
$\color{pink}{\rule{8pt}{8pt}}$ Other non-JS objs 40 KB 40 KB 0 B 0 B

Download representative heap snapshot: base / head

@kozakura913
kozakura913 marked this pull request as ready for review November 12, 2026 17:16

@4ster1sk 4ster1sk left a comment

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.

指摘2(非 boolean 値の正規化)のサジェストです。

リモートアクターの sensitive は validateActor で型検証されていないため、"true" や {} などの値がそのまま MiChannel.isSensitive(Postgres の boolean)へ渡る可能性があります。
既存の isCat: (person as any).isCat === true に合わせて、3箇所とも === true で正規化することを提案します。

@4ster1sk

Copy link
Copy Markdown
Contributor

TODO: isSensitive をローカルで変更したときの連合通知

今回の PR で 受信側の更新(ApPersonService.updatePerson)は修正されていますが、送信側の変更通知には未対応の点が残っています。

現状 channels/update は isSensitive のみの変更では以下を行いません。

  • MiUser.updatedAt の更新
  • localUserUpdated の publish
  • AP Update activity の配送

そのため、リモートサーバーは以下のいずれかまで古い値のままになります。

  • 管理者による federation/update-remote-user の実行
  • 受信 activity を契機とした最大24時間後の actor 再取得

なお、name / description も同じ設計で、今回追加された連合テストも federation/update-remote-user による強制再取得を使っています。既存挙動と整合しているため、この PR のスコープ外としても問題ありません。

即時反映が必要になった場合は、packages/backend/src/server/api/endpoints/channels/update.ts の name / description 更新ブロックと同様に、isSensitive 変更時も usersRepository.update と localUserUpdated を発火させ、必要に応じて AccountUpdateService.publishToFollowers(channel.actorId) で Update を配送する対応を検討してください。

kozakura913 and others added 2 commits November 13, 2026 03:31
Co-authored-by: 4ster1sk <146138447+4ster1sk@users.noreply.github.com>
Co-authored-by: 4ster1sk <146138447+4ster1sk@users.noreply.github.com>
@kozakura913
kozakura913 merged commit a5e46a4 into cheripia-dev:develop Nov 13, 2026
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

チャンネルのセンシティブフラグが連合しない

2 participants