Skip to content

Add Mastodon E2E federation tests and fix Iceshrimp AP delivery issues#2

Open
turtton wants to merge 15 commits into
mainfrom
feature/e2e-mastodon-tests
Open

Add Mastodon E2E federation tests and fix Iceshrimp AP delivery issues#2
turtton wants to merge 15 commits into
mainfrom
feature/e2e-mastodon-tests

Conversation

@turtton

@turtton turtton commented Jun 26, 2026

Copy link
Copy Markdown
Member

概要

Mastodon を Fediverse ピアとして追加し、Iceshrimp / custom-ap / Mastodon 間の ActivityPub E2E テストを実装しました。全5テストが合格します。

変更内容

新機能

  • Mastodon サービス追加: Docker Compose に mastodon-web / mastodon-streaming / mastodon-sidekiq / mastodon-db を追加、nginx SSL プロキシ設定
  • Mastodon API クライアント: MastodonClient クラス(OAuth / search / follow / status / timeline / favourite)
  • E2E テスト 3本:
    • mastodon-follow.test.ts: Mastodon → Iceshrimp の Follow 連携
    • mastodon-note.test.ts: Iceshrimp の Note が Mastodon タイムラインに表示される
    • mastodon-reaction.test.ts: Mastodon の Favourite が Iceshrimp に反映される
  • custom-ap-dummy: 完全な ActivityPub コントラクト実装(Actor / inbox / WebFinger / 正しい Content-Type)

バグ修正

  • followers API アクセスパターン: Iceshrimp のネスト構造 { follower: { uri } } に対応
  • Note content predicate: Iceshrimp が送信する HTML 形式に対応するため ===.includes() に変更
  • Admin token キャッシュ: setup.ts でログイントークンをキャッシュし、レート制限(429)を回避
  • .gitignore: .env を追加(機密情報の誤コミット防止)

テスト結果

 Test Files  5 passed (5)
      Tests  5 passed (5)
   Duration  20.75s

動作確認

# セットアップ(初回のみ)
cp .env.example .env
./gencert.sh
docker compose pull
docker compose build
docker compose run --rm iceshrimp pnpm run init
docker compose run --rm mastodon-web bundle exec rails db:prepare

# テスト実行
docker compose up -d
docker compose run --rm test-runner

turtton and others added 15 commits June 23, 2026 23:10
Replace Misskey with Iceshrimp v2026.5.1 as the reference Fediverse instance. Includes default.yml, docker.env, and nginx redirect config.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Add vhost configs for iceshrimp.localhost (→iceshrimp:3000), test-ap.localhost (→custom-ap:12864), update shuttlepub.localhost (→custom-ap:12864). Add HTTP→HTTPS redirect with vhost includes.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Replace Misskey build with Iceshrimp image (v2026.5.1). Add custom-ap and test-runner services. Update cert generation for iceshrimp.localhost and test-ap.localhost domains. Add .env.example for build context and test token.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Set up TypeScript + Vitest test runner with Dockerfile. Define Custom AP interface contract documenting required ActivityPub and test-only endpoints.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Implement Iceshrimp API client (admin user creation, notes, follow, reactions), Custom AP test endpoint client (health, reset, actor registration, inbox polling), and draft-cavage HTTP Signature with RSA-SHA256.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Implement Follow→Accept and note delivery federation tests. Add ActivityPub message builders (Follow, Create, Like, Undo, Accept, Delete). Include test setup with admin user creation and remote actor registration using timestamped usernames.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Rewrite AGENTS.md and README.md to reflect migration from Misskey to Iceshrimp. Add service descriptions, domain table, setup instructions, and common commands.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
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.

1 participant