再設計:継続的な探索 / 動的な転送 / 接続単位の管理

P2P Downloader v2.3:コアアーキテクチャと接続管理

すべての有効な対象に継続してソース情報を届ける。証拠があれば試行し、成果があれば pool に残す。ダウンロード数は固定上限ではなく、空の接続も成果ではない。

Connection Manager を追加SQLite に事実と証拠を保存122 個の Tracker + 12 個の eD2k 候補未テストのエンドポイント ≠ 安全なエンドポイント
今回の主な変更:探索ループと転送ループの分離、可変の試行/本稼働プール、PoolSupervisor、接続分析、撤回可能なポリシー。Config のファイル分割、React のソース tabs、段階的なファイル作成/hash バケット分割、死んだファイルの journal は維持する。VPN、ログイン、User システムは追加しない。
記事の目次

日付:2026-10-03。これは設計仕様であり、デプロイ済み、または実ネットワークでの受け入れ検証に合格した製品ではない。 今回の全体範囲は Scheduler/Component の探索と転送の再設計、接続管理の追加、追跡可能な tracker/eD2k の既定ソースである。文書内の遅延、比率、容量は調整可能な初期ポリシーであり、実測による最適値ではない。

Markdown、JSON Schema、SQL、TOML は実装契約であり、HTML は同じ内容を確認するためのビューである。reference/model.py これは実行可能なオフライン判断用の参考実装にすぎず、P2P Engine ではない。元の repository の変更、peer 接続の開始、announce の送信、速度測定、データ削除は行っていない。

01|今回の変更点

前版では大量のジョブをまず Store に保持し、少数ずつ探索に受け入れる方式が中心だった。本版では、すべての有効な対象を直ちに探索・分析の作業集合に追加する。ソース情報は継続的に戻り、準備できた対象から試行する。本稼働ダウンロード pool の規模は持続可能なリソース余力で決まる。 1,000 件すべてのプローブ完了を待たず、5、8、32 個といった固定転送スロットで残りの対象のソース情報取得を制限しない。

判断 v2.3 の規定
探索資格 すべての有効な対象が同時に参加でき、転送プールの容量とは分離する。一度に 1,000 件を取り込んでも、1,000 個の Engine や payload ファイルを先に作成しない。
半接続 ユーザーの目的を「短命のソースプローブ」と解釈する。プロトコルのハンドシェイク/必要な metadata の取得後、証拠を保存し、解放可能な接続を解放する。意図的に TCP SYN の半開状態で止めるわけではない。
接続の並行数 タスク数の固定上限を撤廃する。connection_window=auto。FD、メモリ、システム負荷、相手側プロトコルのレート制限による動的バックプレッシャーは残り、socket が本当に無制限になるわけではない。
試行と本稼働転送 どちらも伸縮可能なリソース集合であり、固定数のスロットではない。有用なデータ、安定性、コストにより昇格・降格を決める。
専用の監督機能 Scheduler 内に PoolSupervisorを設け、ダウンロード、入れ替え、観察領域を継続的に監視する。接続管理は別途 P2P Connection Manager が管理する。
ブロック 狭い範囲の切断、一時的な回避、撤回可能な隔離、手動の永続ブロックを分離する。トラフィックがゼロ、または国だけを根拠に悪意を推定してはならない。
既定のソース 追跡可能な候補と更新ポリシーを組み込む。候補は事前に検証できるが、すべてのエンドポイントを同時利用する、または安全と確認済みであることを意味しない。

今回は v2.2 の固定 probe/transfer スロットの考え方、単一のスケジューリングスコアによる支配、および「新しい接続コンポーネントは不要」という結論を置き換える。維持するもの Config のファイル分割、ソース tabs、Component.Downloader+Engine、SQLite を使う Store、Metrics の集中保存、段階的な書き込み、hash バケット分割、完了時の移動、死んだファイルの清掃。VPN Manager と製品の User/ログインシステムは今回もコアの対象外。

02|概要:9 個の論理コンポーネントであり、9 個のマイクロサービスではない

9 個の論理コンポーネント:ジョブのスケジュール、接続管理、プロトコル処理を分離 目標アーキテクチャの概念図であり、実システムの測定結果ではない。矢印のラベルは制御、証拠、データの方向を示す。 9 個の論理コンポーネント。制御コマンドはファイル payload を運ばない 01 P2P Web View React:ソース・接続詳細 02 P2P Manager API/Registry/Operation 意図/状態 03 P2P Config 分割/既定値/版別スナップショット 有効設定 04 P2P Search 全有効対象を探索可能 ソース問い合わせの共有。ソース tabs 05 P2P Scheduler 試行/本稼働/観察 PoolSupervisor が動的に調整 09 Connection Manager 接続単位の証拠・リスク方針 撤回可能な回避/個別切断 検索の意図 ダウンロードの意図 管理操作 ソース証拠 接続概要 06 P2P Component × N 常駐 Engine を複数の Task で共有。ダウンロードごとにプロセスは作らない Search Provider 探索/プローブ Downloader ジョブ・転送予算を管理 Connection Agent 実際の接続操作/報告 P2P Engine wire/piece/ファイルI/O 探索リクエスト ジョブの割り当て/降格・昇格 正確な scope のコマンド 07 P2P Store:SQLite タスク・内容キー・証拠・方針・操作記録 08 P2P Metrics 観測の集中保存のみ。障害でもスケジュール報告は継続 ドメインイベント → Manager → Store Publisher がプッシュ。自らディスクに保存しない 全モジュールはConfigReader、Search/Scheduler/Connection ManagerはStoreも参照。重複線は省略。
設計の概念図であり、実行中のシステム画面ではない。ウィンドウが狭い場合は図内を左右にスクロールできる。

第 9 の論理コンポーネントとして P2P Connection Manager の追加を推奨する。 従来は Scheduler がリソース概要を読むだけでよかった。現在は Component をまたいで各接続を追跡し、証拠を分析し、誤ブロックを避け、切断とポリシーの再審査を実行する必要がある。独自の状態と契約を持つ責務であり、Metrics に埋め込んだり、Scheduler に各プロトコルの socket を直接操作させたりすべきではない。

コンポーネント 担当する判断と状態 境界
P2P Web View ダウンロードプール、ソース tabs、接続表、証拠の詳細、操作状態 React+Vite+Tailwind、繁体字中国語、ダークテーマのみ。Engine に直接接続しない。
P2P Manager API、Component Registry、意図/Operation/ドメインイベントの入口 Scheduler のスケジュール処理や Connection Manager の悪意判定を代行しない。
P2P Config 分割ファイルの defaults、ソース feed、schema、有効なスナップショット、設定バージョン 候補のリモートリストに設定を直接変更する権限はない。Component は同じバージョンのスナップショットを読む。
P2P Search キーワード検索、exact resolve、ソース別の探索スケジュール 登録済みの全対象に継続してソースを提供する。試行/本稼働転送は担当しない。
P2P Scheduler 試行、本稼働 pool、観察領域、リソース最適化、公平な入れ替え Task のダウンロード意図を担当し、wire/piece は操作しない。Connection Manager から可用性とコストの概要を受け取る。
P2P Component プロトコル適合と実行能力 Search Provider、Downloader、Engine、Connection Agent、Resource Reporter、Metrics Publisher を含む。Task ごとに 1 プロセスではない。
P2P Store SQLite のタスク、コンテンツ識別、スナップショット、ポリシー証拠、コマンドとファイルの journal 書き込み owner は 1 つ。全 peer の毎秒の時系列や payload は保存しない。
P2P Metrics すべての観測サンプル、時系列、分布、監視 retention Component はプッシュのみを行い、監視 DB や監視用 disk spool には書き込まない。Metrics の障害はダウンロードの失敗を意味しない。
P2P Connection Manager 接続インデックス、サービス資格、異常の証拠、ソースの回避、ブロック判断 ファイアウォールや VPN は追加しない。Engine 内で具体的な操作を実行できるのは Connection Agent のみ。

初版は引き続き 1 つの Rust p2pd に制御/分析モジュールを含め、複数の Component host をネイティブエンジンのプロセス構成に合わせて配置することを推奨する。Connection Manager は論理的に独立してテスト可能なモジュールとし、CPU/遅延の測定から必要性が示された場合のみ別プロセスに分ける。

03|一度に 1,000 件:同時に動く 2 つの経路

1,000 件の対象に対する 2 つのループ:全面的な収集と可変の転送 目標アーキテクチャの概念図であり、実システムの測定結果ではない。矢印のラベルは制御、証拠、データの方向を示す。 探索を止めず転送も並行。1,000 件すべての応答を待たない すべての有効な対象 SQLite登録/重複排除 task の受け入れに固定上限なし ソース探索の共有 tracker/eD2k/Kad/Hub 即時の背圧でsocket並行数を制限 SourceSnapshot 識別情報/coverage/TTL 保存後に一時プローブを解放 ソース要求 情報返却 期限切れ/ソース変更時に再検証。共有 session/有効な ticket は強制切断しない 候補の順位付け 証拠がある対象から準備 未応答でも他を妨げない 全バッチ単位の barrier なし Trial 集合 必要なpayloadだけ試行 固定数のスロットではない Active ダウンロードプール 有用で安定 → サービス継続 ネットワーク/I/O余力で伸縮 枠を付与 合格で昇格 PoolSupervisor 正常時は維持/追加/入れ替え 該当するボトルネック領域のみ抑制 継続的な報告 Observation 観察領域 待機/欠損/低利益/時間切れ 新証拠・期限到来→再試行 高コスト資源を解放 再試行 余力があれば challenger を補充:まず trial、その後 active プローブの解放 ≠ ソース証拠の消去。観察領域への移動 ≠ 死んだファイル。ダウンロードプールの空き ≠ ファイル全体の事前割り当て容量。
設計の概念図であり、実行中のシステム画面ではない。ウィンドウが狭い場合は図内を左右にスクロールできる。

経路 A は常時動作: バッチ検証と重複排除 → 全有効対象の登録 → Store の履歴/metadata → 共有ソース問い合わせ → 軽量ハンドシェイク/利用可能範囲 → 保存 SourceSnapshot → 一時接続を解放 → 候補順位を更新。

経路 B は A 全体の完了を待たない: 新鮮な証拠のある対象 → 試行集合 → 本稼働ダウンロード pool → PoolSupervisor → 維持/拡大/入れ替え/観察 → 期限到来または新規ソースイベントで試行に戻る。

最初から 1,000 件の「探索ジョブ」を同時に実行可能集合へ入れられる。非同期 I/O は、1,000×全 peer の socket を同じミリ秒に作成するという意味ではない。tracker transport、eD2k server session、Kad routing table、取得中の同一 metadata を共有する。同じ content+realm+設定バージョンのソース問い合わせは統合し、結果を複数の選択範囲で利用する。

ソース protocol の reask/announce interval は守る必要がある。BT tracker の応答には次回の通常リクエストまでの間隔が含まれる。choked も相手が現在データを送らないことを示す。いずれも正常なプロトコルの意味であり、Scheduler が任意に短縮できる時間ではない。S2

全バッチ単位の barrier はない。 900 番目の対象が先に応答したら、先に順位付け可能な集合へ入る。1 番目がタイムアウトしても他を妨げない。入力エラーでは該当 item だけを拒否し、永続化に成功した項目には個別の task_id、結果、復旧可能な取り込み operation を持たせる。

04|「半接続を制限しない」の正確な実装方法

libtorrent では connecting を half-open と呼ぶ。handshake は接続確立済みでプロトコルのハンドシェイク待ちの状態である。peer の bitfield/queue 情報の取得には通常、単なる TCP connect を超える処理が必要になる。S5

本仕様では probe_session を短時間のプローブとして使い、「情報だけを収集する」を TCP 半開と誤記しない。UDP tracker/DHT には専用 TCP 接続がない場合がある。接続表では論理 session と実際の socket 数を区別する。

ProbeGovernor コストだけを基準に可変ウィンドウを作り、固定の max_probing_tasks=32:

window_headroom [個] = floor(min(FD 余力, 利用可能メモリ / プローブ当たり p95 bytes) × 負荷軽減係数)
new_dials_this_tick [個] = min(window_headroom, 今回利用可能なグローバル dial tokens, 各ソースの tokens)
tokens_added [個] = adaptive_rate [回/秒] × elapsed [秒]

ウィンドウは同時に存続する数を、token bucket は毎秒の新規開始数を制御する。両者を掛け合わせて単位を誤ってはならない。FD 余力から現在の使用数と制御チャネルの予約分を引き、同じ物理 transport は一度だけ数える。NAT state、一時 port の枯渇、event-loop lag、DNS/dial timeout の急増を Governor にフィードバックする。NAT state を観測できない場合は容量を把握したと主張せず、失敗率と保守的な増加を代用する。完了したプローブは即座にリソースを返し、明確な終了 deadline を設けて半開接続による FD 占有を防ぐ。

接続解放時に保存するもの:対象コンテンツと selection digest、ソース endpoint/識別強度、宣言された coverage、サービス/待ち行列の状態、TTFB または未取得の状態、report sequence、観測時刻、有効期限、エラー分類。速度は payload の試行でしか測れない。ハンドシェイクが速くてもダウンロードが速いとは限らない。

例外は、共有 eD2k server/Hub session、常駐が必要な DHT、切断すると有効な queue ticket を失うネイティブプロトコル。解放するのは task-local のプローブ用リソースだけとし、「プローブ後に切断」のために Component 全体のソース探索を壊してはならない。ticket の維持コストは別計上し、予算のない転送を暗黙に自動開始しない。

05|状態モデル:ジョブ、接続、ソース品質を分離

Task、接続、品質、安全性の独立した状態 目標アーキテクチャの概念図であり、実システムの測定結果ではない。矢印のラベルは制御、証拠、データの方向を示す。 状態は一つのスコアではない。同じダウンロードが「不完全だが希少ピースを有効に取得中」である場合もある collecting 全有効対象を収集 rank_ready 十分な新鮮な証拠 trial 有用データの上限付き試行 active 持続可能な有効転送 observing NO_SOURCE/REMOTE_QUEUE MISSING_SEGMENTS/TIMEOUT held ユーザーによる一時停止/ローカル障害 結果不明の操作:照合待ち finished 必要データのネイティブ検証済み 移動・共有状態は別管理 trial/active 中にリモートが利用不可 完了 ローカルの阻害。peer を罰しない 新規ソース/期限到来/入れ替え機会 → trial に戻る ソース品質(独立フィールド) high/available/unknown/incomplete/low 供給・サービス・効率の観測≠安全認証 リスクの証拠(独立フィールド) unknown/anomaly/attributed_invalid/manual_deny 国、peer ID、速度は善悪を意味しない dead_candidate は長期的なファイルライフサイクルにのみ属する。一度の observing で自動清掃を起動してはならない。
設計の概念図であり、実行中のシステム画面ではない。ウィンドウが狭い場合は図内を左右にスクロールできる。
Task の主段階 開始条件 終了条件
collecting 収集中 有効な意図が送信済み 十分な新鮮なソース証拠があれば rank_readyに進める。他の対象が未完了でも影響しない。
rank_ready 試行待ち コンテンツ/サービス経路が見つかり、試行が許可される 可変の試行リソースを取得する。証拠が期限切れなら収集に戻る。
trial 試行 Downloader がネイティブサービスの開始または上限付きの待機を確認 利用可能で安定していれば active。サンプル不足/リモートの待ち行列/失敗なら observing。
active 本稼働 pool 有用なデータを確認済みで、リソースに余裕がある 完了時は検証へ。ローカル負荷があれば heldへ。リモートが利用不可なら observingへ。公平な入れ替えでは checkpoint を保持する。
observing 観察領域 現時点で高コストのリソースを長時間占有する価値がない 新規ソースの到着、クールダウン終了、queue ticket がサービス可能になった時に再審査/試行する。
held 維持するもの ユーザーの一時停止、ローカルディスク/エンジン障害、コマンド結果不明 具体的な原因に応じて復旧し、ソースの失敗として記録しない。
finished 転送段階の終了 要求データをすべて取得し、ネイティブの検証規則に従って完了 移動/共有は placement state で別管理する。

observing.reason 具体的でなければならない:NO_SOURCE、MISSING_SEGMENTS、REMOTE_QUEUE、SERVICE_TIMEOUT、LOW_MARGINAL_YIELD、STALE_EVIDENCE。dead_candidate は後続の長期ファイルライフサイクルに属し、observation の同義語ではない。

ソース品質は独立したフィールド:high / available / unknown / incomplete / low。安全性の証拠は unknown / observed_anomaly / attributed_invalid / manual_deny。UI は「不完全・本稼働ダウンロード中・安全性不明」を正しく表示できる。高速でも安全上の隔離は解除されない。

06|ソースの完全性と優先順位

同じネイティブコンテンツ、layout、selection で評価する。ローカルの検証済み集合 V、欠損集合 M、新鮮なソースが宣言する集合 A_j:

M = selected_units − V
observed_coverage = bytes((V ∪ union(A_j)) ∩ selected_units) / bytes(selected_units)
missing_supply = bytes(union(A_j) ∩ M) / bytes(M)

欠損単位がなければ完了検証に進み、seed の探索は続けない。相互補完する部分ソースだけでも完了可能である。全ソースが末尾ピースを欠くなら、ソースが多くても依然として incompleteとなる。ネイティブ bitfield のないプロトコルでは unknownを保持し、フィールドがないことを理由に有効なダウンロードを禁じない。

優先順位 0..999は小さい値ほど優先する。ただし先にユーザー意図、ポリシー、重複排除、ネイティブ retry floor、リソース資格を確認する。順位付けの特徴量は、新鮮な供給可能範囲、希少ピースの価値、有効速度の分位数、安定性、TTFB、接続/I/O コスト、過去のサービス資格がある時の成功率、待機の不足分、完了間近の利益、再待機コストを含む。国や peer ID の数値の大小を速度/安全性スコアに使わない。

順位付けはサービス保証の代わりにはならない。未知のジョブには探索不足分を持たせ、低速でも希少ピースを唯一保持するソースには rescue 予算を与える。手動の重み付けでブロック、ディスク満杯、不明な実行状態を越えてはならない。

07|Trial Controller:接続しただけでは昇格しない

試行では本当に必要なデータだけを取得し、サンプルを継続利用する。速度測定用の不要データはダウンロードしない。初期 bytes/時間制限はリソースウィンドウにすぎない。検証単位を取得し終える前に verification_pending を hash failure と呼んではならない。

trial の時間を wall-clock と qualified-service-clock に分ける。リモートの queue/choke、ローカルの速度制限、ディスクの阻害、report gap は「相手がサービスを約束したのに送らなかった」時間に含めない。ネイティブサービスを得てから TTFB、連続ウィンドウ、重複のない payload を評価する。

本稼働 pool への昇格に必要な条件: 少なくとも 3 つの有効な観測ウィンドウ、欠損している unique bytes の実際の増加、許容範囲のエラー/重複率、現在安全上の隔離がないこと、そのプロトコルとホストの有効容量に対して追加利益が試行コストを上回ること。min_qualified_ms=15000、1 ウィンドウ 5 秒、CV≤0.75 は調整の出発点であり、普遍的な成功の法則ではない。

大きなファイルの低速転送/長い RTT を、固定 MiB/s に届かないだけで除外しない。遅くても安定したサービスなら fair/rescue の昇格経路を使える。試行中に完了する小さなファイルは 3 ウィンドウを無理に満たさず直接検証へ進む。検証単位がウィンドウを超える場合は発行済み byte budget を延長するか、 inconclusiveへ戻す。予算を超えてはならない。

08|可変ダウンロードプール:タスク数は目標ではなく結果

ネットワークと I/O に応じた動的プール制御 目標アーキテクチャの概念図であり、実システムの測定結果ではない。矢印のラベルは制御、証拠、データの方向を示す。 持続可能な unique goodput を利益とする。接続数を成果にしない ネイティブリソースの概要 ネットワーク RX/TX/有効 bytes device ごとの backlog/p95 遅延 FD/RAM/CPU/hash キュー PoolSupervisor 鮮度/共通障害 相手の停止≠ローカルの減速 report の欠落は 0 ではない CapacityController 既知の容量 → 使用率 容量不明→限界利益を探索 一度変更し、安定を待つ 1秒報告 約10秒毎 余力あり → trial を拡大 例:5件で帯域使用は50%のみ ディスク正常/待機ソース利用可能 peer/window確認→ジョブ追加 飽和→維持・候補と比較 安定した incumbent を保護 少数の新ソース/不足分/希少救済 入れ替えで全プールを再起動しない 負荷あり → 局所的に drain 書き込み backlog/遅延が過大 その device へのトラフィック増加を止める ローカルの詰まりでソースを罰しない リソースベクトル、実際の効果、ネイティブ実行能力を合わせて判断 Downloader / Engine が実行して照合 runに紐づく命令。予算:requested/effective/unknown 利益なし:戻す/候補比較。上限付きdrain後に全予算返却 次ウィンドウで再観測 参考コードは判断のみ検証し、実ネットワークは制御しない。94%と変更幅は調整可能な初期値で、実測最適値ではない。
設計の概念図であり、実行中のシステム画面ではない。ウィンドウが狭い場合は図内を左右にスクロールできる。

PoolSupervisor がリアルタイムのリソース概要を収集し、CapacityController が全体を調整し、FairRotator が具体的な候補と譲る対象を決める。3 つとも Scheduler 内部のモジュールであり、Engine と制御権を争う別の piece scheduler を作るのではない。

目標は 持続可能な有効スループットの最大化であり、制御、検証、ディスク書き込み、操作の余力を確保する。94% は調整可能な目標であり、ネットワーク、CPU、ディスクを同時に 100% にする保証ではない。いずれかが先にボトルネックになり、他が満杯でないのは妥当な結果である。

観測 制御操作 禁止する動作
5 件のダウンロードが既知の帯域の半分だけを使用し、I/O/CPU は正常で候補がある まず稼働中のソースで request/peer を増やせるか確認する。不足する場合は自動で試行を追加し、昇格後に pool が自然に拡大する 「最大 5 件」を理由に追加を止めること。
ネットワークは未飽和だが、ディスク backlog が増え続け、書き込み遅延が上昇 新しい転送 grant を減らし、利益の低いジョブを drain し、検証と flush を維持する ゼロ速度をソースのせいにしてブラックリストに入れること。
ネットワークが目標に近く、backlog が安定 利益の高い incumbent を保持し、少量の探索と候補による挑戦を行う 接続数を増やすために安定性を損なうこと。
ジョブを追加しても有効速度は改善せずコストが増える 直近の拡大を戻し、限界利益の低いジョブを候補との比較で入れ替える 無制限に追加する、または pool 全体を同時に停止・再起動すること。
ネットワーク容量が不明 有用なデータとコストに基づいて段階的に試し、UI に推定/不明と表示する 1 Gbit/s NIC を根拠に利用可能な Internet 帯域を断言すること。
report が期限切れ 積極的な拡大を止め、ネイティブの安全なリソース制御を維持して再同期する サンプルの欠落を 0 B/s や空きリソースとして扱うこと。
有効なソースがこれ以上ない 記録する: SOURCE_LIMITED。観察/retry を維持する 必ず帯域を使い切ると保証する、または無関係なトラフィックを送って帯域を埋めること。

net_utilization 同じボトルネック領域、同じ byte 層のカウンターを使う。unique_goodput は重複/不要データを除いた利益であり、NIC の回線速度と同じ分母に混在させてはならない。ダウンロード、アップロード、制御/DNS overhead、他プロセスのトラフィック、shared device I/O は別計上する。

ディスク/ファイルシステムごとに独立した pressure domain を持つ。遅い HDD はそこへ書き込むジョブだけを制限し、別の空いている SSD まで停止しない。Linux PSI は CPU、メモリ、I/O stall の信号を提供できるが、ネットワーク容量やディスクスループットの完全な測定ではない。S14

09|制御アルゴリズム、振動、公平性

生サンプルは約 1 秒、判断は約 10 秒ごと。変更後は少なくとも 30 秒またはネイティブ起動コストの大きい方を待って成否を判定する。緊急保護イベントはこの周期を待たなくてよい。スループットには直近 10~30 秒の robust EWMA/中央値を、遅延とメモリコストには p95 を使う。

もし local_pressure >= 1:限界利益が低く譲れるジョブを drain し、積極的な拡大を停止
そうでなく、データが新鮮でない、または前回の拡大が安定していない:hold
そうでなく、network < 目標の 90% かつ local_pressure < 0.70:trial のリソース予算を増やす
そうでなく、ジョブ追加後に連続 2 ウィンドウで正の限界利益がない:ロールバック/候補を入れ替え
それ以外:本稼働 pool を維持し、少量の探索、不足分の返済、希少ピース救済を継続

増加幅は現在負担可能な population の 25%、減少幅は 15% を初期推定とする。実際の受け入れでは引き続き resource-vector ledger を 1 件ずつ確認する。一度に変える主因は最大 1 つ(task population/ジョブごとの peer credit/request window)とし、ボトルネックを識別できるようにする。次を ceil(active×1.25) 常に正しいダウンロード数として扱わない。

入れ替えは incumbent/challenger 方式とする。同条件で候補の推定効用が少なくとも 15% 高い、または不足分の補填期限が来た場合に行う。通常の minimum residence は 120 秒、各ラウンドは population の約 5% まで。Component の起動/待ち行列コストに応じて緩和できる。明確な無効性、プロトコル破壊、ユーザー取消は即時処理できる。

effective service debt を保持する。休眠/速度制限された時間はサービス提供済みと同じではない。リモートの queue ticket はダウンロード資格ではないが保持する価値がある。共有/アップロードもリソースを消費するため、アップロード、ディスク読み取り、並行数の ledger に計上し、ダウンロード RX だけを保護しない。

10|Connection Manager:すべての接続を説明可能に

接続分類:資格があるのにデータを送らない時だけソースの不履行を記録 目標アーキテクチャの概念図であり、実システムの測定結果ではない。矢印のラベルは制御、証拠、データの方向を示す。 Connection Manager が分析、Connection Agent が実行、SQLite が判断の証拠を保持 接続の識別情報+役割 connection_id/run_id payload/tracker/server/DHT 物理 transport ≠ task ServiceEligibility 必要範囲あり・要求送信済み 待機/chokeなし・受信枠付与済み ローカル正常、報告が新鮮 EvidenceAnalyzer 資格条件下の idle 時間 固有/重複/検証の帰属 ソースを観測し、意図は推測しない 正規化 資格時間を計測 正常な待機/ローカルの阻害 trackerにpayloadなしは正常 相手の待機/自機ディスク満杯 悪意の strike を追加しない 資格あり、request がタイムアウト 上限付き再試行でも進捗なし 指定接続だけ切断+一時回避 証拠の再生で罰を追加しない 帰属可能なプロトコル/内容違反 不正frame/帰属済み破損piece 最小 scope で隔離 複数ソースの破損≠全員有罪 PolicyResolver → 永続Outbox → Component.Connection Agent 適用範囲を広げない:connection/content-source/endpoint/IP はそれぞれ独立 run/接続を照合→applied/unsupported_scope/unknown。ackなしで成功扱い不可 切断/回避/隔離コマンド TTL 期限切れ:再試行を 1 回だけ許可。解除時は Engine のポリシーを照合 標準qBittorrentのbanPeersはIP全体のban。単一接続切断とは扱えない。精密bridgeの実装・受け入れ検証は今後必要。
設計の概念図であり、実行中のシステム画面ではない。ウィンドウが狭い場合は図内を左右にスクロールできる。

内部モジュール:ConnectionRegistry → ProtocolStateNormalizer → ServiceEligibility → EvidenceAnalyzer → PolicyResolver → CommandOutbox。ほかに ReputationLedger と期限到来時の再審査がある。登録済み Component/Collector からの報告だけを受け入れ、peer の自己申告統計をローカル測定として扱わない。

フィールド群 必要なデータ 意味
一意な識別情報 connection_id、component_id、run_id、native_connection_key、transport_handle_id 同じ endpoint への再接続には新しい connection_id、プロセス再起動には新しい run_id を与え、遅れて届いた切断コマンドが新しい接続を害するのを防ぐ。
関連付け realm、protocol、roles、task_ids、source/tracker/server の来歴 1 つの transport を複数の論理ジョブに関連付けられるが、実際の FD は一度だけ数える。
endpoint/識別情報 IP+port または overlay Destination、peer_id/user_hash、身元証明の強度 BT peer ID と eD2k user hash だけで、信頼できる人間/デバイスの識別情報になるわけではない。
サービス可能条件 handshake、remote_choked、interest、remote_queue_rank、slot_granted、未完了リクエスト、recv credit can_serve_now ネイティブプロトコルに従って計算する。不明は false ではない。
データ品質 payload/unique/duplicate/discarded/verified bytes、hash 失敗の帰属 keepalive には bytes があるがファイルの進捗ではない。hash 検証が未完了でも破損データとは限らない。
性能 TTFB、request latency p50/p95、RTT 測定方法、goodput ウィンドウ、資格条件下の stall 時間 各測定方法/時間ウィンドウを明記し、connect RTT を継続的な RTT と混同しない。
ローカルの干渉 ローカルの速度制限、disk backlog、hash キュー、メモリ/event loop、報告の欠落 誤判定の排除に使う。「ネットワークが未飽和」を理由にディスク混雑を否定しない。
地理/ネットワーク 国、ASN、データベースのバージョン、観測からの経過時間、不明の理由 ローカルでオフライン照会し、全 peer IP を第三者に送らない。国をリスク加点に使わない。

libtorrent peer_info のネイティブ API には pieces、payload speeds、ディスク書き込み待ち bytes、request timeout、choke/snubbed などの情報がある。qBittorrent WebAPI が同じ詳細を公開するかは別途テストが必要。下層にフィールドがあるだけで adapter から取得可能とは主張しない。S5

10.1 接続 ID の「レベル」は 3 つの次元に分ける

connection_id はローカルの追跡 key、peer_id/user_hash は相手側のプロトコル上の識別情報、High ID/Low ID は eD2k の到達可能性情報。これらは同じ種類のレベルではない。eMule 公式文書では High ID/Low ID はサーバーによる着信到達性の判定に基づき、ID の数値が大きいほど優れたレベルになるわけではないと説明されている。S18

設計では reachability_class=direct/callback_needed/unknown、観測 server/時刻、callback 結果、ネイティブ ID の種類を保存する。callback を必要とするソースには追加コストがあり得るが、それだけで不完全または悪意ありと判定しない。スケジュールは必要なデータを実際に取得できるかに基づく。国/ASN は分布と診断にのみ用い、国の許可・拒否リストや安全性の百分率は作らない。

11|ゼロトラフィック:サービス資格を満たしてから不履行を数える

まず接続の役割を分類する:payload_peer / tracker / ed2k_server / dht_session / hub / metadata / provider / upload_only。tracker と eD2k server は情報/索引を提供し、ファイル payload は転送しないため、ダウンロードトラフィックの閾値を適用しない。eMule 公式説明も server をファイルとソースの索引入口と定義している。S11

資格条件下の無応答タイマー qualified_idle_ms 以下をすべて満たす間だけ加算する:

payload の役割 + こちらが欠損し相手が供給可能と宣言した範囲がある
+ ハンドシェイク完了 + 相手のネイティブ状態がサービスを許可(choked/待ち行列ではない)
+ 実際に未完了の request を送信済み + recv/write credit 発行済み
+ 既知のローカルボトルネックなし + ネットワーク領域の共通障害なし + 新鮮な報告

有効な unique progress ごとにタイマーをリセットする。プロトコルの keepalive ではリセットしない。資格時間の停止中に wall-clock を加算しない。期限超過の request に上限付き取消/retry を行い、繰り返し失敗するなら disconnect + temporary avoidとし、証拠を保存する。実際の request がない、相手が正当な待ち行列にいる、欠損範囲に共通部分がない場合は、不要な接続を解放するにとどめ、悪意の strike を増やさない。

期限は max(protocol floor, 8×RTT, request size / expected lower-bound rate + margin)に基づき、調整可能な範囲に制限する。大きな request を RTT だけで判断しない。基礎 reference は 30 秒をテスト閾値に使うが、本番 Engine はネイティブの request deadline を使い、プロトコルの規定より厳しくしてはならない。

トラフィックがあって進捗がない場合は、重複 endgame block、検証済み範囲、不要なメッセージ、未検証の一時データ、相手による誤範囲の送信に分ける。ローカルで request がないことを確認した少量の遅着 unsolicited データを、一律に攻撃扱いしない。証拠では取消競合やプロトコルが許す動作を考慮する。S2

12|ブラックリストは単一の永久 IP リストではない

名称 契機 範囲/有効期限 復旧
disconnect この接続を切断 不要な接続/資格条件下のタイムアウト/確認済みの malformed 正確な run+connection。恒久的な罰則は不要 新しい証拠に応じて再接続できる。
avoid 一時的に回避 資格があるのに有用なデータを返さず、ローカルの干渉は除外済み 既定は realm+content+source。60 秒から開始し、独立した再発ごとに倍増、最大 1 時間 期限到来時は試行を 1 回だけ許可し、成功で解除/減衰する。
quarantine 隔離 帰属を特定できる破損データ、プロトコル破壊、悪意ある metadata の挙動 証明可能な最小範囲。既定 1~24 時間で証拠を保持 照合/再試行/手動撤回。
manual_deny 手動ブロック ユーザーが明示的に指定 恒久化可能。scope と副作用を必ず表示 手動で解除。

同じ evidence_id の再生で strike を重複加算しない。policy は config_revision、expires、元の理由、実際の enforcement を持ち、requested、enforced、unsupported、unknown を分けて表示する。ソース A がファイル X にサービスしなかっただけで、ファイル Y、同じ NAT 内の別 peer、ASN 全体、国全体を自動ブロックしてはならない。

複数の peer が 1 つの破損 piece に寄与しても、全員を悪意あるソースと判定しない。まず検証単位とローカル書き込み/RAM 障害を切り分け、帰属を特定できる単一ソースで再テストするか、検証済みのネイティブ attribution を使う。ネイティブ libtorrent にも hash failure への寄与者を対象とした parole 機構があり、全員を即時永久ブロックするわけではない。S5

ブロック解除は UI の変更だけでは済まない。 ネイティブポリシーを撤回して照合する。恒久的な IP ban しか支援しない adapter が、撤回可能な単一接続 avoid を提供すると偽ってはならない。

13|フィッシング、誘引、監視、安全性の判断における能力の限界

システムが検出できるのは観測可能な挙動であり、相手の真の意図ではない。分析可能なのは、パストラバーサル、危険な URL/制御文字、不正な wire 長、圧縮爆弾、帰属を特定した hash 失敗、ソースの宣言と実際の相違、利用不能なソースの反復返却、外部ページの表示や認証情報の入力を求める metadata。UI ではこれらをプレーンテキストと警告だけで表示し、自動実行、スクリプトのプレビュー、リンクの自動表示は行わない。

honeypot、著作権監視者、受動的な記録者を確実に識別することはできない。 プロトコルを完全に守り正しいデータを提供する endpoint でも、あなたの IP、hash、時刻を記録している可能性がある。正常な転送、HTTPS、peer ID、国、クラウド ASN、多数のサイトへの掲載は「誘引ノードではない」証拠にならない。surveillance_intent=unknown 見せかけの精密な百分率スコアで表現しない。

リスク分類と性能評価を分離する:availability_evidence、integrity_evidence、protocol_behavior、provenance_confidence。具体的に検証可能な evidence rules だけが、自動で狭い制限を生み出せる。将来 AI が説明/分類を補助することはできるが、LLM の推測だけで全体的な ban を行ってはならない。

provider 応答への内部ネットワーク/管理 port の混入、広範な類似ソースの洪水、DNS リダイレクト、metadata 変更などの異常では、まず provenance を保持し、該当 candidate/source を隔離する。短時間のネットワーク outage を理由に全ソースをブラックリストに入れない。

14|能力インターフェース:精密な管理は粗い adapter だけではできない

ComponentCapabilities バージョン別に reporting と enforcement を区別する。必須項目:per_connection_identity、service_eligibility、per_peer_piece_map、request_progress、disconnect_connection、avoid_content_source、reversible_ban、metadata_without_payload、retain_queue_without_autostart。値は native / observed / unsupportedとし、テスト済み fixture version を添える。

確認した qBittorrent の banPeersAction() は endpoint を解析してから次を呼ぶ: banIP()。したがって1 接続だけを閉じるコマンドの実装には使えない。S6

バックエンド 本版の要件
独自開発 REMULE Engine は接続ごとの ID、request/part 進捗、queue、対象を絞った disconnect、content-source avoid、撤回可能な policy を提供する。UI だけでなく実装が必須。
標準 qBittorrent WebAPI 取得可能な torrent/peer 概要を保持する。接続単位のサービス資格が不明なら、推測による自動ブロックは有効にしない。対象を絞った操作は次を返す: unsupported_scope。
qBittorrent 完全管理モード 保守可能な Engine bridge/制御された extension、または明示的に審査した patch で下層の connection handle に接続する必要がある。独立したタスクと受け入れ条件を定める。libtorrent の公開 API が接続単位の全切断能力を既に保証しているとは主張しない。
slskd/DC/Kubo/I2P それぞれの queue/Hub/provider/Destination を保持し、テスト済みの能力で実装する。欠けるフィールドは null+reason で示す。overlay の識別情報に国フィールドを無理に入れない。

したがって、必要な能力を持たない adapter での正式な「全精度の自動接続管理」は BLOCKEDとなる。ただし、ソース探索、粗いジョブスケジュール、実態に即した表示は先に実装できる。これは能力の段階分けであり、ユーザー要件を黙って削ることではない。

15|Tracker と eD2k:幅広く収集し、段階別に利用

安全なソースカタログ:幅広く収集し、無条件にすべてを有効化しない 目標アーキテクチャの概念図であり、実システムの測定結果ではない。矢印のラベルは制御、証拠、データの方向を示す。 122 個の tracker 候補+12 個の現行 eD2k 候補。DNS/ハンドシェイク/announce のテストは未実施 固定の出典とスナップショット ngosang+XIU2(大幅重複) eD2kページ候補/TCPポート明示 HTTPS MET未取得・feed無効 制限付き Fetch / Parser HTTPS/同一オリジン redirect サイズ/件数/圧縮/port 候補出力のみ・方針変更不可 endpoint/realm の検証 DNS解決・dialごとに再検証 内網・異なる領域のアドレスを拒否 実 socket は照合済み IP を使用 許可リスト 型付きデータ 上限付きのプローブと分析 ネイティブtransaction/制限 資格条件下のソース利益・異常 利用可能≠安全認証 リストを盲信しない Configカタログ版 Store が provenance を一時保存 変更不能な有効スナップショットを公開 手動deny/pinを上書きしない 有効候補 Componentが選択 利益に応じソースfan-outを増減 privateに公共trackerを加えない I2P/WSS は能力に適合させる ConfigReader 自動検知は「相手がフィッシング実行者か分かる」ことではない malformed/DNS リダイレクト/ソース洪水/偽データ → 追跡可能な証拠+最小の制限 ページ13→12件:撤回端点の自動選択を停止しdiffを保持。削除≠悪意。HTTPS≠善意。 数は照合可能なカタログ件数。独立運営者数でも、安全性・到達性・ダウンロード成功率向上の証明でもない。
設計の概念図であり、実行中のシステム画面ではない。ウィンドウが狭い場合は図内を左右にスクロールできる。

本パッケージには 重複排除済みの 122 個の tracker endpoint と、現在の 12 個の eD2k server 候補を内蔵する。Tracker は ngosang の 75 件と XIU2 の 122 件を統合し、このスナップショットでは前者はすべて後者に含まれる。重複排除は URI 単位であり、122 の独立運営者を意味しない。DNS alias/共有 IP/同じチームには重複の可能性が残る。

出典 今回取得したもの default の用途 安全性/完全性の制約
ngosang/trackerslist 2026-10-02 更新のスナップショット、75 entries。元の Git blob hash を照合済み バージョン付き候補、毎日の条件付き更新 保守者による正常性チェックであり、悪意や監視がないことの認証ではない。
XIU2/TrackersListCollection 2026-10-02 の README。all.txt は 122 entries、Git blob hash を照合済み Engine への重複投入なしに候補を拡大 HTTP/HTTPS/UDP/WSS を含み、他の aggregator と重複する。
eMule-Security.org 公式ページは 2026-10-02 16:02 UTC に 12 件を掲載 IP+明示された TCP port を候補 default に入れる 今回は server に接続していない。UDP/難読化 port は推測しない。
newTrackon 公式ページと安定リストの説明 正常性と uptime の補助資料 /list 動的読み込み。機械向け API は未検証のため捏造しない /api/...。
過去の gruk/peerates リスト 過去の公式/コミュニティ記録を追跡可能 有効な default に直接追加しない 古い URL、HTTP、未確認の現在の保守状態。件数を増やすために検証を緩めない。

S7 S8 S9 S10

最新ページは以前の 13 件のスナップショットより 1 件少ない。sources/ed2k-previous-snapshot.json と catalog/ed2k-source-diff.json は今回の差分を保持する。撤回されたソースは自動選択を停止するが、掲載削除だけで悪意ありとはしない。

HTTPS の server.met は今回 raw binary を取得できなかったため、feed は設定済みだが既定で無効とした。起動時の検証にはページ由来の 12 候補を利用できる。ツールの読み取り失敗は、その HTTPS URL が利用不能である証明にはならない。HTTP への自動降格は禁止する。修正には実際の HTTPS fetch、上限付き parser fixture、ソース更新テストが必要であり、完了後に feed を有効化する。

WSS endpoint は WebTorrent 専用能力の候補であり、対応しない通常の BT Engine では使わない。UDP/25 のような機微な port はまず手動審査に回し、公開リストにあるだけで自動的にプロトコルデータを送らない。一般的な低位 port の tracker も role/scheme を正確に許可し、通常 peer への全体許可に転用しない。

16|Config の default と自動更新の管理

config/source-feeds.toml feed URL、許可範囲、更新時刻、上限、ソースの来歴、検証ポリシーを定義する。catalog/trackers.json、catalog/ed2k-servers.json は追跡可能な bootstrap data である。すべての Component は引き続き ConfigReader から公開済みの有効スナップショットを取得し、server/port を独自に散在する形でハードコードしない。

以下のトランザクション経路を使う。Component の共有 CatalogFetcher が許可された出典だけをダウンロード → parser が型付き候補を返す → Store が候補/provenance を一時保存 → Connection Manager が endpoint/挙動ポリシーを適用 → Config が新しい変更不能な catalog revision を公開する。生 feed に shell、extra headers、認証値、任意の include path、ローカル policy の上書きを含めてはならない。

自動更新はユーザーが該当 Component を有効化した後に動作し、HTML を開いたり spec をインストールしたりしただけでは実行しない。24 時間+jitter ごとの conditional request を使い、実際に取得した 2 つの tracker text feed だけを既定で有効にする。新しい endpoint は validated/probing から開始し、更新失敗時は従来の正常な設定を保持する。手動 pin/deny は常に feed に優先する。

大量の追加/削除、domain の所有権や DNS/証明書の異常、大量の非 public アドレス、ソース形式の変更は quarantine diff として審査する。HTTPS と Git blob digest が保護するのは出典/転送とスナップショットの整合性であり、endpoint の善意を証明せず、未検証の署名を検証済みと呼ばない。

17|安全性の自動検知とソースの有用性分析

段階 確認 結果
取得 HTTPS、固定ソース、正常な TLS、同一オリジンで最大 2 回のリダイレクト、降格なし、timeout/encoded bytes 不適合なら last-good を保持し、feed event を生成する。
解析 raw/decoded bytes の上限、entry 上限、厳密な port/URL、MET tag/count の境界、圧縮爆弾 異常データを拒否し、解析中の実行や接続を禁止する。
アドレス literal/すべての A、AAAA/CNAME の最終アドレス、IPv4-mapped IPv6。loopback/private/link-local/multicast/reserved を拒否 dial のたび、および redirect 後に再検証し、その時点で検証済みの IP を実 connect に固定する。TLS hostname/SNI は保持する。
プロトコル 正常なハンドシェイク/transaction/request correlation、応答上限、送信元アドレス確認 usable_observed 今回利用可能だったことだけを示す。malformed があれば一時隔離する。
意味 公共/private/I2P などの realm、コンテンツ hash/scope、eD2k index と peer の区別 領域をまたぐ注入や private hash の外部送信をしない。
継続観測 資格条件を満たす問い合わせ、重複のないソースの増分、接続可能率、実サービス率、最初の byte までの時間、不良結果率 リストの長さに応じてトラフィックを積むのではなく、限界利益に応じてソースを入れ替える。

これらの SSRF 防御は実際の fetch/connect 経路に実装する必要がある。文字列 parser での一度きりの検査では DNS rebinding に対応できない。OWASP の検証および redirect/DNS リスクの説明を実装の参考とする。S12

指標の分母は資格条件を満たす必要がある:new_usable_sources / qualified_lookup、payload_served_sources / qualified_connected_sources。重複ソースは新しい成果として数えず、問い合わせ 0 回は不明であり成功率 0%/100% ではない。共通ネットワーク障害のウィンドウで全 source を罰しない。ソースの完全性の主張、候補 domain/IP 数、実際に返った有効ピースは別々に集計する。100% と主張していても完了可能とは限らない。

Tracker の UDP connect は有効な announce peers の受信と同じではない。BEP 15 は connect/announce/scrape を定義しており、各段階の結果を分けて保存する。ユーザーの全 hash に追加の「テスト announce」を送らない。S15

プライベート torrent: metadata が明示的に private=1 なら公共 tracker/DHT/PEX を追加しない。metadata 未取得の magnet は、まず元のソース情報と選択したプライバシーポリシーに従い、「不明」だからと公共 default を適用しない。public の証拠が得られてからポリシーに従って注入する。BEP 27 は private torrent に私有 tracker 由来のソースだけを使うよう求める。S3

18|Downloader と Engine の入力、出力、コマンド

インターフェース 入力 出力/必須の効果
Discover task/content/realm/Config revision/deadline metadata+sources のスナップショット、coverage quality、expiry。転送 grant は要求しない。
ProbeSources 候補ソース集合、動的リソースウィンドウ、desired scope report と保持可能な ticket。プローブ完了時に task-local 接続を解放し、解放結果を報告する。
StartTrial Task revision、source snapshot、byte/I/O/network lease run-bound operation+qualified progress。期限切れのソースで直接、高可用性と認定しない。
SetDownloadBudget task/run/generation+多次元 resource vector requested/effective budget、enforcement strength。利用不可なら unsupported を返す。
PauseOrObserve 理由と checkpoint/ticket の保持意図 observed paused/retained queue/unknown。停止が確定して初めて全計上分を解放する。
ConnectionCommand run+connection+policy_revision+scope+action+evidence applied/already_closed/unsupported_scope/stale_target/unknown/failed。
ResourceReport Engine の実測 ローカル負荷、ソース/ジョブ/接続の概要を Scheduler/Connection Manager に直接送る。過去の Metrics DB をポーリングして取得しない。
MetricsPush 生観測 batch+run/sequence/lost_count P2P Metrics が集中して永続化する。publisher のメモリ queue には上限があり、欠落を示したうえで破棄できる。

App 内部インターフェースの JSON 契約は contracts/control.schema.jsonを参照。Web 向け新 API は contracts/control.openapi.jsonを参照。サンプル request に provider credentials は含まれず、任意の native API path も受け付けない。

実際の socket 作成、piece 選択、通常のプロトコルタイムアウト、parser による即時拒否は Engine が担当する。Scheduler はダウンロード budget を調整し、Connection Manager はより狭いソース/接続の制限を適用する。有効な許可集合は両者の積集合であり、Connection Manager はユーザーの一時停止や Scheduler の割り当てを越えてはならない。

18.1 型と既定値の意味

run_id、connection_id と native key は opaque identifiers であり、信頼スコアにデコードしない。report sequence は正規形の十進文字列で、SQLite への保存時は 0..9223372036854775807に制限する。上限では wrap せず新しい run に切り替える。その他の API の数値/時間は JS safe integer に制限し、長期 bytes は十進文字列を用いて uint64 上限を検査する。null は常に unknown/非対応を意味し、 missing_reasonを添える。0 ではない。

SourceSnapshot は selection_digest に結び付く。TTL 期限切れは可用性の確信度だけを下げ、ファイルの完全性は変更しない。callback は component/run/seq に一致する必要がある。ConnectionReport の service_expected は Component が handshake、interest、queue、リクエスト資格、credit を正規化した結果である。取得可能なら元の details も添付する。qualified_idle_ms は単調時計を使い、同じサービス generation の有効観測から累計する。前後のサンプル欠落をゼロで埋めない。

multiplex transport では content-source avoid は指定 work だけを制限する。他の Task が有効なサービスを受けているのにエンジンが transport 全体しか閉じられない場合、「このジョブだけを閉じる」と偽らない。自動管理は unsupported_scopeを返し、狭い deny-new-request ルールを維持する。手動の「この物理接続を閉じる」では影響する全 Task を表示する。

If-Match: "rN" は対応コマンドの expected_policy_revision/expected_revision に対応し、body と header が不一致なら拒否する。手動ポリシー追加時の N は現在の有効 Config revision(ポリシー一覧の config_revision/ETag が返す値)、撤回時はその policy row revision、接続コマンドでは照合済みポリシーバージョンを指す。混用しない。永続的な手動ポリシーは現在の接続がなくてもよく、policy_commands に各 Component の公開/撤回結果を保存し、connection_id を捏造しない。request_id は最大 128 文字で、その管理 instance 内で重複排除する。同じ body の再送は元の operation のみを返す。ブラウザーからの mutate は同一オリジン JSON のみを受け入れ、CLI は private UDS を利用できる。製品認証は存在せず、この origin 確認を同じ UID の悪意あるプロセスに対抗できるものとはしない。

19|復旧可能なコマンドと競合

各コマンドは request_id、payload_digest、expected_run_id、connection_id または task_id、expected_revision/policy_revision を含む。先に Store に operation+outbox を記録してから Engine に送る。同じ request_id で body が異なる場合は 409、古い run/connection には stale_targetを返し、再接続後の新しい socket に適用しない。

ack がないことは unknownを意味し、切断済みや解除済みとは扱わない。実際の接続やネイティブコマンドの結果を読み取り専用で照合する。新しい request_id に変えて盲目的に再送しない。既に存在しない handle をローカルで閉じるだけなら already_closedを返してよいが、同じ run と識別情報を照合する必要がある。

リソース計上では pending / active / draining / unknown / releasedを保持する。減額/一時停止した割り当ても、確認までは潜在的転送負荷として数える。自動開始し得る remote queue は、自動消費可能な credit に引き続き計上する。ラベルを observing に変えて空きリソースを偽装してはならない。

Store に書き込めない場合は新規の派遣とポリシー拡張を止める。Engine は解析エラーの即時拒否や公開済み policy に基づく切断を継続でき、自己保護イベントは上限付きメモリに一時保存して未永続化と表示する。Metrics の障害時も即時 ResourceReport 経路を維持し、履歴観測の欠落を示すが、正常なダウンロードは止めない。

report の鮮度とサービス時間には単調時刻を使う。永続化する expiry は UTC とし、元の観測時刻/ローカル受信時刻も保持する。再起動後の時計の巻き戻り、期限範囲の不明確さ、sequence の飛びがあれば再観測が必要と示し、ブロックを延長せず、未観測のサービス時間も加算しない。Component の再登録では run を変更し、古い ID で別接続の違反数を引き継がない。

20|SQLite とデータ責任

データ owner/保存先 保存方法
タスク、ダウンロード成功/失敗、native hash、重複排除 claim、ファイル journal P2P Store/SQLite core tables を継続使用し、トランザクションを分割しない。
探索 target と直近のスケジュール可能なスナップショット P2P Store discovery_targets、source_snapshots。expiry/selection/report seq を持つ。
接続開閉インデックスとポリシーに影響する証拠 P2P Store connection_identities、connection_tasks、connection_evidence。すべての 1 秒サンプルを保存するわけではない。
一時回避、隔離、コマンドと結果 P2P Store connection_policies、connection_commands/policy_commands。target scope のインデックスと期限到来時の再審査。
ソース候補と公開の来歴 P2P Store+Config Store が facts/revision を一時保存し、有効 catalog の公開は Config だけが行う。
接続ごとの速度/RTT/国の履歴 P2P Metrics 独自のストレージ ローカルで機密を除いた detail+aggregate。Task 成功判定の別系統にはしない。
payload/ネイティブ再開情報/範囲 journal Engine の管理下にある作業ディレクトリ SQLite に payload BLOB を入れず、二重 writer を避ける。

tasks.execution_state は引き続き Engine の実行実態を表し、discovery_targets.phase は Scheduler のスケジュール段階であり、同じ state の複製ではない。両者に関係する transition は同じトランザクションで処理する。例えば desired paused → phase held、ネイティブ停止の未確認中は lease draining を維持、検証完了 → phase finished。新しい migration では、run の証拠がない既存 running Task を先に held/RECONCILE_REQUIRED にし、active と仮定しない。ネイティブとの再照合後に trial へ戻す。

store-base.sql は v2.2 の元の参考資料、store-v23.sql は追加型 schema。migration runner は先に baseline hash/バージョンを照合し、バックアップを作成し、schema migration を排他実行し、トランザクションを使う。foreign_key_check/integrity_check 合格後にだけバージョンを確定し、不明な任意の DB に直接実行しない。

Store は SQLite WAL、単一 writer、短い transaction、読み取り snapshot、上限付き batch を使う。同じ調整役が checkpoint をスケジュールし、長時間読み取りによる回収の阻害を避ける。本番 WAL 導入には SQLite WAL-reset 修正が必要。本仕様は少なくとも 3.51.3 または確認済み backport という方針を維持し、ローカル schema smoke test を本番バージョンの受け入れ検証と見なさない。S13

21|プールの入れ替えでファイルのライフサイクルを壊さない

ファイル全体のサイズで payload を事前割り当てせず、全 target の全容量も予約しない。実際の allocated blocks、native buffer、次の書き込みウィンドウ、WAL/metadata/移動用一時領域などを別々に byte 計上する。sparse の論理サイズが allocated blocks より大きくても、物理容量が満杯とは限らない。UI では両方を示す。

下載中/<hash[0:2]>/<hash[2:4]>/<storage_key>/...
下載完/<分類>/<hash[0:2]>/<hash[2:4]>/<storage_key>/...
死檔/<hash[0:2]>/<hash[2:4]>/<storage_key>/...

storage_key は protocol namespace/native content identity を含む安定した hash。ネイティブ hash 未取得の magnet は明示的な provisional key を使い、後で journal によって移行する。黙ってパスを変えてはならない。filesystem name はファイルの識別情報ではない。元のタイトルを完全に表示しても、任意の path として扱わない。

入れ替え/観察ではジョブの停止と checkpoint の保存だけを行い、観察状態になるたびに「死んだファイル」ディレクトリへ移動しない。ソース snapshot の期限切れはデータ無効を意味しない。長期の複数回の有効観測があり、有効な queue/pin/writer/unknown operation がない場合に初めて dead candidate となる。

完了時の移動前に writer の停止、検証完了、manifest の固定を確認する。同一 filesystem では atomic rename、異なる device 間では copy→fsync→検証→公開→journal 更新→旧ファイル削除を行う。どの段階で失敗しても復旧可能なデータを保持する。共有中の Engine のパス変更はネイティブ API で調整し、使用中のファイルを直接移動しない。

自動清掃は既定で無効。有効化後は Config retention に従い、まず隔離してから purge し、削除後も tombstone を残す。低速、個別ソースの avoid、tracker の一時停止だけでは清掃の根拠にならない。

22|React ワークベンチ:すべての判断を監査可能に

Noir Workbench のダークテーマ、繁体字中国語、システムフォント、固定のセマンティック色を継続し、新しいログイン/i18n/Next.js は導入しない。ソース検索は引き続き tabs に分け、各ソースのネイティブフィールドを保持する。大量データにはカーソルページング/仮想リストを用い、毎秒全表を再マウントしない。

ビュー 必須表示
ダウンロードプール 収集中/試行待ち/試行/本稼働ダウンロード/観察/保留/完了の件数。実際の active と payload がある件数を分ける。
制御状態 設定済み/推定容量、unique goodput、network 層トラフィック、I/O backlog、追加/縮小/入れ替えの理由、直近の変更結果。
接続分析 種類、task/source、ID、国/不明、速度、coverage、サービス資格、資格条件下のゼロ進捗秒数、ローカルの干渉、policy、実際の enforcement。
ソースカタログ 候補/観測上利用中/隔離/退役、feed provenance、最終確認、更新 diff、ネイティブ endpoint/port、ソースの利益。
詳細 Inspector 完全な URL/hash/ネイティブ状態、証拠タイムライン、撤回理由、trial 結果。機密 query は公開カタログに表示しない。

「この接続を閉じる」「このソースを一時回避」「この IP をブロック」は別操作にする。非対応の精密操作は disable にして理由を表示し、より広範な操作に置き換えない。誤ブロックは撤回できるが、先にネイティブの結果を照合する。結果不明の操作に成功 toast を表示しない。

ソース名/クライアント文字列/message はすべて信頼しないテキストとして扱い、次を禁止する: dangerouslySetInnerHTML。イベント更新後もフィルター、selection、scroll、下書き、focus を保持する。詳細は一致する object/run だけを更新する。200% browser zoom、forced colors、reduced motion、キーボード、長い hash は個別に受け入れ検証する。

23|リソースと性能の目標:保証ではなく測定が必要

開発者が対象テスト基準の CPU/RAM/storage/ネットワークと Engine build を記録する。予定する受け入れ条件:1,000 件の有効 target は登録後にすべて探索スケジュールから見えること、結果が 1 件戻ればその試行を開始できること、ソース timeout がローカル API を阻害しないこと、バックプレッシャー時に無制限 mailbox/接続 retry が生じないこと、ソース追加で net throughput が持続的に低下したらロールバックすること。

十分な制御可能ソースを持つ合成 loopback テストでは、5 ジョブが容量の 50% しか使わない時に controller が trial を追加し、目標または新たなボトルネックに達したら拡大を止める。controller の効果は同じ workload の goodput、末尾遅延、メモリ、FD、disk backlog、churn を併せて比較し、スループット曲線だけで判断しない。

初期 SLO 案:制御概要の age p95≤2 秒、ローカルの非データ問い合わせ p95≤200 ms、資格条件下のサービス timeout の次の control tick までに disconnect を提案する。実際の Engine closure latency は別記する。これらは目標であり、製品実装前に passed としない。

負荷イベントには優先チャネルを設ける。価値の低い高頻度サンプルは統合し、exact counters を失われた delta で累積しない。各 run は monotonic seq/reset を持ち、照合後に連続表示できる。Metrics は connection_id を無制限の Prometheus label に使わず、明細は retention に従い detail として保存し、集計には有限の label を使う。

24|移行、ロールバック、開発の順序

まず v2.2 のスナップショットと schema fingerprint を固定し、古い固定 slot 設定を直接適用しない。v2.3 の auto 設定と migration を追加し、バックアップ DB でリプレイテストする。旧 max_active_tasks/max_probes は履歴設定へ変換し、無効化理由を表示する。auto モードへ密かに戻さない。

実装順:契約と state model → 探索の全体可視化/短時間プローブ → Connection Agent/Registry → 精密な失敗資格と撤回可能な policy → adaptive pool → Config catalog fetch/validation → UI → 障害・実ネットワーク受け入れ検証。REMULE が最初の全精度の縦断実装を提供する。qBittorrent の精密 bridge は独立した依存であり、標準の banPeers で代用したふりをしない。

ロールバック前に新規派遣を止め、全 draining/unknown ジョブを確認し、DB をバックアップする。旧版 Engine に同じ partial を同時書き込みさせない。新 schema への未検証の破壊的 down-migration より、旧プロセス+対応バックアップの復元を優先する。catalog は last-good revision に戻せるが、policy evidence はロールバックで消さない。

本パッケージは commit、push、デプロイ、外部ツールのインストール、VPN Manager の変更、未許可のテストデータ利用を許可しない。Claude Code は引き継ぎ後、定めたタスクを直接実装・テストし、全内容を別の計画に書き直しただけで納品としない。

25|既知の制約と納品状況

仕様は今回の全要件を網羅しているが、製品は未実装。 ソース候補には実際の公開データと snapshot digest があるが、live peer/tracker announce/eD2k ダウンロードテストはない。「安全なサーバー」や「フィッシング排除済み」の認証はない。

標準 qBittorrent の接続単位の精密制御の不足、および server.met の raw feed 未取得は、今回明示した統合/証拠の条件である。対応する full-feature acceptance は条件を削除せず BLOCKED を維持する。実際の Node/Rust/Engine バージョンは、実装 preflight で既存ロックファイルと owner policy を読んでから固定し、利用可能な build hash を捏造しない。

添付資料の具体的な検証結果は次を参照: VALIDATION.md;ACCEPTANCE.md のソフトウェアケースは実施すべき受け入れ検証であり、実行済みではない。操作可能な HTML はルールの例示だけで、すべての数値を合成データと明記し、どのソースにもリクエストを送らない。

懸念する状況を一つずつ当てはめる。

以下は本書の判断条件を再現するだけで、実際の速度測定、ソースプローブ、ダウンロードシミュレーションではなく、接続を一切作らない。比率、秒数、件数はすべて合成入力。

1. 動的 pool の判断

推奨する試行の追加:2 件

5 件のダウンロードでネットワークの 50% しか使用せず、ローカルは正常。この件数はステップ幅の例であり、実際には FD/RAM/I/O/ネットワークの割り当てを個別に発行する必要がある。

負荷比 1.0 は該当するボトルネック領域がポリシー制限に達したことを示し、ホスト全体の CPU 使用率ではない。容量不明時は限界利益を見て、「Internet 帯域の 50% 使用」と断言しない。

2. 同じ「ダウンロードしていない」でも処置が違う理由

この接続を切断+ソースを一時回避

サービス資格が成立し、request が期限超過し、ローカル/共通ネットワーク障害を除外して初めて適用する。IP 全体を自動 ban しない。

「一時回避」の既定は realm+content+source であり、一律に IP 全体をブロックせず、まして国をブロックしない。すべての自動操作で証拠と実行応答を保存する。

3. 既定の候補カタログ

122 個の tracker URI、12 個の現行 eD2k server に加え、上流で削除された 1 endpoint の旧スナップショットを保持する。以下はすべて引き続き未プローブ/意図不明。URI の表示で接続は行わない。

134 件の候補を表示。すべて未プローブで、安全上の意図は不明。

候補 プロトコル 出典 既定の処理
udp://tracker.opentrackr.org:1337/announce udp ngosang · xiu2 候補・まず検証
http://tracker.opentrackr.org:1337/announce http ngosang · xiu2 候補・まず検証
udp://open.stealth.si:80/announce udp ngosang · xiu2 候補・まず検証
udp://tracker.torrent.eu.org:451/announce udp ngosang · xiu2 機微な port・手動審査
udp://open.demonii.com:1337/announce udp ngosang · xiu2 候補・まず検証
udp://tracker.skynetcloud.site:6969/announce udp ngosang · xiu2 候補・まず検証
udp://tracker.qu.ax:6969/announce udp ngosang · xiu2 候補・まず検証
http://tracker.qu.ax:6969/announce http ngosang · xiu2 候補・まず検証
udp://tracker.corpscorp.online:80/announce udp ngosang · xiu2 候補・まず検証
udp://tracker.bittor.pw:1337/announce udp ngosang · xiu2 候補・まず検証
udp://explodie.org:6969/announce udp ngosang · xiu2 候補・まず検証
udp://tracker.tryhackx.org:6969/announce udp ngosang · xiu2 候補・まず検証
udp://tracker.gmi.gd:6969/announce udp ngosang · xiu2 候補・まず検証
udp://tracker-udp.gbitt.info:80/announce udp ngosang · xiu2 候補・まず検証
udp://retracker01-msk-virt.corbina.net:80/announce udp ngosang · xiu2 候補・まず検証
udp://tracker.nyaa.vc:6969/announce udp ngosang · xiu2 候補・まず検証
http://tracker.dler.org:6969/announce http ngosang · xiu2 候補・まず検証
http://tracker.dler.com:6969/announce http ngosang · xiu2 候補・まず検証
udp://tracker.dler.org:6969/announce udp ngosang · xiu2 候補・まず検証
udp://tracker2.dler.org:80/announce udp ngosang · xiu2 候補・まず検証
http://tracker2.dler.org:80/announce http ngosang · xiu2 候補・まず検証
udp://tracker.ducks.party:1984/announce udp ngosang · xiu2 候補・まず検証
http://tracker.renfei.net:8080/announce http ngosang · xiu2 候補・まず検証
udp://tracker.peerfect.org:6969/announce udp ngosang · xiu2 候補・まず検証
udp://tracker.opentrackr.com:6969/announce udp ngosang · xiu2 候補・まず検証
udp://tracker.ilibr.org:6969/announce udp ngosang · xiu2 候補・まず検証
udp://mail.segso.net:6969/announce udp ngosang · xiu2 候補・まず検証
udp://t.overflow.biz:6969/announce udp ngosang · xiu2 候補・まず検証
udp://bittorrent-tracker.e-n-c-r-y-p-t.net:1337/announce udp ngosang · xiu2 候補・まず検証
http://t.overflow.biz:6969/announce http ngosang · xiu2 候補・まず検証
http://bittorrent-tracker.e-n-c-r-y-p-t.net:1337/announce http ngosang · xiu2 候補・まず検証
https://tracker.pmman.tech:443/announce https ngosang · xiu2 候補・まず検証
udp://ipv4announce.sktorrent.eu:6969/announce udp ngosang · xiu2 候補・まず検証
http://ipv4announce.sktorrent.eu:6969/announce http ngosang · xiu2 候補・まず検証
udp://evan.im:6969/announce udp ngosang · xiu2 候補・まず検証
udp://tracker.wildkat.net:6969/announce udp ngosang · xiu2 候補・まず検証
udp://tracker.004430.xyz:1337/announce udp ngosang · xiu2 候補・まず検証
udp://tr4ck3r.duckdns.org:6969/announce udp ngosang · xiu2 候補・まず検証
udp://seedpeer.net:6969/announce udp ngosang · xiu2 候補・まず検証
https://tracker.zhuqiy.com:443/announce https ngosang · xiu2 候補・まず検証
https://tracker.nekomi.cn:443/announce https ngosang · xiu2 候補・まず検証
https://004430.xyz:443/announce https ngosang · xiu2 候補・まず検証
http://tracker.mywaifu.best:6969/announce http ngosang · xiu2 候補・まず検証
http://004430.xyz:80/announce http ngosang · xiu2 候補・まず検証
udp://open.ftorrent.com:443/announce udp ngosang · xiu2 候補・まず検証
udp://martin-gebhardt.eu:25/announce udp ngosang · xiu2 機微な port・手動審査
https://tracker.7471.top:443/announce https ngosang · xiu2 候補・まず検証
https://tr.nyacat.pw:443/announce https ngosang · xiu2 候補・まず検証
http://tracker.waaa.moe:6969/announce http ngosang · xiu2 候補・まず検証
http://tracker.dhitechnical.com:6969/announce http ngosang · xiu2 候補・まず検証
http://tr.nyacat.pw:80/announce http ngosang · xiu2 候補・まず検証
http://open.tracker.cl:1337/announce http ngosang · xiu2 候補・まず検証
udp://tracker.teambelgium.net:6969/announce udp ngosang · xiu2 候補・まず検証
udp://tracker.fnix.net:6969/announce udp ngosang · xiu2 候補・まず検証
udp://tracker.aruku.ovh:8081/announce udp ngosang · xiu2 候補・まず検証
udp://admin.52ywp.com:6969/announce udp ngosang · xiu2 候補・まず検証
https://open.ftorrent.com:443/announce https ngosang · xiu2 候補・まず検証
http://tracker.23794.top:6969/announce http ngosang · xiu2 候補・まず検証
udp://anime-tracker.aruku.kro.kr:8081/announce udp ngosang · xiu2 候補・まず検証
https://tracker.foreverpirates.co:443/announce https ngosang · xiu2 候補・まず検証
udp://tracker.torrents.observer:80/announce udp ngosang · xiu2 候補・まず検証
udp://tracker.nyaa.net:6969/announce udp ngosang · xiu2 候補・まず検証
udp://tracker.cn.nyaa.net:6969/announce udp ngosang · xiu2 候補・まず検証
udp://tr3.ysagin.top:2715/announce udp ngosang · xiu2 候補・まず検証
udp://kolankoalastree.newtrackon.co.nz:1337/announce udp ngosang · xiu2 候補・まず検証
udp://archive.torrentonline.cc:42069/announce udp ngosang · xiu2 候補・まず検証
http://tracker.zhuqiy.dgj055.icu:80/announce http ngosang · xiu2 候補・まず検証
http://1337.abcvg.info:80/announce http ngosang · xiu2 候補・まず検証
udp://yuptracker-eu.gaijinent.com:27022/announce udp ngosang · xiu2 候補・まず検証
udp://whybother.torrentonline.cc:42069/announce udp ngosang · xiu2 候補・まず検証
udp://tracker.playground.ru:6969/announce udp ngosang · xiu2 候補・まず検証
udp://tracker.ddunlimited.net:6969/announce udp ngosang · xiu2 候補・まず検証
udp://ns575949.ip-51-222-82.net:6969/announce udp ngosang · xiu2 候補・まず検証
udp://edgev.duckdns.org:6969/announce udp ngosang · xiu2 候補・まず検証
https://t.213891.xyz:443/announce https ngosang · xiu2 候補・まず検証
http://107.189.2.131:1337/announce http xiu2 候補・まず検証
http://207.241.226.111:6969/announce http xiu2 候補・まず検証
http://207.241.231.226:6969/announce http xiu2 候補・まず検証
http://announce.sktorrent.eu:6969/announce http xiu2 候補・まず検証
http://bt1.archive.org:6969/announce http xiu2 候補・まず検証
http://bt2.archive.org:6969/announce http xiu2 候補・まず検証
http://nyaa.tracker.wf:7777/announce http xiu2 候補・まず検証
http://retracker01-msk-virt.corbina.net:80/announce http xiu2 候補・まず検証
http://torrentsmd.com:8080/announce http xiu2 候補・まず検証
http://tracker.internetwarriors.net:1337/announce http xiu2 候補・まず検証
http://tracker.xn--djrq4gl4hvoi.top:80/announce http xiu2 候補・まず検証
http://tracker1.itzmx.com:8080/announce http xiu2 候補・まず検証
http://www.wareztorrent.com:80/announce http xiu2 候補・まず検証
https://1.tracker.eu.org:443/announce https xiu2 候補・まず検証
https://1337.abcvg.info:443/announce https xiu2 候補・まず検証
https://tr.abiir.top:443/announce https xiu2 候補・まず検証
https://tr.burnabyhighstar.com:443/announce https xiu2 候補・まず検証
https://tracker.kuroy.me:443/announce https xiu2 候補・まず検証
https://tracker.midnightprogrammer.net:443/announce https xiu2 候補・まず検証
https://tracker.qingwapt.org:443/announce https xiu2 候補・まず検証
https://tracker1.520.jp:443/announce https xiu2 候補・まず検証
udp://52.58.128.163:6969/announce udp xiu2 候補・まず検証
udp://93.158.213.92:6969/announce udp xiu2 候補・まず検証
udp://[2a03:7220:8083:cd00::1]:451/announce udp xiu2 機微な port・手動審査
udp://[2a04:ac00:1:3dd8::1:2710]:2710/announce udp xiu2 候補・まず検証
udp://exodus.desync.com:6969/announce udp xiu2 候補・まず検証
udp://ipv6.govt.hu:6969/announce udp xiu2 候補・まず検証
udp://open.tracker.ink:6969/announce udp xiu2 候補・まず検証
udp://opentor.org:2710/announce udp xiu2 候補・まず検証
udp://opentracker.lain.moscow:6969/announce udp xiu2 候補・まず検証
udp://p4p.arenabg.com:1337/announce udp xiu2 候補・まず検証
udp://retracker.hotplug.ru:2710/announce udp xiu2 候補・まず検証
udp://torrent.tracker.durukanbal.com:6969/announce udp xiu2 候補・まず検証
udp://tracker.dler.com:6969/announce udp xiu2 候補・まず検証
udp://tracker.farted.net:6969/announce udp xiu2 候補・まず検証
udp://tracker.filemail.com:6969/announce udp xiu2 候補・まず検証
udp://tracker.flatuslifir.is:6969/announce udp xiu2 候補・まず検証
udp://tracker.k.vu:6969/announce udp xiu2 候補・まず検証
udp://tracker.skyts.net:6969/announce udp xiu2 候補・まず検証
udp://tracker.willy.pro:6969/announce udp xiu2 候補・まず検証
udp://tracker.yume-hatsuyuki.moe:6969/announce udp xiu2 候補・まず検証
udp://tracker1.itzmx.com:8080/announce udp xiu2 候補・まず検証
udp://tracker2.itzmx.com:6961/announce udp xiu2 候補・まず検証
udp://tracker3.itzmx.com:6961/announce udp xiu2 候補・まず検証
udp://tracker4.itzmx.com:2710/announce udp xiu2 候補・まず検証
udp://v2.iperson.xyz:6969/announce udp xiu2 候補・まず検証
wss://tracker.openwebtorrent.com:443/announce wss xiu2 WebTorrent 能力が必要
eMule Sunrise — ed2k://|server|176.123.5.89|4725|/ ed2k emule-security-web 候補・まず検証
Nordic Server — ed2k://|server|77.42.68.79|4232|/ ed2k emule-security-web 候補・まず検証
Sharing-Devils No.4 — ed2k://|server|91.208.162.87|4232|/ ed2k emule-security-web 候補・まず検証
MO-Server — ed2k://|server|91.208.162.182|4232|/ ed2k emule-security-web 候補・まず検証
ed2k-rust — ed2k://|server|85.17.116.222|6082|/ ed2k emule-security-web 候補・まず検証
Sharing-Devils No.2 — ed2k://|server|85.121.5.137|4232|/ ed2k emule-security-web 候補・まず検証
eMule Cosmic — ed2k://|server|212.95.35.240|4232|/ ed2k emule-security-web 候補・まず検証
Mazinga Server — ed2k://|server|213.141.198.207|4232|/ ed2k emule-security-web 候補・まず検証
MO-ad-free — ed2k://|server|57.131.35.107|4232|/ ed2k emule-security-web 候補・まず検証
Drunken Donkey — ed2k://|server|193.187.90.12|4661|/ ed2k emule-security-web 候補・まず検証
MO-24/7 — ed2k://|server|212.95.35.240|4323|/ ed2k emule-security-web 候補・まず検証
Sharing-Devils No.3 TEST — ed2k://|server|91.208.162.55|4235|/ ed2k emule-security-web 候補・まず検証

4. 審査メモ

このページのメモリ内だけに保存。更新する前にエクスポートしてください。
候補ソースの元データ:134 endpoint、来歴、不明状態

原稿に埋め込まれた全データフィールドを閲覧用に保持し、endpoint へのリクエストは送信しない。

[
  {
    "endpoint_id": "tr_e7aafb3a92ad2a4c04d3",
    "uri": "udp://tracker.opentrackr.org:1337/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_5347b4c4a5d8897046d8",
    "uri": "http://tracker.opentrackr.org:1337/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_9602e7b2019adcad1a45",
    "uri": "udp://open.stealth.si:80/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_49b560d0e99309186ed2",
    "uri": "udp://tracker.torrent.eu.org:451/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "manual_review_sensitive_port",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_768d2af44fd5cbd0bbb4",
    "uri": "udp://open.demonii.com:1337/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_9b45647cbc4ec20494df",
    "uri": "udp://tracker.skynetcloud.site:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_8a3460ed3132abf5b5e9",
    "uri": "udp://tracker.qu.ax:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_7c3ca5e0e49e4b81b0ba",
    "uri": "http://tracker.qu.ax:6969/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_d52fbcb060a99de3d419",
    "uri": "udp://tracker.corpscorp.online:80/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_00b85fcb09930b486810",
    "uri": "udp://tracker.bittor.pw:1337/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_f90e8a1ef4642b3d458e",
    "uri": "udp://explodie.org:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_6a2d73948ec717bd1661",
    "uri": "udp://tracker.tryhackx.org:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_0d3c4bf282cf13183eaa",
    "uri": "udp://tracker.gmi.gd:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_0bc11831f07df4bbdcd1",
    "uri": "udp://tracker-udp.gbitt.info:80/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_0e68c794851f89008cb8",
    "uri": "udp://retracker01-msk-virt.corbina.net:80/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_2a15cbf6aeafc0a5ca00",
    "uri": "udp://tracker.nyaa.vc:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_7290c29a76512a7efbbc",
    "uri": "http://tracker.dler.org:6969/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_f0d50d0bf39024111736",
    "uri": "http://tracker.dler.com:6969/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_1305ac54bbf0dddb8f50",
    "uri": "udp://tracker.dler.org:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_4601f3abc045f1e2cafd",
    "uri": "udp://tracker2.dler.org:80/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_aea6c1899a6573ce1418",
    "uri": "http://tracker2.dler.org:80/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_1da6adaf350291d38be0",
    "uri": "udp://tracker.ducks.party:1984/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_ccafa756cfa8bbf605f6",
    "uri": "http://tracker.renfei.net:8080/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_8b9bbe1e89109d3807b3",
    "uri": "udp://tracker.peerfect.org:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_1a8e7be370b3d0402f37",
    "uri": "udp://tracker.opentrackr.com:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_0a79fae0544191597bdb",
    "uri": "udp://tracker.ilibr.org:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_0e0e3c29f21b584bdd54",
    "uri": "udp://mail.segso.net:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_8e43ee12d073342ce1ed",
    "uri": "udp://t.overflow.biz:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_7e056bf58ddd282514d2",
    "uri": "udp://bittorrent-tracker.e-n-c-r-y-p-t.net:1337/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_1c0dbd90b96339c7bef2",
    "uri": "http://t.overflow.biz:6969/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_e65763949fba96ff14d9",
    "uri": "http://bittorrent-tracker.e-n-c-r-y-p-t.net:1337/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_5399dffb660edcc7e377",
    "uri": "https://tracker.pmman.tech:443/announce",
    "protocol": "https",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_ec9c8a050b732fab8d54",
    "uri": "udp://ipv4announce.sktorrent.eu:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_3a8e27ba74c65281f587",
    "uri": "http://ipv4announce.sktorrent.eu:6969/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_d31b5445418d00503b85",
    "uri": "udp://evan.im:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_bf6c1241ac9b56e6697c",
    "uri": "udp://tracker.wildkat.net:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_ad965301125418e0ead7",
    "uri": "udp://tracker.004430.xyz:1337/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_ed4257101f050cf483a3",
    "uri": "udp://tr4ck3r.duckdns.org:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_177b8a369d20a9afcb0c",
    "uri": "udp://seedpeer.net:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_cfd72a51cd1ee02e8095",
    "uri": "https://tracker.zhuqiy.com:443/announce",
    "protocol": "https",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_e239d5bc5eb10f0862f2",
    "uri": "https://tracker.nekomi.cn:443/announce",
    "protocol": "https",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_1ef5402a1ba857349587",
    "uri": "https://004430.xyz:443/announce",
    "protocol": "https",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_e4838ecfad683c540971",
    "uri": "http://tracker.mywaifu.best:6969/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_dbbc9fc9f9e0b6e415af",
    "uri": "http://004430.xyz:80/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_93fd046608d6f6415a59",
    "uri": "udp://open.ftorrent.com:443/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_a52edc69aeb9dcd0b3f9",
    "uri": "udp://martin-gebhardt.eu:25/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "manual_review_sensitive_port",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_65c37e05b8c3bf438115",
    "uri": "https://tracker.7471.top:443/announce",
    "protocol": "https",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_3210bf260996b1e21e02",
    "uri": "https://tr.nyacat.pw:443/announce",
    "protocol": "https",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_26c33d6e61a7ea8f32d5",
    "uri": "http://tracker.waaa.moe:6969/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_62c68e75757248fdb3d4",
    "uri": "http://tracker.dhitechnical.com:6969/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_6c13c9de7c3c4ffe98f4",
    "uri": "http://tr.nyacat.pw:80/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_9d75a903482157d43261",
    "uri": "http://open.tracker.cl:1337/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_89becaa140a0e5855ccf",
    "uri": "udp://tracker.teambelgium.net:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_c29901bbbb842bd27834",
    "uri": "udp://tracker.fnix.net:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_22ffae26c9bb05586686",
    "uri": "udp://tracker.aruku.ovh:8081/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_a0b8fce3c58387d4b243",
    "uri": "udp://admin.52ywp.com:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_153629b08e1d449007ba",
    "uri": "https://open.ftorrent.com:443/announce",
    "protocol": "https",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_dcbfaf8a6379c365c369",
    "uri": "http://tracker.23794.top:6969/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_8b6e6d8593717fcbd8e8",
    "uri": "udp://anime-tracker.aruku.kro.kr:8081/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_42d103ff92a192f10f17",
    "uri": "https://tracker.foreverpirates.co:443/announce",
    "protocol": "https",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_b5f4bf48e5b62cc60a02",
    "uri": "udp://tracker.torrents.observer:80/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_30ab8a6195b3b937b936",
    "uri": "udp://tracker.nyaa.net:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_5136e11d0a4db5b8a2fd",
    "uri": "udp://tracker.cn.nyaa.net:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_3a517c9676460af2c244",
    "uri": "udp://tr3.ysagin.top:2715/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_d8764c6a2e54e554d737",
    "uri": "udp://kolankoalastree.newtrackon.co.nz:1337/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_8f459cc4659bb8918879",
    "uri": "udp://archive.torrentonline.cc:42069/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_3e231294fec576a21474",
    "uri": "http://tracker.zhuqiy.dgj055.icu:80/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_1d23856a4dcba12f0890",
    "uri": "http://1337.abcvg.info:80/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_bfad8febecc8d34ea60f",
    "uri": "udp://yuptracker-eu.gaijinent.com:27022/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_d00204c2dc99432de5bc",
    "uri": "udp://whybother.torrentonline.cc:42069/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_a3715e45cc4ff2a08c08",
    "uri": "udp://tracker.playground.ru:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_b670d5ffef147c1a34f5",
    "uri": "udp://tracker.ddunlimited.net:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_92ff87846531ca4561d0",
    "uri": "udp://ns575949.ip-51-222-82.net:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_6322a4e0ac580ca0b5eb",
    "uri": "udp://edgev.duckdns.org:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_6426e702803f2a56bd2e",
    "uri": "https://t.213891.xyz:443/announce",
    "protocol": "https",
    "realm": "public_bt",
    "source_ids": [
      "ngosang",
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_1fa0694e8c47f66bab78",
    "uri": "http://107.189.2.131:1337/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_85bf612e15f11c251e06",
    "uri": "http://207.241.226.111:6969/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_9ac05b94a64cc1d0ee51",
    "uri": "http://207.241.231.226:6969/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_81cf09ece384117fd0af",
    "uri": "http://announce.sktorrent.eu:6969/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_effa179ee8647e57fba2",
    "uri": "http://bt1.archive.org:6969/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_1c78d114e0beafc157ca",
    "uri": "http://bt2.archive.org:6969/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_9da1458a29c500d77fcd",
    "uri": "http://nyaa.tracker.wf:7777/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_197005b958105f57772b",
    "uri": "http://retracker01-msk-virt.corbina.net:80/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_93bd6abeb95507c17e4e",
    "uri": "http://torrentsmd.com:8080/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_fa444de822d4fc660cff",
    "uri": "http://tracker.internetwarriors.net:1337/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_8a1943e27b9ded1c801c",
    "uri": "http://tracker.xn--djrq4gl4hvoi.top:80/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_f4ba27c3df99e4a177a8",
    "uri": "http://tracker1.itzmx.com:8080/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_d4c351818647f027f93d",
    "uri": "http://www.wareztorrent.com:80/announce",
    "protocol": "http",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_fecc3323bb8e25e365e0",
    "uri": "https://1.tracker.eu.org:443/announce",
    "protocol": "https",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_f949af7d4c434450546a",
    "uri": "https://1337.abcvg.info:443/announce",
    "protocol": "https",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_ca197896ef641f99ca3e",
    "uri": "https://tr.abiir.top:443/announce",
    "protocol": "https",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_6be536d2f232af5b867f",
    "uri": "https://tr.burnabyhighstar.com:443/announce",
    "protocol": "https",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_96ebc73f40872cfdf53e",
    "uri": "https://tracker.kuroy.me:443/announce",
    "protocol": "https",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_eb2db6860c56c56043da",
    "uri": "https://tracker.midnightprogrammer.net:443/announce",
    "protocol": "https",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_aee04a414594e02c7a2f",
    "uri": "https://tracker.qingwapt.org:443/announce",
    "protocol": "https",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_9bb064af7f9fac5f7fed",
    "uri": "https://tracker1.520.jp:443/announce",
    "protocol": "https",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_5aa546aa6429c21562bd",
    "uri": "udp://52.58.128.163:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_621c69ccd287852c6ffb",
    "uri": "udp://93.158.213.92:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_9aaf54b6de887e506605",
    "uri": "udp://[2a03:7220:8083:cd00::1]:451/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "manual_review_sensitive_port",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_9b53ba718fdd78b7d97c",
    "uri": "udp://[2a04:ac00:1:3dd8::1:2710]:2710/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_975eeb764b3c82e9eef5",
    "uri": "udp://exodus.desync.com:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_3c49cdb225af51e2cdee",
    "uri": "udp://ipv6.govt.hu:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_14abef20bbf32479b592",
    "uri": "udp://open.tracker.ink:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_793a7ea68ff42c290e2a",
    "uri": "udp://opentor.org:2710/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_d60a7f8cc21ae5c83f17",
    "uri": "udp://opentracker.lain.moscow:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_38611c3f8126c9b4e9f2",
    "uri": "udp://p4p.arenabg.com:1337/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_f237059b169ee48288ba",
    "uri": "udp://retracker.hotplug.ru:2710/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_bb48f3e6abee60b5e719",
    "uri": "udp://torrent.tracker.durukanbal.com:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_66f78ddb6a174d3cdc58",
    "uri": "udp://tracker.dler.com:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_f5d5a4239eab5bbe1755",
    "uri": "udp://tracker.farted.net:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_7231187c42916af832e5",
    "uri": "udp://tracker.filemail.com:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_35e5139bec3d124c5cb1",
    "uri": "udp://tracker.flatuslifir.is:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_1cf6e29fec5e1adfa926",
    "uri": "udp://tracker.k.vu:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_8647636414170b8ae4cc",
    "uri": "udp://tracker.skyts.net:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_9c8f4b1393fa35c207cb",
    "uri": "udp://tracker.willy.pro:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_f1b4ca7ff40f7fc487eb",
    "uri": "udp://tracker.yume-hatsuyuki.moe:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_e3dc7e2540d3b9221c2b",
    "uri": "udp://tracker1.itzmx.com:8080/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_705c677be0bdfaadd829",
    "uri": "udp://tracker2.itzmx.com:6961/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_7a4c7e0d1162e7a57200",
    "uri": "udp://tracker3.itzmx.com:6961/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_8b119d7f519ba0442456",
    "uri": "udp://tracker4.itzmx.com:2710/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_638fd3f69d78a8cc976f",
    "uri": "udp://v2.iperson.xyz:6969/announce",
    "protocol": "udp",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "tr_bd4914bd4d5d433f649a",
    "uri": "wss://tracker.openwebtorrent.com:443/announce",
    "protocol": "wss",
    "realm": "public_bt",
    "source_ids": [
      "xiu2"
    ],
    "syntax_status": "passed",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "requires_webtorrent_capability",
    "country": null,
    "kind": "tracker"
  },
  {
    "endpoint_id": "ed_61f00ea481c990a9a6eb",
    "name": "eMule Sunrise",
    "uri": "ed2k://|server|176.123.5.89|4725|/",
    "ip": "176.123.5.89",
    "tcp_port": 4725,
    "udp_port": null,
    "obfuscated_port": null,
    "source_ids": [
      "emule-security-web"
    ],
    "source_updated_at": "2026-10-02T16:02:00Z",
    "observed_date": "2026-10-03",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "kind": "ed2k",
    "protocol": "ed2k"
  },
  {
    "endpoint_id": "ed_cd74a8536f0297e43f99",
    "name": "Nordic Server",
    "uri": "ed2k://|server|77.42.68.79|4232|/",
    "ip": "77.42.68.79",
    "tcp_port": 4232,
    "udp_port": null,
    "obfuscated_port": null,
    "source_ids": [
      "emule-security-web"
    ],
    "source_updated_at": "2026-10-02T16:02:00Z",
    "observed_date": "2026-10-03",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "kind": "ed2k",
    "protocol": "ed2k"
  },
  {
    "endpoint_id": "ed_1749651af8b6af20bb96",
    "name": "Sharing-Devils No.4",
    "uri": "ed2k://|server|91.208.162.87|4232|/",
    "ip": "91.208.162.87",
    "tcp_port": 4232,
    "udp_port": null,
    "obfuscated_port": null,
    "source_ids": [
      "emule-security-web"
    ],
    "source_updated_at": "2026-10-02T16:02:00Z",
    "observed_date": "2026-10-03",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "kind": "ed2k",
    "protocol": "ed2k"
  },
  {
    "endpoint_id": "ed_801e2a754201c3c505f7",
    "name": "MO-Server",
    "uri": "ed2k://|server|91.208.162.182|4232|/",
    "ip": "91.208.162.182",
    "tcp_port": 4232,
    "udp_port": null,
    "obfuscated_port": null,
    "source_ids": [
      "emule-security-web"
    ],
    "source_updated_at": "2026-10-02T16:02:00Z",
    "observed_date": "2026-10-03",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "kind": "ed2k",
    "protocol": "ed2k"
  },
  {
    "endpoint_id": "ed_1d9ae4dc6a91c2279869",
    "name": "ed2k-rust",
    "uri": "ed2k://|server|85.17.116.222|6082|/",
    "ip": "85.17.116.222",
    "tcp_port": 6082,
    "udp_port": null,
    "obfuscated_port": null,
    "source_ids": [
      "emule-security-web"
    ],
    "source_updated_at": "2026-10-02T16:02:00Z",
    "observed_date": "2026-10-03",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "kind": "ed2k",
    "protocol": "ed2k"
  },
  {
    "endpoint_id": "ed_29423d6cd95a8ff0d7d8",
    "name": "Sharing-Devils No.2",
    "uri": "ed2k://|server|85.121.5.137|4232|/",
    "ip": "85.121.5.137",
    "tcp_port": 4232,
    "udp_port": null,
    "obfuscated_port": null,
    "source_ids": [
      "emule-security-web"
    ],
    "source_updated_at": "2026-10-02T16:02:00Z",
    "observed_date": "2026-10-03",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "kind": "ed2k",
    "protocol": "ed2k"
  },
  {
    "endpoint_id": "ed_67ca89c53e638fafe3b9",
    "name": "eMule Cosmic",
    "uri": "ed2k://|server|212.95.35.240|4232|/",
    "ip": "212.95.35.240",
    "tcp_port": 4232,
    "udp_port": null,
    "obfuscated_port": null,
    "source_ids": [
      "emule-security-web"
    ],
    "source_updated_at": "2026-10-02T16:02:00Z",
    "observed_date": "2026-10-03",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "kind": "ed2k",
    "protocol": "ed2k"
  },
  {
    "endpoint_id": "ed_449439c90b437084b2b0",
    "name": "Mazinga Server",
    "uri": "ed2k://|server|213.141.198.207|4232|/",
    "ip": "213.141.198.207",
    "tcp_port": 4232,
    "udp_port": null,
    "obfuscated_port": null,
    "source_ids": [
      "emule-security-web"
    ],
    "source_updated_at": "2026-10-02T16:02:00Z",
    "observed_date": "2026-10-03",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "kind": "ed2k",
    "protocol": "ed2k"
  },
  {
    "endpoint_id": "ed_1d3c52855c846492aa58",
    "name": "MO-ad-free",
    "uri": "ed2k://|server|57.131.35.107|4232|/",
    "ip": "57.131.35.107",
    "tcp_port": 4232,
    "udp_port": null,
    "obfuscated_port": null,
    "source_ids": [
      "emule-security-web"
    ],
    "source_updated_at": "2026-10-02T16:02:00Z",
    "observed_date": "2026-10-03",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "kind": "ed2k",
    "protocol": "ed2k"
  },
  {
    "endpoint_id": "ed_29aae7e9d0f9c71fbe06",
    "name": "Drunken Donkey",
    "uri": "ed2k://|server|193.187.90.12|4661|/",
    "ip": "193.187.90.12",
    "tcp_port": 4661,
    "udp_port": null,
    "obfuscated_port": null,
    "source_ids": [
      "emule-security-web"
    ],
    "source_updated_at": "2026-10-02T16:02:00Z",
    "observed_date": "2026-10-03",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "kind": "ed2k",
    "protocol": "ed2k"
  },
  {
    "endpoint_id": "ed_a1debf19e9cc0aaa46c4",
    "name": "MO-24/7",
    "uri": "ed2k://|server|212.95.35.240|4323|/",
    "ip": "212.95.35.240",
    "tcp_port": 4323,
    "udp_port": null,
    "obfuscated_port": null,
    "source_ids": [
      "emule-security-web"
    ],
    "source_updated_at": "2026-10-02T16:02:00Z",
    "observed_date": "2026-10-03",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "kind": "ed2k",
    "protocol": "ed2k"
  },
  {
    "endpoint_id": "ed_2100cf95fa0d285e529e",
    "name": "Sharing-Devils No.3 TEST",
    "uri": "ed2k://|server|91.208.162.55|4235|/",
    "ip": "91.208.162.55",
    "tcp_port": 4235,
    "udp_port": null,
    "obfuscated_port": null,
    "source_ids": [
      "emule-security-web"
    ],
    "source_updated_at": "2026-10-02T16:02:00Z",
    "observed_date": "2026-10-03",
    "runtime_status": "unprobed",
    "risk_status": "unknown",
    "default_use": "eligible_for_validation",
    "kind": "ed2k",
    "protocol": "ed2k"
  }
]

今回の納品と検証の範囲

63 件のオフライン参考テスト、9 組の文書/契約検査、43 項目の Chromium コンテンツ検査が合格。直接の file:// 遷移は環境ポリシーに阻止されたため、同じ HTML 内容を読み込んでテストした。6 枚の図とデスクトップ/狭いウィンドウを確認した。SQLite 3.46.1 はメモリ上の schema 検査だけに使い、本番 WAL バージョンと製品受け入れ検証は未合格。

標準 qBittorrent の精密管理 bridge、HTTPS server.met の raw binary テスト、実 P2P、ファイル操作には引き続き独立した受け入れ条件がある。データ表、HTML、オフライン参考モデルの検査合格は、本番 Engine や全ソースの安全性が検証済みであることを意味しない。

契約、設定、開発引き継ぎの原文

以下は同梱版の Markdown/JSON/SQL/TOML の原文であり、別の要約は作らない。正式実装には ZIP の対応ファイルを使う。出典 URL は明示的にクリックした時だけ開く。

README.md
# P2P Downloader v2.3 設計引き継ぎパッケージ

本パッケージは今回の「継続的探索+可変ダウンロードプール+接続分析/制御+既定ソース管理」の設計を完了したものである。P2P 完成品、インストーラー、検証済み安全サーバーリストではない。

## 読む順序

まず `SPEC.md` 01–05 の概要、次に 08–14 の動的プールと接続管理を読み、続いてソースの 15–17、データ/インターフェースの 18–21 を読む。実行前に `DECISIONS.md`、`TASKS.md`、`ACCEPTANCE.md`、`IMPLEMENTATION_PROMPT.md` を読む。`index.html` はオフライン図解審査版。

Markdown/contracts/config が正本で、HTML はそれと同期する。今回は v2.2 の固定スロットと弱められた接続管理を置き換える。React、分割 Config、Search tabs、SQLite、Component.Downloader/Engine、集中 Metrics、段階的なストレージ、hash バケット分割、安全なファイルライフサイクルは変更しない。

## 作業開始と検査

本パッケージのルートで Python 3.11+ を使って実行:

```sh
python -m unittest discover -s reference -p 'test_*.py' -v
python tools/validate_package.py
```

2 番目の JSON Schema 検証には `jsonschema` が必要。不在なら明示的に blocked とし、黙ってインストールしない。本パッケージは Rust/React repository ではないため、存在しない cargo/pnpm build は実行しない。製品実装では対象 owner の既存ロックファイル、ツール、品質コマンドを使う。

実装 repository の `docs/specs/p2p-v2.3/` に置く際は、既存 root/nested AGENTS.md、CLAUDE.md を先に保持し、本パッケージで直接上書きしない。`CLAUDE.md` は `@AGENTS.md` で規則を共有する。現行公式文書は相対 import に対応するが、今回は Claude Code を起動してネイティブ読み込みを検証していない。実装 agent はバージョンと実際の読み込み規則を照合し、重複読み込みや上位規則の上書きを避ける。

## 出典と制約

122 個の tracker/12 個の現行 eD2k 候補を内蔵し、2 つの tracker 原文 text の Git blob hash を照合済み。全 endpoint で DNS、ハンドシェイク、announce、ダウンロードのテストは未実施。HTTPS server.met の binary は未取得で feed を明示的に無効化し、ページ由来の候補スナップショットを用意した。詳細は `catalog/source-manifest.json`、`SOURCES.md` を参照。

標準 qBittorrent の細粒度接続制御を完成済みと偽ってはならない。T08 を参照。完全な管理能力は Engine bridge と実ネットワークテスト待ち。`VALIDATION.md` は仕様の完全性、文書テスト、ZIP の有効性、製品受け入れ検証を分けている。
TASKS.md
# 実装タスクと依存関係

各 T タスクは実際の owner code、tests、入力/出力 fixture、操作証拠、文書を納品する。下表は順序であり完了済み一覧ではない。出典は SPEC の同名節と requirements.json。

| ID | タスク | 依存 | owner | 納品物 | 要件 | 受け入れ |
|---|---|---|---|---|---|---|
| T01 | データ契約と SQLite の追加型移行 | なし | Store/domain | schema 検証、単一 writer、connection lifecycle/policy evidence、outbox を実装。v2.2 バックアップのコピーで migration し、DB fingerprint を照合。 | R17 | A33,A34 |
| T02 | 全体探索とプローブ後の保持 | T01 | Search/Downloader | 1,000 target が同時 eligible。問い合わせ統合、非同期報告、全バッチ barrier なし。probe 終了時に expiry/coverage を保存し、一時 transport を解放。 | R01,R02 | A01,A02,A03,A04 |
| T03 | 適応的な接続負荷管理 | T02 | Connection Manager/Engine | FD/RAM/event loop の余力、ソース token budget、retry floor、dial deadline を実装し、task-count の固定上限を設けない。 | R03 | A05,A06 |
| T04 | 照合可能な試行状態機械 | T03 | Scheduler/Downloader | 資格条件下のサービス時間、有用 bytes、安定ウィンドウ、検証の延期。小ファイルの試行中完了とリモート ticket を支援。 | R04 | A07,A08 |
| T05 | 可変 pool と継続的な入れ替え | T04 | Scheduler | CapacityController/PoolSupervisor/FairRotator。容量不明時は探索、飽和時は hold、ディスク負荷時は drain、低い限界利益は置換。settling/rollback/debt を実装。 | R05,R06 | A09,A10,A11,A12 |
| T06 | 接続単位の報告と registry | T01 | Component Connection Agent | run+connection ID、物理 transport の関係、役割、サービス資格、nullable な native detail。ResourceReport は直接送り、hot loop で Metrics DB を読まない。 | R07 | A13,A14 |
| T07 | 証拠に基づく異常ルールと撤回可能なポリシー | T06 | Connection Manager | qualified idle、分母の除外、破損データの帰属、一時 avoid、quarantine、手動 deny、期限時の一度限りの再審査。国/peer ID による判断と honeypot 保証を禁止。 | R08,R09,R10 | A15,A16,A17,A18,A19,A20 |
| T08 | 精密制御と qBittorrent の能力橋渡し | T07 | Engine/adapter | コマンド outbox、run fencing、撤回の照合。REMULE は精密制御を実装。qBittorrent は先に capability probe を行い、必要なら制御された bridge/patch を提供。精密 disconnect を banIP で代用しない。 | R11,R12 | A21,A22,A23,A24 |
| T09 | ソースカタログ、解析、注入ポリシー | T02,T07 | Config/Component CatalogFetcher | snapshot 122/12、realm/機微な port/private の規則を導入。TLS、DNS pinning、redirect、bounds、parser fault tests。server.met 取得までは該当 feed を無効のままにする。 | R13,R14,R15 | A25,A26,A27,A28,A29,A30 |
| T10 | Config 公開とソース更新トランザクション | T09 | Config/Store | 候補→検証→revision。ConfigReader は読み取り専用。last-good、diff quarantine、手動 pin/deny を実装し、重複ソースを新しい観測利益として数えない。 | R16 | A31,A32 |
| T11 | 入れ替え、移動、清掃の相互排他 | T05,T01 | Downloader/FileLifecycle | ネイティブ resume、バケット分割、増分計上を維持。移動時の crash recovery、active writer の purge 防止、observing で死んだファイルへ移動しないことを検証。 | R18 | A35,A36 |
| T12 | React pool/接続/ソースのワークベンチ | T05,T08,T10 | Web View | 実際の routes/tabs、完全な詳細フィールド、unsupported/unknown 状態、scope 付き切断確認、ソース diff。selection/focus/input を保持。 | R19 | A37,A38 |
| T13 | 障害マトリクス、比較実験、ロールバック | T11,T12 | 統合 | build を固定した許可済みテストネットワークで v2.2/v2.3 の goodput、churn、負荷を比較。実際の code/tests/docs、出典と未検証項目を同期。push やデプロイはしない。 | R20 | A39,A40 |

T08 の精密管理、T09 の binary feed、T13 の実ネットワーク証拠には明確な能力条件がある。能力不足時は検証可能な部分だけを完了し、元の要件は BLOCKED のまま残す。合格にするため受け入れ条件を書き換えない。
ACCEPTANCE.md
# 製品受け入れ検証(今回の実行結果ではない)

全ケースは初期状態 `NOT_RUN`。A24 の全精度 qBittorrent、A28 の MET feed 実証、A39 の実ネットワークは能力/環境不足時に `BLOCKED` とする。各項目に build/host/コマンド/開始終了/入力/出力を添え、実出力なしに passed と記入しない。reference テストが検証するのはオフライン規則の一部分岐だけ。

| ID | テスト入力/状況 | 観測可能な合格条件 | 必須の失敗/反例検証 |
|---|---|---|---|
| A01 | 1,000 件の異なる有効対象を一括取り込み | 全件に task_id があり同時 eligible。payload file/1,000 Engine なし | 形式不正の 100 件だけを拒否 |
| A02 | 900 件目が先にソースを返し、先の 899 件は未応答 | バッチ全体を待たず直ちに順位付け/試行を許可 | 1 ソースの timeout が同バッチを妨げない |
| A03 | task-local metadata probe が完了 | snapshot に expiry/sequence があり socket 解放済み | コマンド結果不明時に解放済みとしない |
| A04 | 共有 eD2k server/有効なリモート queue | 共有 session またはサービス可能 ticket を保持し、リソースを別計上 | 未許可 autostart で observer をゼロコスト扱いしない |
| A05 | ホストが多数の短い probe に耐えられる | ウィンドウが旧固定 cap を超え、実際の余力に応じて変化 | FD 予約分の枯渇で新規 dial を停止 |
| A06 | ソース retry-after/protocol interval が有効 | 期限まで待ち、fairness で早期再試行しない | 大量ソースの timeout で同期 retry storm を起こさない |
| A07 | 高速・安定で unique bytes のある trial | 資格条件を満たすウィンドウ後に active へ昇格 | ハンドシェイク/keepalive だけでは昇格しない |
| A08 | 小ファイルが trial 中に完了、または verification unit が大きい | 小ファイルは直接検証。大単位は制御されたウィンドウを延長/inconclusive | 単位未取得で hash failure を報告しない |
| A09 | 5 ジョブが既知帯域の 50% を使用、I/O 正常 | 自動で試行追加。固定 5 スロットを維持しない | 容量不明でも上限付き学習可能。偽の NIC 容量を埋めない |
| A10 | ディスク backlog が pressure≥1 まで上昇 | drain/拡大停止。遅い volume で他 volume まで停止しない | ソースに strike を追加しない |
| A11 | 追加 workload が 2 ウィンドウで限界利益なし | settle 後に拡大を戻すか少量 challenger replacement | 毎秒全 pool を再起動しない |
| A12 | 安定した高速ファイルと低速の希少ソースが競合 | 待機不足分と rescue 予算がサービスを得られる | 末尾欠損の高い完了率が永久優先にならない |
| A13 | 同 IP で再接続/プロセス再起動/multiplex | 新 connection/run ID、物理 FD を重複加算しない | 旧 ID の遅着報告で新 session を上書きしない |
| A14 | 国不明、overlay、missing peer map | nullable+reason を正しく表示 | 0 値で測定済みのふりをしない |
| A15 | サービス付与済み+実 request+期限到来で有用 bytes 0 | 精密切断、content-source avoid を提案し証拠を永続化 | keepalive で qualified clock をリセットしない |
| A16 | choked/queue/ローカル disk block/request なし | ソース strike を増やさず原因別に待機か解放 | テレメトリー喪失を速度 0 としない |
| A17 | 同じ evidence の再生と独立した再発 | 再生は冪等。再発は cap まで TTL 延長 | 別ファイルを自動的に連座ブロックしない |
| A18 | avoid 期限到来、検証成功/失敗 | half-open 再審査を 1 回だけ許可。成功で減衰、失敗でバックオフ | UI 解除は Engine ポリシーと照合 |
| A19 | 複数 peer が 1 つの破損 piece を提供 | まず帰属不明と示し隔離テスト | 全員の永久 ban は不可 |
| A20 | 国/ASN/peer ID/正常転送の手掛かりだけ | 悪意を自動判定せず surveillance intent unknown | フィッシング外部ログインリンクを自動表示/実行しない |
| A21 | 同 request ID で異なる body、旧 run コマンド | 409 または stale_target。新接続を保持 | 黙って新 request を作って再送しない |
| A22 | 閉じるコマンド後に ack 喪失/crash | unknown→読み取り専用の照合。計上を早期にゼロにしない | 成功状態を表示しない |
| A23 | 標準 qBittorrent は IP ban 能力のみ | 精密 disconnect は unsupported_scope を表示し banIP を呼ばない | 同 IP への副作用で単一接続テストを満たしたとしない |
| A24 | 細粒度 bridge を持つ固定 qBittorrent build を導入 | 同 IP の異なる 2 connection から指定した 1 つだけを切断し、avoid を撤回可能 | 必要 bridge がなければ BLOCKED |
| A25 | 同梱ソース snapshots を再生 | 75 と 122 の統合で 122 URI。現行 eD2k 12 件の UDP port は不明のまま | mirror を独立した安全性の裏付けにしない |
| A26 | WSS、UDP25、DNS alias、private realm 候補 | capability/manual review/realm で振り分け | unsupported プロトコルに通常 socket を密かに作らない |
| A27 | TLS 失敗、異なる origin への redirect、private/mapped DNS | 拒否して対象に接触せず last-good を保持 | DNS check 後のアドレス変更で connect pinning を回避できない |
| A28 | MET count overflow、gzip 爆弾、巨大 list | bounded parser が拒否し、大量割り当て/実行なし | 今回 MET fixture 未取得なら live parser pass としない |
| A29 | private=1 または metadata privacy unknown | 公共 default を注入せず追加の hash announce もしない | 先に公開して metadata の訂正を待たない |
| A30 | I2P-only のユーザー意図 | 該当 realm 内だけでソース取得と接続 | ソースがないから公共 tracker に戻らない |
| A31 | feed の大きな異常、更新中断、crash | candidate staging、diff quarantine、前の有効 snapshot を維持 | 生リストで Config を上書きできない |
| A32 | ユーザー pin/deny と feed による同 endpoint 再追加 | 手動ポリシーを保持し、公開バージョンを追跡可能 | リストの再取得でブロックを消さない |
| A33 | SQLite 追加型 schema と同時読み書き | transaction、外部キー、dedup、outbox が整合。WAL 修正済みバージョンを含む | 不明 baseline は migration 拒否 |
| A34 | Metrics 断絶/Store 書き込み不可/report drops | Metrics 障害でも正常転送は継続。Store 障害は新規派遣を停止 | 欠落を 0 補完せず無制限 disk spool も禁止 |
| A35 | 観察と pool 入れ替えを反復 | partial 保持、hash バケット不変、全ファイル再割り当てなし | observing で死んだファイルへ移動しない |
| A36 | device 間移動/ディスク満杯/purge と writer の競合 | 復旧可能な journal。writer 不在かつポリシー適合時のみ purge | 有効 checkpoint/pin データを削除しない |
| A37 | 実 React 成果物で pool/connection/source を確認 | sources tabs と完全な詳細、unsupported と unknown が正しい | 合成 UI で live 正常性を主張しない |
| A38 | キーボード、1280/1440/1920、低い高さ、実際の 200% ズーム | 操作可能で focus/input/selection 保持。各証拠を明記 | DPR や 390 viewport を browser zoom としない |
| A39 | 固定環境で比較負荷と fault injection | goodput/コスト/churn を実測し全不足を明記 | モデル合格を実ネットワーク合格に格上げしない |
| A40 | Config/DB/Engine build のロールバック | writer 停止、バックアップ復元、partial への同時書き込みなし。AGENTS 保持 | 未許可 commit/push/deploy を実行しない |
DECISIONS.md
# 決定記録

| ID | 決定 | 理由/コスト |
|---|---|---|
| D01 | Connection Manager を第 9 の論理コンポーネントとして追加推奨 | 接続ポリシーは独立状態と実行整合性を持ち、受動的 Metrics の担当にはできない。独立プロセスは不要。 |
| D02 | 全 target が同時探索可能で transport ウィンドウは auto | 全面的な情報収集を実現し、ホストのバックプレッシャーと相手への配慮を維持。無制限 socket ではない。 |
| D03 | probe、trial、active、observation を分離 | 高コストの転送リソースが情報収集を妨げず、ゼロ速度をすべて失敗にまとめない。 |
| D04 | 動的 pool+限界利益による入れ替え | 固定ダウンロード数に依存しない。controller には settling/rollback と継続測定が必要。 |
| D05 | サービス資格の時計で snub を判定 | choke/queue/ディスク混雑による誤ブロックを防ぐ。Engine は細かいフィールドを提供する必要がある。 |
| D06 | 狭い scope の temporary avoid。自動永久 IP ban はしない | NAT、再接続、異なるコンテンツ、不明な識別情報は連座誤ブロックを招きやすい。 |
| D07 | honeypot 識別を保証しない | 規約どおりのサービスでも記録可能。観測可能な証拠に対して理由ある操作だけを行う。 |
| D08 | 標準 qBittorrent の能力不足を明示 | IP-ban では単一接続 disconnect を実装できない。全精度には bridge の受け入れ検証が必要。 |
| D09 | candidate を掲載し、リストを safe と主張しない | スループット利益、TLS、provenance、運営者の意図は異なる証拠。 |
| D10 | Private/unknown/I2P の領域を分離 | 探索範囲の広さのためにソースのプライバシー意味を犠牲にしない。 |
| D11 | Store SQLite に判断証拠、Metrics に時系列を保存 | コアの復旧可能性と高頻度監視を分離。新しい DB server は追加しない。 |
| D12 | プローブ後の解放の例外として共有 session/ticket を保持 | eD2k/Hub の常駐ソースを task-local probe と一緒に閉じない。 |
| D13 | 全設定を Config の分割ファイルに集約 | ハードコードしたリスト/port を Engine に入れず、wire の固定定数を調整可能 policy と偽装しない。 |
| D14 | 今回は v2.3 を正本とし v2.2 の保存意味を維持 | VPN とログインの範囲を再度広げない。旧固定 slot パラメータは auto モードから除外する。 |

ソース endpoint の実ネットワークプローブは未実施。default への追加は候補を検証できるという意味で、安全性/完了率の保証ではない。任意の全ソースへの即時接続、どのホストも過負荷にならないこと、リモートへの無制限リクエストを同時には保証できない。本稿は Task 固定上限なし+リソース適応によって実装可能な要件を満たす。
AGENTS.md
# P2P Downloader v2.3 実装規則

ユーザーの直接許可と既存 repository の root/nested 規則を優先する。本パッケージはそれらを上書きせず、外部変更も許可しない。

## 元に戻してはいけない事項

SPEC.md と contracts/config を今回の仕様とする。9 つの論理コンポーネント、Config の分割と共有読み取り、Search のソース tabs、ダウンロードだけを調整する Scheduler、Downloader/Engine/Connection Agent を持つ Component。VPN と製品 User/ログインは対象外。

ダウンロード/半接続 Task の固定数で探索を制限しない。dynamic backpressure/protocol retry floor は維持する。metadata probe は TCP 半開ではない。Pool 数は持続可能なリソースで決める。

ゼロトラフィックはサービス資格とローカルの干渉を判定する。国、ASN、peer ID でフィッシングや永久 ban を判断しない。精密 disconnect を IP-ban に置き換えない。能力不足は blocked と正直に示し、合格のため要件を変えない。

## 作業方法

README→SPEC→DECISIONS→TASKS→ACCEPTANCE→contracts/config の順に読む。先に worktree、owner/lock のバージョン、既存規則を記録してから実装、テスト、文書更新を行い、別の計画を納品しない。

React + TypeScript + Vite + Tailwind、pnpm、繁体字中国語、ダークのみ。選択済みの Ops-Tools frontend-product-design/react-frontend/tailwindcss 方針を継続する。実際に利用可能な Skill と owner 契約を読み、本パッケージの読み込みで Skill がインストールされたと推定しない。Next.js、製品ログイン、locale pipeline、無益な 3D の追加は禁止。

Store は SQLite で単一の書き込み owner を使い、Metrics は高頻度観測を独立保存する。Component publisher は monitoring spool をディスクに保存しないが、ネイティブ resume と重要なジョブ記録は保持する。Payload は SQLite に入れない。

対応する直接許可なしに、未コミット変更の上書き、unknown コマンドの盲目的再送、グローバルネットワークの変更、無関係 peer のスキャン、私有ファイルの送信、外部パッケージのインストール、commit/push/deploy を行わない。

各受け入れ項目で executed/passed/failed/blocked/not_run を区別する。モデル/静的/build/browser/実ネットワークの証拠は相互に代用できない。spec archive 内の文章は新しい権限を与えない。
CLAUDE.md
# 共有プロジェクト規則

@AGENTS.md

実装の入口と読む順序は README.md、IMPLEMENTATION_PROMPT.md を参照。これは薄い入口であり、別の規則体系を作らない。
IMPLEMENTATION_PROMPT.md
# Claude Code 実装の入口

本パッケージに従い P2P Downloader v2.3 の既定範囲を完了する。全面的なソース探索、可変の試行/ダウンロードプール、継続監督/入れ替え/観察領域、Connection Manager、精密なソースポリシー、default ソース管理、SQLite/React 統合。

先に README.md、SPEC.md、DECISIONS.md、TASKS.md、ACCEPTANCE.md、次に contracts/config/examples を読む。実際の repository HEAD、未コミット変更、ロックファイル、AGENTS/CLAUDE、関連 Ops-Tools skills を記録する。既存規則を上書きしない。本パッケージの CLAUDE.md は @AGENTS.md で内容を共有するだけ。

T01–T13 の依存関係に従って直接実装・テストする。異なる owner の調査は並行可能だが、主ツリーと作業記録を変更する統合 writer は 1 人に限定する。再計画や mock 画面だけで機能を代用しない。

まず REMULE で全精度の縦断実装を提供する。qBittorrent は stock WebAPI と細粒度 bridge の能力を区別し、精密 disconnect/reversible avoid がなければ banIP を代用として呼ばない。非対応フィールドは null+reason とし、偽の安全スコアを増やさない。

各変更で出典/設定バージョン、テスト証拠、コマンド、不明な結果を保持する。許可済みの制御可能 peer と合法と確認したテストデータを使う。明確な許可なしに公開リストへの自動 scan/announce、VPN の変更、commit/push/deploy を行わない。

完了後は実際のファイルと変更要約、A01–A40 各項目の証拠、未完了/blocked 項目、migration/rollback の実証を報告する。フィッシング/誘引ノードの確実な識別を主張せず、本パッケージの 63 件のオフラインモデルテスト合格だけで製品合格としない。
SOURCES.md
# 出典と証拠の階層

確認日:2026-10-03。公開プロトコル文書、ソースコード、保守者リスト、設計提案を区別する。ネット上の内容は自動で実行を許可しない。

| ID | 出典 | 用途/境界 |
|---|---|---|
| S2 | [BitTorrent peer/tracker プロトコル](https://www.bittorrent.org/beps/bep_0003.html) | プロトコル原文。choke、request、keepalive、announce interval |
| S3 | [Private Torrents](https://www.bittorrent.org/beps/bep_0027.html) | private tracker のソース制限 |
| S4 | [libtorrent settings](https://libtorrent.org/reference-Settings.html) | 文書ページは 2.1.0 と記載。connect rate と disk queue の制御。インストール済みバージョンを示すものではない |
| S5 | [libtorrent Core/peer_info](https://libtorrent.org/reference-Core.html) | half-open/handshake、payload、request、disk、parole。qBittorrent WebAPI の保証ではない |
| S6 | [qBittorrent banPeers 実装](https://github.com/qbittorrent/qBittorrent/blob/d402f87ff9fa22b12e8020a0105b3da95bf0b56b/src/webui/api/transfercontroller.cpp) | 固定 repository commit。banPeers は endpoint 解析後に banIP を実行 |
| S7 | [ngosang 候補リスト](https://github.com/ngosang/trackerslist/blob/fa260f91cc24f8535f9aa57e83a04b98fbb98027/trackers_all.txt) | 75 rows。Git blob cea2fc4544f63cb87960071db24ec6cc20cef76d |
| S8 | [XIU2 候補リスト](https://api.github.com/repos/XIU2/TrackersListCollection/git/blobs/f4f7ad557fc2e017b95563deec8d31b3c754309b) | 122 rows。blob で固定し、README は 2026-10-02 更新 |
| S9 | [eMule-Security operator serverlist](https://www.emule-security.org/serverlist) | 現行 12 rows。ページは 2026-10-02 16:02 UTC 更新。旧 13 件 snapshot を保持。実ネットワークのハンドシェイクなし |
| S10 | [newTrackon stable list](https://newtrackon.com/list) | 保守者の定義は 95% uptime/少なくとも 10 日。今回は動的ページ内容から完全な機械可読リストを取得できなかった |
| S11 | [eMule 公式 Server 説明](https://www.emule-project.com/home/perl/help.cgi?l=1&rm=show_topic&topic_id=130) | 2005-11-20 の歴史文書。プロトコルの役割説明にのみ用い、過去の IP を新 defaults にしない |
| S12 | [OWASP SSRF 防御](https://cheatsheetseries.owasp.org/cheatsheets/Server_Side_Request_Forgery_Prevention_Cheat_Sheet.html) | URL/DNS/redirect の実際の境界 |
| S13 | [SQLite WAL](https://www.sqlite.org/wal.html) | WAL-reset 修正 3.51.3 と記載済み backports。今回は production 版の受け入れ検証未完了 |
| S14 | [Linux PSI](https://docs.kernel.org/accounting/psi.html) | CPU/memory/I/O stall 指標であり、Internet 速度測定ではない |
| S15 | [UDP tracker protocol](https://www.bittorrent.org/beps/bep_0015.html) | connect/announce/scrape と transaction の境界 |
| S16 | [Claude Code memory/imports](https://code.claude.com/docs/en/memory) | 相対 @import 対応。今回は native Claude を起動して読み込みを検証していない |
| S17 | [Ops-Tools 設計方針(継続)](https://github.com/DennySORA/Ops-Tools/blob/97269a8cc6db5ed8e87e8920fa4c90980f1d09bb/resources/skills/frontend-product-design/SKILL.md) | 前回読んだ固定設計契約を継続。今回は再インストールしておらず、最新版とも主張しない |

| S18 | [eMule Network Guide](https://www.emule-project.com/home/perl/help.cgi?l=1&rm=show_topic&topic_id=232) | 公式の歴史的プロトコル説明。High/Low ID は到達性であり、信頼度/速度の等級ではない |

## 元ファイルと出典スナップショット

sources/ngosang-all.txt と sources/xiu2-all.txt は今回 GitHub connector から内容を取得し、元の bytes を再構成して Git blob SHA-1 を照合した。ローカル SHA-256 も提供するが、blob digest を保守者署名と偽ってはいない。catalog/source-manifest.json に全件数、hash、読み取り制約を記録する。生リストには重複する運営者/alias が含まれ得る。出典と各ライセンス要件を保持し、再配布時には関連告知を維持する。本パッケージは第三者 Engine のソースコードを導入せず、再ライセンスもしない。

server.met binary は今回未取得。operator の HTTPS ページ由来の現行 12 候補があるが、安全/オンラインとは主張しない。コンテナの外部直接ダウンロードは制限されており、GitHub connector や web の読み取り成功はコンテナの production ネットワーク権限を意味しない。newTrackon の機械向け endpoint は未確認のため API を捏造しない。

## 既存設計

ユーザー提供の P2P_Downloader_Core_Architecture_v2_2.zh-TW.html と v2.2 ZIP に基づき比較した。本パッケージは現在の remule/Ops-Tools/vpn-manager 作業ツリーを走査した実装 patch ではない。VPN/User システムの新要件はなく、それらの範囲を再拡大しない。
VALIDATION.md
# v2.3 の実際の検証と納品範囲

日付:2026-10-03。検証対象は文書、ソーススナップショット、参考モデル、HTML であり、開発済み P2P 製品ではない。

## 状態を分けて記録

| 項目 | 結果 | 範囲 |
|---|---|---|
| 今回の設計文書 | COMPLETE | 25 章、9 個の論理コンポーネント、ソース/動的プール/接続管理契約。20 要件 → 13 タスク → 40 製品受け入れケース。 |
| Python オフライン参考モデル | passed | 63 unittest。判断、帰属資格、回避 TTL、scope、URL/圧縮の境界。完全な Engine ではない。 |
| 文書/契約照合 | passed | ZIP 以外の 9 検査群:必須ファイル、JSON/TOML、追跡性、Schema/負例、refs、出典、SQL、HTML、SVG。manifest は最終包装後に別途照合。 |
| HTML ブラウザー内容検査 | passed | Chromium 144.0.7559.96、43 項目。同じ HTML 内容を正確に読み込み、ソース絞り込み、動的プール条件、10 接続状況、メモの出力、キーボード、レイアウト、SVG 境界を確認。 |
| 直接 file:// 遷移 | blocked | Chromium ポリシーが `ERR_BLOCKED_BY_ADMINISTRATOR` を返し、ポリシーは無効化しなかった。制御された文書内容テストを代用し、実機 file:// 成功とは主張しない。 |
| プロトタイプ視覚確認 | reviewed | デスクトップ/狭いページ、操作領域、6 枚の SVG スクリーンショットを実際に開いて確認。観察から Active へ直接飛ぶ誤解を招く矢印と held を横切る戻り線を修正。主観的な美観スコアはない。 |
| ZIP/manifest | 包装後に検証 | 納品ルート外の validation JSON に SHA-256/CRC/manifest 照合を含む。循環を避けるため manifest は自身の digest を含めない。 |
| 製品実装/受け入れ | NOT_RUN | 40 ケースは開発要件であり合格結果ではない。Rust、React build、P2P、announce、DNS プローブ、ファイル移動/削除は未実行。 |

## 実行環境と再実行可能なコマンド

Python 3.13.5、SQLite(Python linked)3.46.1、Chromium 144.0.7559.96。パッケージのルートから実行:

```sh
PYTHONDONTWRITEBYTECODE=1 python -m unittest discover -s reference -p 'test_*.py' -v
PYTHONDONTWRITEBYTECODE=1 python tools/validate_package.py
```

2 番目のコマンドには `jsonschema` が必要。不在なら失敗/依存不足を明示し、自動インストールしない。`tools/validate_browser.py` は既存の Playwright と Chromium を必要とし、本パッケージの HTML だけを使ってユーザーのブラウザー profile やシステムサービスには触れない。再実行の出力は validation 証拠ファイルを変更するため、manifest は元パッケージからの変更を正しく反映し、元の hash を流用してはならない。

SQLite はメモリデータベースだけを作成し、21 個の base 表と 12 個の追加表、計 33 表を適用した。FK、重複 active claim、不正 phase、integrity_check を検査した。**3.46.1 は本番導入に必要な WAL 修正基準を満たさず、これは production WAL テストではない。** 本番環境には修正済み SQLite と checkpoint/crash/migration の受け入れ検証が引き続き必要。

## 出典確認

2 つの tracker 元 text は Git blob SHA-1 とローカル SHA-256 に一致し、75/122 の統合で 122 URI となる。eD2k の初回ページは 13 件、新しい 2026-10-02 16:02 UTC のページは 12 件で、完全な差分を保持した。確認したのは公開出典と静的形式のみで、endpoint の DNS、ハンドシェイク、オンラインサービス、運営者の意図は未検証。「掲載済み」を「安全」に変えてはならない。

## 明示的な未検証事項/依存条件

標準 qBittorrent の IP 全体 ban を接続単位の切断と偽ってはならない。完全モードは Engine bridge と対応する実測が必要。HTTPS server.met の raw binary は未取得で、自動 feed は無効のまま。ツール失敗は URL のオフラインを証明しない。mock でソースの正常性を補って主張しない。

未実施:実際の 200% ブラウザー zoom、スクリーンリーダー、実際の React/Vite production build、ネイティブ client の AGENTS/CLAUDE 読み込み、長期制御安定性、実ネットワークスループット、信頼できる帰属、誤ブロック防止、native pause/ban 撤回、実ファイル操作。狭い viewport、DPR、CSS zoom は実際の browser zoom の代わりにはならない。

## 証拠の場所

`validation/reference-tests.txt`、`validation/static-checks.json`、`validation/browser-checks.json`、`validation/document-source.json`、`validation/*.png`。ブラウザー照合の SHA は browser-checks に記録する。最終閲覧ページには同じ検証記述のみを埋め込み、包装前に内容検査を再実行する。元ソースファイルは sources/ にあり、追加ツールのインストール、GitHub 書き込み、外部サービス変更はない。
requirements.json
[
  {
    "id": "R01",
    "requirement": "全有効対象を固定ダウンロードスロットに制限されず同時に探索登録できる",
    "task": "T02",
    "acceptance": [
      "A01",
      "A02"
    ]
  },
  {
    "id": "R02",
    "requirement": "短時間 probe は証拠を保持して閉じられ、共有 session や queue ticket を壊さない",
    "task": "T02",
    "acceptance": [
      "A03",
      "A04"
    ]
  },
  {
    "id": "R03",
    "requirement": "半接続ウィンドウと接続レートをホスト負荷に応じて自動調整する",
    "task": "T03",
    "acceptance": [
      "A05",
      "A06"
    ]
  },
  {
    "id": "R04",
    "requirement": "試行は資格条件下のサービス時間、unique bytes、安定性で昇格する",
    "task": "T04",
    "acceptance": [
      "A07",
      "A08"
    ]
  },
  {
    "id": "R05",
    "requirement": "ダウンロード pool は Task 固定数ではなく I/O/ネットワークの余力で伸縮する",
    "task": "T05",
    "acceptance": [
      "A09",
      "A10"
    ]
  },
  {
    "id": "R06",
    "requirement": "継続監督、限界利益による入れ替え、不足分と希少ピースへのサービス",
    "task": "T05",
    "acceptance": [
      "A11",
      "A12"
    ]
  },
  {
    "id": "R07",
    "requirement": "独立した接続識別情報、役割、task 関係、ネイティブ状態",
    "task": "T06",
    "acceptance": [
      "A13",
      "A14"
    ]
  },
  {
    "id": "R08",
    "requirement": "資格条件下の無応答だけで切断/回避し、待ち行列とローカル阻害を除外",
    "task": "T07",
    "acceptance": [
      "A15",
      "A16"
    ]
  },
  {
    "id": "R09",
    "requirement": "一時回避、隔離、手動ブロック、期限到来時の再審査を分離",
    "task": "T07",
    "acceptance": [
      "A17",
      "A18"
    ]
  },
  {
    "id": "R10",
    "requirement": "データ破損は帰属可能でなければならず、国や ID でフィッシングと非難しない",
    "task": "T07",
    "acceptance": [
      "A19",
      "A20"
    ]
  },
  {
    "id": "R11",
    "requirement": "狭い範囲のコマンド、idempotency、run fencing、不明な結果の照合",
    "task": "T08",
    "acceptance": [
      "A21",
      "A22"
    ]
  },
  {
    "id": "R12",
    "requirement": "標準 qBittorrent の能力不足時に IP 全体 ban へ密かに置き換えない",
    "task": "T08",
    "acceptance": [
      "A23",
      "A24"
    ]
  },
  {
    "id": "R13",
    "requirement": "既定候補は出典、重複排除、scheme/realm 分類を持つ",
    "task": "T09",
    "acceptance": [
      "A25",
      "A26"
    ]
  },
  {
    "id": "R14",
    "requirement": "ソースの安全な取得/解析/DNS pinning/機微な port の制限",
    "task": "T09",
    "acceptance": [
      "A27",
      "A28"
    ]
  },
  {
    "id": "R15",
    "requirement": "private torrent/プライバシー不明/I2P に公共 defaults を注入しない",
    "task": "T09",
    "acceptance": [
      "A29",
      "A30"
    ]
  },
  {
    "id": "R16",
    "requirement": "Config ファイル分割、バージョン公開、last-good、手動ポリシー優先",
    "task": "T10",
    "acceptance": [
      "A31",
      "A32"
    ]
  },
  {
    "id": "R17",
    "requirement": "SQLite にコア facts と判断証拠、Metrics に時系列を保存",
    "task": "T01",
    "acceptance": [
      "A33",
      "A34"
    ]
  },
  {
    "id": "R18",
    "requirement": "段階的な書き込み、バケット分割、完了時移動、死んだファイルの清掃を入れ替えで壊さない",
    "task": "T11",
    "acceptance": [
      "A35",
      "A36"
    ]
  },
  {
    "id": "R19",
    "requirement": "React ソース tabs、接続/pool の完全な詳細、実態に即した操作状態",
    "task": "T12",
    "acceptance": [
      "A37",
      "A38"
    ]
  },
  {
    "id": "R20",
    "requirement": "透明な証拠、互換性、ロールバック、許可範囲内のデプロイ",
    "task": "T13",
    "acceptance": [
      "A39",
      "A40"
    ]
  }
]
config/connections.toml
schema_version = "2.3"
[analysis]
mode = "evidence_rules"
report_gap_is_zero = false
country_risk_weight = 0
peer_id_is_authenticated_identity = false
qualified_idle_deadline_floor_ms = 30000
qualified_idle_deadline_ceiling_ms = 300000
qualified_idle_rtt_multiplier = 8.0
request_retry_budget = 2
required_local_health_fresh_ms = 5000

[avoid]
default_scope = "realm_content_source"
first_ttl_ms = 60000
max_ttl_ms = 3600000
backoff_multiplier = 2.0
strike_decay_ms = 86400000
one_strike_per_evidence = true
half_open_retry_count = 1
# half_open_retry は circuit-breaker の一度限りの再審査であり、TCP SYN を半開のまま維持するものではない。

[quarantine]
default_scope = "realm_content_source"
confirmed_invalid_payload_ttl_ms = 86400000
malformed_protocol_ttl_ms = 3600000
automatic_permanent_ip_ban = false
automatic_subnet_ban = false
scope_widening_allowed = false

[retention]
connection_detail_days = 7
aggregated_days = 90
decision_evidence_days = 90
hold_evidence_while_policy_active = true
metric_publisher_disk_spool = false
store_high_frequency_peer_series = false
config/scheduler.toml
schema_version = "2.3"
[discovery]
# タスク/半接続数に固定上限はない。auto はホスト能力、ソース規則、現在の負荷から計算する。
task_admission = "all_valid"
connection_window = "auto"
attempt_rate = "adaptive"
snapshot_after_probe = true
release_probe_transport = "unless_shared_session_or_queue_ticket"
headroom_fraction = 0.65
max_source_candidates_per_task = 2048
report_freshness_ms = 5000
snapshot_ttl_ms = 300000
control_budget_fraction = 0.05

[pool]
active_tasks = "auto"
trial_population = "auto"
network_capacity = "learn_or_configure"
# capacity_bytes_per_second が未設定なら不明。NIC 速度から Internet 容量を自動断定しない。
target_utilization = 0.94
admit_below_utilization = 0.90
critical_pressure = 1.0
admit_below_pressure = 0.70
summary_interval_ms = 1000
control_interval_ms = 10000
settle_min_ms = 30000
healthy_windows_required = 2
increase_fraction = 0.25
decrease_fraction = 0.15
rotation_fraction = 0.05
rotation_min_residence_ms = 120000
replacement_advantage_fraction = 0.15
exploration_budget_fraction = 0.05
rescue_budget_fraction = 0.05
no_gain_windows = 2
# すべての fraction は設計の初期値であり、最適化済みや実測のスループットではない。

[trial]
min_qualified_ms = 15000
stable_windows_required = 3
window_ms = 5000
max_total_ms = 120000
initial_payload_bytes = 4194304
verification_extension_bytes = 33554432
useful_rate_threshold = "protocol_relative"
coefficient_of_variation_max = 0.75
# リモート待ち行列の時間はサービス取得済みの試行時間に含めない。検証単位が不足なら inconclusive。

[priority]
range_min = 0
range_max = 999
country_weight = 0
numeric_peer_id_weight = 0
old_success_is_prior_only = true
incomplete_rescue_enabled = true
preserve_remote_queue_value = true

[observation]
retry_base_ms = 60000
retry_max_ms = 21600000
jitter_fraction = 0.20
new_source_can_rescore = true
never_override_protocol_retry_floor = true
no_payload_is_not_dead = true
config/source-feeds.toml
schema_version = "2.3"
[policy]
bootstrap_trackers = "catalog/trackers.json"
bootstrap_ed2k = "catalog/ed2k-servers.json"
bootstrap_state = "candidate"
fetch_on_component_enable = true
fetch_interval_seconds = 86400
fetch_jitter_fraction = 0.20
fetch_https_only = true
allow_https_to_http_redirect = false
allow_cross_origin_redirect = false
max_input_bytes = 2097152
max_decoded_bytes = 8388608
max_entries_per_feed = 50000
max_url_bytes = 2048
max_redirects_same_origin = 2
new_endpoints_require_validation = true
private_torrents = "never_inject"
unknown_privacy_metadata = "no_global_announce"
peer_supplied_server_list = "candidate_only"
unknown_port = "null_not_guess"
# リモートソースは Config の有効バージョンに直接書き込めない。

[[feeds]]
id = "ngosang-all"
kind = "tracker_lines"
url = "https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all.txt"
lineage_group = "public-tracker-aggregators"
enabled = true
initial_snapshot_git_blob = "cea2fc4544f63cb87960071db24ec6cc20cef76d"
new_hosts = "quarantine_then_validate"

[[feeds]]
id = "xiu2-all"
kind = "tracker_lines"
url = "https://raw.githubusercontent.com/XIU2/TrackersListCollection/master/all.txt"
lineage_group = "public-tracker-aggregators"
enabled = true
initial_snapshot_git_blob = "f4f7ad557fc2e017b95563deec8d31b3c754309b"
new_hosts = "quarantine_then_validate"

[[feeds]]
id = "emule-security-met"
kind = "server_met"
url = "https://upd.emule-security.org/server.met"
lineage_group = "emule-security"
enabled = false
reason = "今回は binary 未取得。HTTPS/parser fixture の検証を完了してから有効化する。公式ページ由来の 13 候補のスナップショットで初期検証を開始できる。"

[[feeds]]
id = "newtrackon-review"
kind = "human_review"
url = "https://newtrackon.com/list"
lineage_group = "newtrackon"
enabled = false
reason = "ページは動的読み込み。機械向け API は未確認のため endpoint を捏造しない。保守者の正常性データを手動照合する出典として使う。"

[[feeds]]
id = "emule-security-web"
kind = "human_review"
url = "https://www.emule-security.org/serverlist"
lineage_group = "emule-security"
enabled = false
reason = "本版はページのスナップショットを内蔵。HTML 自動更新 parser は未実装/未受け入れであり、レイアウト変更による密かな注入を避ける。"

[selection]
mode = "adaptive_marginal_yield"
respect_announce_min_interval = true
respect_remote_retry_after = true
effectiveness = "new_usable_sources_per_qualified_lookup"
legacy_http_catalog_fetch = "review_only"
unknown_operator_identity = "unknown"
config/storage.toml
[storage]
preallocate_payload = false
create_payload_on_first_write = true
allocation_mode = "sparse_incremental"
reserve_full_file_size = false
next_write_window_bytes = 67108864
max_total_outstanding_write_bytes = 1073741824
free_space_floor_bytes = 5368709120
free_space_floor_fraction = 0.05
max_parallel_verifiers = 2
max_parallel_moves_per_volume = 1
shard_scheme = "sha256-hv1-2x2"
create_buckets_lazily = true
# ディレクトリはユーザー選択 volume 内の相対パス。この例では実ファイルを作成しない。
incomplete_dir = "下載中"
completed_dir = "下載完"
quarantine_dir = "死檔"
publish_completed = true
cross_volume_strategy = "copy_verify_publish_then_remove"
collision_policy = "never_overwrite"

[dead_files]
no_progress_days = 14
min_qualified_probe_rounds = 6
min_distinct_probe_days = 3
quarantine_retention_days = 30
auto_quarantine = true
auto_delete = false
exclude_user_paused = true
exclude_pinned_or_shared = true
exclude_unknown_outcome = true
keep_history_tombstone = true
cleanup_batch_size = 100
config/store.toml
[store]
backend = "sqlite"
path = "state/core.db"
journal_mode = "WAL"
synchronous = "FULL"
foreign_keys = true
writer_count = 1
read_connections = 4
busy_timeout_ms = 2500
checkpoint_mode = "PASSIVE"
checkpoint_interval_seconds = 30
wal_observation_threshold_bytes = 67108864
# ハード上限ではない。active reader が checkpoint を妨げる場合があるため、期限切れ読み取りを止めてバックプレッシャーをかける。
reader_timeout_ms = 2000
progress_checkpoint_seconds = 5
progress_checkpoint_bytes = 33554432
metrics_in_core_db = false
contracts/catalog.schema.json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:p2p:catalog:2.3",
  "$defs": {
    "Tracker": {
      "type": "object",
      "properties": {
        "endpoint_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "uri": {
          "type": "string",
          "maxLength": 2048
        },
        "protocol": {
          "type": "string",
          "enum": [
            "udp",
            "http",
            "https",
            "ws",
            "wss"
          ]
        },
        "realm": {
          "const": "public_bt"
        },
        "source_ids": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "maxItems": 16
        },
        "syntax_status": {
          "const": "passed"
        },
        "runtime_status": {
          "const": "unprobed"
        },
        "risk_status": {
          "const": "unknown"
        },
        "default_use": {
          "type": "string",
          "enum": [
            "eligible_for_validation",
            "requires_webtorrent_capability",
            "manual_review_sensitive_port",
            "rejected_nonpublic_address"
          ]
        },
        "country": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "endpoint_id",
        "uri",
        "protocol",
        "realm",
        "source_ids",
        "syntax_status",
        "runtime_status",
        "risk_status",
        "default_use",
        "country"
      ],
      "additionalProperties": false
    },
    "Ed2k": {
      "type": "object",
      "properties": {
        "endpoint_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "name": {
          "type": "string",
          "maxLength": 2048
        },
        "uri": {
          "type": "string",
          "maxLength": 2048
        },
        "ip": {
          "type": "string",
          "maxLength": 2048
        },
        "tcp_port": {
          "type": "integer",
          "minimum": 1,
          "maximum": 65535
        },
        "udp_port": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "obfuscated_port": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "source_ids": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "maxItems": 16
        },
        "source_updated_at": {
          "type": "string"
        },
        "observed_date": {
          "type": "string"
        },
        "runtime_status": {
          "const": "unprobed"
        },
        "risk_status": {
          "const": "unknown"
        },
        "default_use": {
          "const": "eligible_for_validation"
        }
      },
      "required": [
        "endpoint_id",
        "name",
        "uri",
        "ip",
        "tcp_port",
        "udp_port",
        "obfuscated_port",
        "source_ids",
        "source_updated_at",
        "observed_date",
        "runtime_status",
        "risk_status",
        "default_use"
      ],
      "additionalProperties": false
    }
  },
  "oneOf": [
    {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tracker"
      },
      "maxItems": 50000
    },
    {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Ed2k"
      },
      "maxItems": 50000
    }
  ]
}
contracts/control.openapi.json
{
  "openapi": "3.1.0",
  "info": {
    "title": "P2P Downloader ローカル接続と可変プール API",
    "version": "2.3.0",
    "description": "目標 API。製品ログインはない。exact Host/Origin、JSON-only mutation、loopback/UDS の境界を維持。未実装。"
  },
  "security": [],
  "paths": {
    "/api/v1/scheduler/pool": {
      "get": {
        "operationId": "get_api_v1_scheduler_pool",
        "summary": "/api/v1/scheduler/pool を読み取る",
        "responses": {
          "200": {
            "description": "型付きの結果。202 は受理済みを示し、完了ではない",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PoolStatus"
                }
              }
            }
          },
          "400": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "412": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "428": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/connections": {
      "get": {
        "operationId": "get_api_v1_connections",
        "summary": "/api/v1/connections を読み取る",
        "responses": {
          "200": {
            "description": "型付きの結果。202 は受理済みを示し、完了ではない",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionPage"
                }
              }
            }
          },
          "400": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "412": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "428": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 2048
            }
          }
        ]
      }
    },
    "/api/v1/connections/{connection_id}": {
      "get": {
        "operationId": "get_api_v1_connections_connection_id",
        "summary": "/api/v1/connections/{connection_id} を読み取る",
        "responses": {
          "200": {
            "description": "型付きの結果。202 は受理済みを示し、完了ではない",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionReport"
                }
              }
            }
          },
          "400": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "412": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "428": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            }
          }
        ]
      }
    },
    "/api/v1/operations/{operation_id}": {
      "get": {
        "operationId": "get_api_v1_operations_operation_id",
        "summary": "/api/v1/operations/{operation_id} を読み取る",
        "responses": {
          "200": {
            "description": "型付きの結果。202 は受理済みを示し、完了ではない",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "412": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "428": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "operation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            }
          }
        ]
      }
    },
    "/api/v1/source-catalog": {
      "get": {
        "operationId": "get_api_v1_source-catalog",
        "summary": "/api/v1/source-catalog を読み取る",
        "responses": {
          "200": {
            "description": "型付きの結果。202 は受理済みを示し、完了ではない",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourcePage"
                }
              }
            }
          },
          "400": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "412": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "428": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 2048
            }
          }
        ]
      }
    },
    "/api/v1/connection-policies": {
      "get": {
        "operationId": "get_api_v1_connection-policies",
        "summary": "/api/v1/connection-policies を読み取る",
        "responses": {
          "200": {
            "description": "型付きの結果。202 は受理済みを示し、完了ではない",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PolicyPage"
                }
              }
            }
          },
          "400": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "412": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "428": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 2048
            }
          }
        ]
      },
      "post": {
        "operationId": "createManualConnectionPolicy",
        "summary": "明示的な手動ブロック追加。自動 scope 拡大なし",
        "parameters": [
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\"r[1-9][0-9]*\"$"
            },
            "description": "PolicyPage.config_revision / ETag が返す現在の Config revision は expected_revision と一致しなければならない。撤回時は対象行の revision を確認する。"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PolicyCreate"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "まず operation を永続化。まだ発効していない",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "409": {
            "description": "範囲/能力/競合",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "412": {
            "description": "古い revision",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/connections/{connection_id}/commands": {
      "post": {
        "operationId": "post_api_v1_connections_connection_id_commands",
        "summary": "/api/v1/connections/{connection_id}/commands を受け付ける",
        "responses": {
          "202": {
            "description": "型付きの結果。202 は受理済みを示し、完了ではない",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "412": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "428": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectionCommand"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\"r[1-9][0-9]*\"$"
            },
            "description": "リクエスト内の期待する revision と一致しなければならない"
          }
        ]
      }
    },
    "/api/v1/source-feeds/{feed_id}/commands": {
      "post": {
        "operationId": "post_api_v1_source-feeds_feed_id_commands",
        "summary": "/api/v1/source-feeds/{feed_id}/commands を受け付ける",
        "responses": {
          "202": {
            "description": "型付きの結果。202 は受理済みを示し、完了ではない",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "412": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "428": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SourceCommand"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "feed_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\"r[1-9][0-9]*\"$"
            },
            "description": "リクエスト内の期待する revision と一致しなければならない"
          }
        ]
      }
    },
    "/api/v1/connection-policies/{policy_id}/commands": {
      "post": {
        "operationId": "post_api_v1_connection-policies_policy_id_commands",
        "summary": "/api/v1/connection-policies/{policy_id}/commands を受け付ける",
        "responses": {
          "202": {
            "description": "型付きの結果。202 は受理済みを示し、完了ではない",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "412": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "428": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "明示的な失敗または事前条件",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PolicyRevoke"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "policy_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            }
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\"r[1-9][0-9]*\"$"
            },
            "description": "リクエスト内の期待する revision と一致しなければならない"
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Identity": {
        "type": "object",
        "properties": {
          "connection_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "component_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "run_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "native_connection_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "transport_handle_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "realm": {
            "type": "string",
            "enum": [
              "public_bt",
              "private_bt",
              "ed2k",
              "dc",
              "soulseek",
              "ipfs",
              "i2p",
              "other"
            ]
          },
          "task_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            },
            "maxItems": 256
          }
        },
        "required": [
          "connection_id",
          "component_id",
          "run_id",
          "native_connection_key",
          "transport_handle_id",
          "realm",
          "task_ids"
        ],
        "additionalProperties": false
      },
      "ConnectionReport": {
        "type": "object",
        "properties": {
          "schema_version": {
            "const": "2.3"
          },
          "identity": {
            "$ref": "#/components/schemas/Identity"
          },
          "sequence": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]{0,19})$",
            "description": "正規形の非負十進 int64。解析して >9223372036854775807 を拒否し、overflow 前に run を切り替える。"
          },
          "sample_interval_ms": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "observed_age_ms": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "reporting": {
            "type": "string",
            "enum": [
              "exact",
              "aggregate",
              "partial",
              "unsupported"
            ]
          },
          "role": {
            "type": "string",
            "enum": [
              "payload",
              "tracker",
              "ed2k_server",
              "dht",
              "hub",
              "metadata",
              "provider",
              "upload_only"
            ]
          },
          "endpoint": {
            "type": "string",
            "maxLength": 2048
          },
          "country": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "country_source": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2048
              },
              {
                "type": "null"
              }
            ]
          },
          "peer_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2048
              },
              {
                "type": "null"
              }
            ]
          },
          "identity_strength": {
            "type": "string",
            "enum": [
              "claimed",
              "protocol_authenticated",
              "unknown"
            ]
          },
          "remote_choked": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "remote_queued": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "service_expected": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "outstanding_requests": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "queued_disk_bytes": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(0|[1-9][0-9]{0,19})$",
                "description": "十進 uint64。意味上の上限は 18446744073709551615"
              },
              {
                "type": "null"
              }
            ]
          },
          "local_blocked": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "delta_payload_bytes": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "delta_unique_bytes": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "delta_verified_bytes": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "rtt_ms": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "rtt_method": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2048
              },
              {
                "type": "null"
              }
            ]
          },
          "qualified_idle_ms": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "missing_reason": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2048
              },
              {
                "type": "null"
              }
            ]
          },
          "native_state": {
            "type": "object",
            "properties": {
              "handshake_complete": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "interested": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "needed_overlap": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "slot_granted": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "remote_queue_rank": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "receive_credit_bytes": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "service_generation": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[A-Za-z0-9_.:-]+$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "protocol_deadline_ms": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "common_path_outage": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "enforcement_capabilities": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "disconnect_connection",
                    "avoid_content_source",
                    "quarantine_endpoint",
                    "revoke_policy",
                    "ip_ban"
                  ]
                },
                "maxItems": 8
              }
            },
            "required": [
              "handshake_complete",
              "interested",
              "needed_overlap",
              "slot_granted",
              "remote_queue_rank",
              "receive_credit_bytes",
              "service_generation",
              "protocol_deadline_ms",
              "common_path_outage",
              "enforcement_capabilities"
            ],
            "additionalProperties": false
          },
          "performance": {
            "type": "object",
            "properties": {
              "ttfb_ms": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "request_p50_ms": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "request_p95_ms": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "delta_duplicate_bytes": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "delta_discarded_bytes": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "upload_payload_bytes_per_second": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "payload_bytes_per_second": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "unique_bytes_per_second": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "country_db_version": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 2048
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "asn": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "native_id_class": {
                "anyOf": [
                  {
                    "type": "string",
                    "maxLength": 2048
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "integrity_attribution": {
                "type": "string",
                "enum": [
                  "none",
                  "pending",
                  "ambiguous",
                  "isolated_verified"
                ]
              }
            },
            "required": [
              "ttfb_ms",
              "request_p50_ms",
              "request_p95_ms",
              "delta_duplicate_bytes",
              "delta_discarded_bytes",
              "upload_payload_bytes_per_second",
              "payload_bytes_per_second",
              "unique_bytes_per_second",
              "country_db_version",
              "asn",
              "native_id_class",
              "integrity_attribution"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "schema_version",
          "identity",
          "sequence",
          "sample_interval_ms",
          "observed_age_ms",
          "reporting",
          "role",
          "endpoint",
          "country",
          "country_source",
          "peer_id",
          "identity_strength",
          "remote_choked",
          "remote_queued",
          "service_expected",
          "outstanding_requests",
          "queued_disk_bytes",
          "local_blocked",
          "delta_payload_bytes",
          "delta_unique_bytes",
          "delta_verified_bytes",
          "rtt_ms",
          "rtt_method",
          "qualified_idle_ms",
          "missing_reason",
          "native_state",
          "performance"
        ],
        "additionalProperties": false
      },
      "SourceSnapshot": {
        "type": "object",
        "properties": {
          "schema_version": {
            "const": "2.3"
          },
          "snapshot_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "task_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "realm": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "selection_digest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "component_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "run_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "sequence": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]{0,19})$",
            "description": "正規形の非負十進 int64。解析して >9223372036854775807 を拒否し、overflow 前に run を切り替える。"
          },
          "observed_at_ms": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "expires_at_ms": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "coverage": {
            "type": "string",
            "enum": [
              "covered_observed",
              "missing_observed",
              "unknown"
            ]
          },
          "coverage_quality": {
            "type": "string",
            "enum": [
              "exact",
              "aggregate",
              "partial",
              "unsupported"
            ]
          },
          "source_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            },
            "maxItems": 2048
          },
          "can_serve_now": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "next_safe_probe_at_ms": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "release_state": {
            "type": "string",
            "enum": [
              "closed",
              "shared_retained",
              "queue_retained",
              "unknown"
            ]
          },
          "reason": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2048
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "schema_version",
          "snapshot_id",
          "task_id",
          "realm",
          "selection_digest",
          "component_id",
          "run_id",
          "sequence",
          "observed_at_ms",
          "expires_at_ms",
          "coverage",
          "coverage_quality",
          "source_ids",
          "can_serve_now",
          "next_safe_probe_at_ms",
          "release_state",
          "reason"
        ],
        "additionalProperties": false
      },
      "DownloadBudget": {
        "type": "object",
        "properties": {
          "task_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "run_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "generation": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "network_domain": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "storage_domain": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "mode": {
            "type": "string",
            "enum": [
              "probe",
              "trial",
              "active",
              "observe",
              "drain"
            ]
          },
          "network_bytes_per_second": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "write_window_bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "memory_bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "peer_credit": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "expires_at_ms": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "enforcement": {
            "type": "string",
            "enum": [
              "hard_native",
              "soft_observed",
              "unsupported"
            ]
          }
        },
        "required": [
          "task_id",
          "run_id",
          "generation",
          "network_domain",
          "storage_domain",
          "mode",
          "network_bytes_per_second",
          "write_window_bytes",
          "memory_bytes",
          "peer_credit",
          "expires_at_ms",
          "enforcement"
        ],
        "additionalProperties": false
      },
      "ConnectionCommand": {
        "type": "object",
        "properties": {
          "schema_version": {
            "const": "2.3"
          },
          "request_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "connection_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "expected_run_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "expected_policy_revision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "action": {
            "type": "string",
            "enum": [
              "disconnect",
              "avoid",
              "quarantine"
            ]
          },
          "scope": {
            "type": "string",
            "enum": [
              "connection",
              "realm_content_source",
              "realm_endpoint",
              "ip"
            ]
          },
          "automatic": {
            "type": "boolean"
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "evidence_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[A-Za-z0-9_.:-]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "reason_code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "task_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[A-Za-z0-9_.:-]+$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "schema_version",
          "request_id",
          "connection_id",
          "expected_run_id",
          "expected_policy_revision",
          "action",
          "scope",
          "automatic",
          "duration_ms",
          "evidence_id",
          "reason_code",
          "task_id"
        ],
        "additionalProperties": false,
        "allOf": [
          {
            "if": {
              "properties": {
                "automatic": {
                  "const": true
                }
              },
              "required": [
                "automatic"
              ]
            },
            "then": {
              "properties": {
                "scope": {
                  "type": "string",
                  "enum": [
                    "connection",
                    "realm_content_source",
                    "realm_endpoint"
                  ]
                },
                "duration_ms": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "evidence_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[A-Za-z0-9_.:-]+$"
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "scope": {
                  "const": "realm_content_source"
                }
              },
              "required": [
                "scope"
              ]
            },
            "then": {
              "properties": {
                "task_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[A-Za-z0-9_.:-]+$"
                }
              }
            }
          }
        ]
      },
      "Operation": {
        "type": "object",
        "properties": {
          "operation_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "request_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "target_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "requested_action": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "requested_scope": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "outcome": {
            "type": "string",
            "enum": [
              "pending",
              "sent",
              "applied",
              "already_closed",
              "unsupported_scope",
              "stale_target",
              "unknown",
              "failed"
            ]
          },
          "observed_at_ms": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "effective_scope": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[A-Za-z0-9_.:-]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "reason_code": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[A-Za-z0-9_.:-]+$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "operation_id",
          "request_id",
          "target_id",
          "requested_action",
          "requested_scope",
          "outcome",
          "observed_at_ms",
          "effective_scope",
          "reason_code"
        ],
        "additionalProperties": false
      },
      "PoolStatus": {
        "type": "object",
        "properties": {
          "policy_revision": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "active_tasks": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "trial_tasks": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "observing_tasks": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "collecting_tasks": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "network_capacity_bytes_per_second": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "capacity_basis": {
            "type": "string",
            "enum": [
              "configured",
              "estimated",
              "unknown"
            ]
          },
          "utilization": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "local_pressure": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "control_action": {
            "type": "string",
            "enum": [
              "hold",
              "trial_more",
              "drain",
              "rotate"
            ]
          },
          "reason_code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "samples_fresh": {
            "type": "boolean"
          },
          "registered_tasks": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "rank_ready_tasks": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "held_tasks": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "finished_tasks": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "policy_revision",
          "active_tasks",
          "trial_tasks",
          "observing_tasks",
          "collecting_tasks",
          "network_capacity_bytes_per_second",
          "capacity_basis",
          "utilization",
          "local_pressure",
          "control_action",
          "reason_code",
          "samples_fresh",
          "registered_tasks",
          "rank_ready_tasks",
          "held_tasks",
          "finished_tasks"
        ],
        "additionalProperties": false
      },
      "SourceCommand": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "target_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "expected_revision": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "action": {
            "type": "string",
            "enum": [
              "refresh",
              "quarantine",
              "restore",
              "retire"
            ]
          },
          "reason": {
            "type": "string",
            "maxLength": 2048
          }
        },
        "required": [
          "request_id",
          "target_id",
          "expected_revision",
          "action",
          "reason"
        ],
        "additionalProperties": false
      },
      "SourceEndpoint": {
        "type": "object",
        "properties": {
          "endpoint_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "uri": {
            "type": "string",
            "maxLength": 2048
          },
          "realm": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "kind": {
            "type": "string",
            "enum": [
              "tracker",
              "ed2k_server",
              "other"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "candidate",
              "validated",
              "probing",
              "usable_observed",
              "quarantined",
              "retired",
              "manual_review"
            ]
          },
          "revision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "source_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            },
            "maxItems": 16
          },
          "last_checked_at_ms": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "risk_state": {
            "type": "string",
            "enum": [
              "unknown",
              "observed_anomaly",
              "attributed_invalid",
              "manual_deny"
            ]
          },
          "next_probe_at_ms": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "reason_code": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[A-Za-z0-9_.:-]+$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "endpoint_id",
          "uri",
          "realm",
          "kind",
          "state",
          "revision",
          "source_ids",
          "last_checked_at_ms",
          "risk_state",
          "next_probe_at_ms",
          "reason_code"
        ],
        "additionalProperties": false
      },
      "PolicyRecord": {
        "type": "object",
        "properties": {
          "policy_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "revision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "realm": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "scope": {
            "type": "string",
            "enum": [
              "realm_content_source",
              "realm_endpoint",
              "ip"
            ]
          },
          "target_key": {
            "type": "string",
            "maxLength": 2048
          },
          "content_key": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2048
              },
              {
                "type": "null"
              }
            ]
          },
          "action": {
            "type": "string",
            "enum": [
              "avoid",
              "quarantine",
              "manual_deny",
              "allow_override"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "enforced",
              "expired",
              "revoked",
              "unknown",
              "unsupported"
            ]
          },
          "created_at_ms": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "expires_at_ms": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "evidence_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "strikes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "reason_code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          }
        },
        "required": [
          "policy_id",
          "revision",
          "realm",
          "scope",
          "target_key",
          "content_key",
          "action",
          "state",
          "created_at_ms",
          "expires_at_ms",
          "evidence_id",
          "strikes",
          "reason_code"
        ],
        "additionalProperties": false
      },
      "PolicyCreate": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "expected_revision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "action": {
            "const": "manual_deny"
          },
          "scope": {
            "type": "string",
            "enum": [
              "realm_content_source",
              "realm_endpoint",
              "ip"
            ]
          },
          "realm": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "target_key": {
            "type": "string",
            "maxLength": 2048
          },
          "content_key": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2048
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at_ms": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2048
          }
        },
        "required": [
          "request_id",
          "expected_revision",
          "action",
          "scope",
          "realm",
          "target_key",
          "content_key",
          "expires_at_ms",
          "reason"
        ],
        "additionalProperties": false,
        "allOf": [
          {
            "if": {
              "properties": {
                "scope": {
                  "const": "realm_content_source"
                }
              },
              "required": [
                "scope"
              ]
            },
            "then": {
              "properties": {
                "content_key": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2048
                }
              }
            }
          }
        ]
      },
      "PolicyRevoke": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "target_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "expected_revision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "action": {
            "const": "revoke"
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2048
          }
        },
        "required": [
          "request_id",
          "target_id",
          "expected_revision",
          "action",
          "reason"
        ],
        "additionalProperties": false
      },
      "ConnectionPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConnectionReport"
            },
            "maxItems": 500
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2048
              },
              {
                "type": "null"
              }
            ]
          },
          "observed_at_ms": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "has_gaps": {
            "type": "boolean"
          }
        },
        "required": [
          "items",
          "next_cursor",
          "observed_at_ms",
          "has_gaps"
        ],
        "additionalProperties": false
      },
      "SourcePage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceEndpoint"
            },
            "maxItems": 500
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2048
              },
              {
                "type": "null"
              }
            ]
          },
          "observed_at_ms": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "has_gaps": {
            "type": "boolean"
          }
        },
        "required": [
          "items",
          "next_cursor",
          "observed_at_ms",
          "has_gaps"
        ],
        "additionalProperties": false
      },
      "PolicyPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PolicyRecord"
            },
            "maxItems": 500
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2048
              },
              {
                "type": "null"
              }
            ]
          },
          "observed_at_ms": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "has_gaps": {
            "type": "boolean"
          },
          "config_revision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "items",
          "next_cursor",
          "observed_at_ms",
          "has_gaps",
          "config_revision"
        ],
        "additionalProperties": false
      },
      "ResourceReport": {
        "type": "object",
        "properties": {
          "component_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "run_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "sequence": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]{0,18})$"
          },
          "sample_interval_ms": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "observed_age_ms": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "network_domain": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "network_bytes_per_second": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "unique_bytes_per_second": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "capacity_bytes_per_second": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "capacity_basis": {
            "type": "string",
            "enum": [
              "configured",
              "estimated",
              "unknown"
            ]
          },
          "fd_limit": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "fd_used": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "memory_available_bytes": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "event_loop_lag_ms": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "hash_queue_bytes": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "storage_domains": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "domain_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[A-Za-z0-9_.:-]+$"
                },
                "pending_write_bytes": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "write_p95_ms": {
                  "anyOf": [
                    {
                      "type": "number",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "pressure_ratio": {
                  "anyOf": [
                    {
                      "type": "number",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "free_allocatable_bytes": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "domain_id",
                "pending_write_bytes",
                "write_p95_ms",
                "pressure_ratio",
                "free_allocatable_bytes"
              ],
              "additionalProperties": false
            },
            "maxItems": 64
          },
          "lost_samples": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "component_id",
          "run_id",
          "sequence",
          "sample_interval_ms",
          "observed_age_ms",
          "network_domain",
          "network_bytes_per_second",
          "unique_bytes_per_second",
          "capacity_bytes_per_second",
          "capacity_basis",
          "fd_limit",
          "fd_used",
          "memory_available_bytes",
          "event_loop_lag_ms",
          "hash_queue_bytes",
          "storage_domains",
          "lost_samples"
        ],
        "additionalProperties": false
      },
      "ComponentCapabilities": {
        "type": "object",
        "properties": {
          "component_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "engine_version": {
            "type": "string",
            "maxLength": 2048
          },
          "capability_revision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "observed_fixture_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[A-Za-z0-9_.:-]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "capabilities": {
            "type": "object",
            "properties": {
              "per_connection_identity": {
                "type": "string",
                "enum": [
                  "native",
                  "observed",
                  "unsupported"
                ]
              },
              "service_eligibility": {
                "type": "string",
                "enum": [
                  "native",
                  "observed",
                  "unsupported"
                ]
              },
              "per_peer_piece_map": {
                "type": "string",
                "enum": [
                  "native",
                  "observed",
                  "unsupported"
                ]
              },
              "request_progress": {
                "type": "string",
                "enum": [
                  "native",
                  "observed",
                  "unsupported"
                ]
              },
              "disconnect_connection": {
                "type": "string",
                "enum": [
                  "native",
                  "observed",
                  "unsupported"
                ]
              },
              "avoid_content_source": {
                "type": "string",
                "enum": [
                  "native",
                  "observed",
                  "unsupported"
                ]
              },
              "reversible_ban": {
                "type": "string",
                "enum": [
                  "native",
                  "observed",
                  "unsupported"
                ]
              },
              "metadata_without_payload": {
                "type": "string",
                "enum": [
                  "native",
                  "observed",
                  "unsupported"
                ]
              },
              "retain_queue_without_autostart": {
                "type": "string",
                "enum": [
                  "native",
                  "observed",
                  "unsupported"
                ]
              }
            },
            "required": [
              "per_connection_identity",
              "service_eligibility",
              "per_peer_piece_map",
              "request_progress",
              "disconnect_connection",
              "avoid_content_source",
              "reversible_ban",
              "metadata_without_payload",
              "retain_queue_without_autostart"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "component_id",
          "engine_version",
          "capability_revision",
          "observed_fixture_id",
          "capabilities"
        ],
        "additionalProperties": false
      },
      "Error": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "message": {
            "type": "string",
            "maxLength": 2048
          },
          "retryable": {
            "type": "boolean"
          }
        },
        "required": [
          "code",
          "message",
          "retryable"
        ],
        "additionalProperties": false
      },
      "DiscoverCommand": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "task_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "expected_task_revision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "expected_run_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "config_revision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "deadline_ms": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "action": {
            "const": "discover"
          },
          "content_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2048
          },
          "realm": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "selection_digest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "max_returned_sources": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2048
          },
          "payload_allowed": {
            "const": false
          }
        },
        "required": [
          "request_id",
          "task_id",
          "expected_task_revision",
          "expected_run_id",
          "config_revision",
          "deadline_ms",
          "action",
          "content_key",
          "realm",
          "selection_digest",
          "max_returned_sources",
          "payload_allowed"
        ],
        "additionalProperties": false
      },
      "ProbeCommand": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "task_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "expected_task_revision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "expected_run_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "config_revision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "deadline_ms": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "action": {
            "const": "probe_sources"
          },
          "source_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            },
            "maxItems": 2048
          },
          "dial_credit": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "memory_credit_bytes": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "rate_tokens": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "release_task_local_on_finish": {
            "const": true
          },
          "preserve_valid_queue": {
            "const": true
          },
          "payload_allowed": {
            "const": false
          }
        },
        "required": [
          "request_id",
          "task_id",
          "expected_task_revision",
          "expected_run_id",
          "config_revision",
          "deadline_ms",
          "action",
          "source_ids",
          "dial_credit",
          "memory_credit_bytes",
          "rate_tokens",
          "release_task_local_on_finish",
          "preserve_valid_queue",
          "payload_allowed"
        ],
        "additionalProperties": false
      },
      "TrialCommand": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "task_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "expected_task_revision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "expected_run_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "config_revision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "deadline_ms": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "action": {
            "const": "start_trial"
          },
          "source_snapshot_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "budget": {
            "$ref": "#/components/schemas/DownloadBudget"
          },
          "verification_extension_allowed": {
            "type": "boolean"
          }
        },
        "required": [
          "request_id",
          "task_id",
          "expected_task_revision",
          "expected_run_id",
          "config_revision",
          "deadline_ms",
          "action",
          "source_snapshot_id",
          "budget",
          "verification_extension_allowed"
        ],
        "additionalProperties": false
      },
      "PauseCommand": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "task_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "expected_task_revision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "expected_run_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "config_revision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "deadline_ms": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "action": {
            "const": "pause_or_observe"
          },
          "reason_code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "preserve_checkpoint": {
            "const": true
          },
          "preserve_queue_if_budgeted": {
            "type": "boolean"
          },
          "target_phase": {
            "type": "string",
            "enum": [
              "observing",
              "held"
            ]
          }
        },
        "required": [
          "request_id",
          "task_id",
          "expected_task_revision",
          "expected_run_id",
          "config_revision",
          "deadline_ms",
          "action",
          "reason_code",
          "preserve_checkpoint",
          "preserve_queue_if_budgeted",
          "target_phase"
        ],
        "additionalProperties": false
      },
      "BudgetCommand": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "task_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "expected_task_revision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "expected_run_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "config_revision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "deadline_ms": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "action": {
            "const": "set_download_budget"
          },
          "budget": {
            "$ref": "#/components/schemas/DownloadBudget"
          }
        },
        "required": [
          "request_id",
          "task_id",
          "expected_task_revision",
          "expected_run_id",
          "config_revision",
          "deadline_ms",
          "action",
          "budget"
        ],
        "additionalProperties": false
      },
      "EngineAck": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "task_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "component_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "run_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "task_revision": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "outcome": {
            "type": "string",
            "enum": [
              "applied",
              "already_applied",
              "rejected",
              "unsupported",
              "unknown"
            ]
          },
          "effective_budget": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DownloadBudget"
              },
              {
                "type": "null"
              }
            ]
          },
          "reason_code": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[A-Za-z0-9_.:-]+$"
              },
              {
                "type": "null"
              }
            ]
          },
          "observed_at_ms": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "request_id",
          "task_id",
          "component_id",
          "run_id",
          "task_revision",
          "outcome",
          "effective_budget",
          "reason_code",
          "observed_at_ms"
        ],
        "additionalProperties": false
      }
    }
  }
}
contracts/control.schema.json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:p2p:control:2.3",
  "title": "P2P 制御契約 2.3",
  "$defs": {
    "Identity": {
      "type": "object",
      "properties": {
        "connection_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "component_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "run_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "native_connection_key": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "transport_handle_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "realm": {
          "type": "string",
          "enum": [
            "public_bt",
            "private_bt",
            "ed2k",
            "dc",
            "soulseek",
            "ipfs",
            "i2p",
            "other"
          ]
        },
        "task_ids": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "maxItems": 256
        }
      },
      "required": [
        "connection_id",
        "component_id",
        "run_id",
        "native_connection_key",
        "transport_handle_id",
        "realm",
        "task_ids"
      ],
      "additionalProperties": false
    },
    "ConnectionReport": {
      "type": "object",
      "properties": {
        "schema_version": {
          "const": "2.3"
        },
        "identity": {
          "$ref": "#/$defs/Identity"
        },
        "sequence": {
          "type": "string",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "description": "正規形の非負十進 int64。解析して >9223372036854775807 を拒否し、overflow 前に run を切り替える。"
        },
        "sample_interval_ms": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "observed_age_ms": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "reporting": {
          "type": "string",
          "enum": [
            "exact",
            "aggregate",
            "partial",
            "unsupported"
          ]
        },
        "role": {
          "type": "string",
          "enum": [
            "payload",
            "tracker",
            "ed2k_server",
            "dht",
            "hub",
            "metadata",
            "provider",
            "upload_only"
          ]
        },
        "endpoint": {
          "type": "string",
          "maxLength": 2048
        },
        "country": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Z]{2}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "country_source": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2048
            },
            {
              "type": "null"
            }
          ]
        },
        "peer_id": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2048
            },
            {
              "type": "null"
            }
          ]
        },
        "identity_strength": {
          "type": "string",
          "enum": [
            "claimed",
            "protocol_authenticated",
            "unknown"
          ]
        },
        "remote_choked": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "remote_queued": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "service_expected": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "outstanding_requests": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "queued_disk_bytes": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^(0|[1-9][0-9]{0,19})$",
              "description": "十進 uint64。意味上の上限は 18446744073709551615"
            },
            {
              "type": "null"
            }
          ]
        },
        "local_blocked": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "delta_payload_bytes": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "delta_unique_bytes": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "delta_verified_bytes": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "rtt_ms": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0
            },
            {
              "type": "null"
            }
          ]
        },
        "rtt_method": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2048
            },
            {
              "type": "null"
            }
          ]
        },
        "qualified_idle_ms": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "missing_reason": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2048
            },
            {
              "type": "null"
            }
          ]
        },
        "native_state": {
          "type": "object",
          "properties": {
            "handshake_complete": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            },
            "interested": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            },
            "needed_overlap": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            },
            "slot_granted": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            },
            "remote_queue_rank": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "receive_credit_bytes": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "service_generation": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[A-Za-z0-9_.:-]+$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "protocol_deadline_ms": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "common_path_outage": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ]
            },
            "enforcement_capabilities": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "disconnect_connection",
                  "avoid_content_source",
                  "quarantine_endpoint",
                  "revoke_policy",
                  "ip_ban"
                ]
              },
              "maxItems": 8
            }
          },
          "required": [
            "handshake_complete",
            "interested",
            "needed_overlap",
            "slot_granted",
            "remote_queue_rank",
            "receive_credit_bytes",
            "service_generation",
            "protocol_deadline_ms",
            "common_path_outage",
            "enforcement_capabilities"
          ],
          "additionalProperties": false
        },
        "performance": {
          "type": "object",
          "properties": {
            "ttfb_ms": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ]
            },
            "request_p50_ms": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ]
            },
            "request_p95_ms": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ]
            },
            "delta_duplicate_bytes": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "delta_discarded_bytes": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "upload_payload_bytes_per_second": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ]
            },
            "payload_bytes_per_second": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ]
            },
            "unique_bytes_per_second": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ]
            },
            "country_db_version": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 2048
                },
                {
                  "type": "null"
                }
              ]
            },
            "asn": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "native_id_class": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 2048
                },
                {
                  "type": "null"
                }
              ]
            },
            "integrity_attribution": {
              "type": "string",
              "enum": [
                "none",
                "pending",
                "ambiguous",
                "isolated_verified"
              ]
            }
          },
          "required": [
            "ttfb_ms",
            "request_p50_ms",
            "request_p95_ms",
            "delta_duplicate_bytes",
            "delta_discarded_bytes",
            "upload_payload_bytes_per_second",
            "payload_bytes_per_second",
            "unique_bytes_per_second",
            "country_db_version",
            "asn",
            "native_id_class",
            "integrity_attribution"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "schema_version",
        "identity",
        "sequence",
        "sample_interval_ms",
        "observed_age_ms",
        "reporting",
        "role",
        "endpoint",
        "country",
        "country_source",
        "peer_id",
        "identity_strength",
        "remote_choked",
        "remote_queued",
        "service_expected",
        "outstanding_requests",
        "queued_disk_bytes",
        "local_blocked",
        "delta_payload_bytes",
        "delta_unique_bytes",
        "delta_verified_bytes",
        "rtt_ms",
        "rtt_method",
        "qualified_idle_ms",
        "missing_reason",
        "native_state",
        "performance"
      ],
      "additionalProperties": false
    },
    "SourceSnapshot": {
      "type": "object",
      "properties": {
        "schema_version": {
          "const": "2.3"
        },
        "snapshot_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "task_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "realm": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "selection_digest": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "component_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "run_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "sequence": {
          "type": "string",
          "pattern": "^(0|[1-9][0-9]{0,19})$",
          "description": "正規形の非負十進 int64。解析して >9223372036854775807 を拒否し、overflow 前に run を切り替える。"
        },
        "observed_at_ms": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "expires_at_ms": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "coverage": {
          "type": "string",
          "enum": [
            "covered_observed",
            "missing_observed",
            "unknown"
          ]
        },
        "coverage_quality": {
          "type": "string",
          "enum": [
            "exact",
            "aggregate",
            "partial",
            "unsupported"
          ]
        },
        "source_ids": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "maxItems": 2048
        },
        "can_serve_now": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "next_safe_probe_at_ms": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "release_state": {
          "type": "string",
          "enum": [
            "closed",
            "shared_retained",
            "queue_retained",
            "unknown"
          ]
        },
        "reason": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2048
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "schema_version",
        "snapshot_id",
        "task_id",
        "realm",
        "selection_digest",
        "component_id",
        "run_id",
        "sequence",
        "observed_at_ms",
        "expires_at_ms",
        "coverage",
        "coverage_quality",
        "source_ids",
        "can_serve_now",
        "next_safe_probe_at_ms",
        "release_state",
        "reason"
      ],
      "additionalProperties": false
    },
    "DownloadBudget": {
      "type": "object",
      "properties": {
        "task_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "run_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "generation": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "network_domain": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "storage_domain": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "mode": {
          "type": "string",
          "enum": [
            "probe",
            "trial",
            "active",
            "observe",
            "drain"
          ]
        },
        "network_bytes_per_second": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "write_window_bytes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "memory_bytes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "peer_credit": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "expires_at_ms": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "enforcement": {
          "type": "string",
          "enum": [
            "hard_native",
            "soft_observed",
            "unsupported"
          ]
        }
      },
      "required": [
        "task_id",
        "run_id",
        "generation",
        "network_domain",
        "storage_domain",
        "mode",
        "network_bytes_per_second",
        "write_window_bytes",
        "memory_bytes",
        "peer_credit",
        "expires_at_ms",
        "enforcement"
      ],
      "additionalProperties": false
    },
    "ConnectionCommand": {
      "type": "object",
      "properties": {
        "schema_version": {
          "const": "2.3"
        },
        "request_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "connection_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "expected_run_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "expected_policy_revision": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "action": {
          "type": "string",
          "enum": [
            "disconnect",
            "avoid",
            "quarantine"
          ]
        },
        "scope": {
          "type": "string",
          "enum": [
            "connection",
            "realm_content_source",
            "realm_endpoint",
            "ip"
          ]
        },
        "automatic": {
          "type": "boolean"
        },
        "duration_ms": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "evidence_id": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            },
            {
              "type": "null"
            }
          ]
        },
        "reason_code": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "task_id": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "schema_version",
        "request_id",
        "connection_id",
        "expected_run_id",
        "expected_policy_revision",
        "action",
        "scope",
        "automatic",
        "duration_ms",
        "evidence_id",
        "reason_code",
        "task_id"
      ],
      "additionalProperties": false,
      "allOf": [
        {
          "if": {
            "properties": {
              "automatic": {
                "const": true
              }
            },
            "required": [
              "automatic"
            ]
          },
          "then": {
            "properties": {
              "scope": {
                "type": "string",
                "enum": [
                  "connection",
                  "realm_content_source",
                  "realm_endpoint"
                ]
              },
              "duration_ms": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "evidence_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[A-Za-z0-9_.:-]+$"
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "scope": {
                "const": "realm_content_source"
              }
            },
            "required": [
              "scope"
            ]
          },
          "then": {
            "properties": {
              "task_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[A-Za-z0-9_.:-]+$"
              }
            }
          }
        }
      ]
    },
    "Operation": {
      "type": "object",
      "properties": {
        "operation_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "request_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "target_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "requested_action": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "requested_scope": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "outcome": {
          "type": "string",
          "enum": [
            "pending",
            "sent",
            "applied",
            "already_closed",
            "unsupported_scope",
            "stale_target",
            "unknown",
            "failed"
          ]
        },
        "observed_at_ms": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "effective_scope": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            },
            {
              "type": "null"
            }
          ]
        },
        "reason_code": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "operation_id",
        "request_id",
        "target_id",
        "requested_action",
        "requested_scope",
        "outcome",
        "observed_at_ms",
        "effective_scope",
        "reason_code"
      ],
      "additionalProperties": false
    },
    "PoolStatus": {
      "type": "object",
      "properties": {
        "policy_revision": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "active_tasks": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "trial_tasks": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "observing_tasks": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "collecting_tasks": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "network_capacity_bytes_per_second": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "capacity_basis": {
          "type": "string",
          "enum": [
            "configured",
            "estimated",
            "unknown"
          ]
        },
        "utilization": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0
            },
            {
              "type": "null"
            }
          ]
        },
        "local_pressure": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0
            },
            {
              "type": "null"
            }
          ]
        },
        "control_action": {
          "type": "string",
          "enum": [
            "hold",
            "trial_more",
            "drain",
            "rotate"
          ]
        },
        "reason_code": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "samples_fresh": {
          "type": "boolean"
        },
        "registered_tasks": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "rank_ready_tasks": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "held_tasks": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "finished_tasks": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "policy_revision",
        "active_tasks",
        "trial_tasks",
        "observing_tasks",
        "collecting_tasks",
        "network_capacity_bytes_per_second",
        "capacity_basis",
        "utilization",
        "local_pressure",
        "control_action",
        "reason_code",
        "samples_fresh",
        "registered_tasks",
        "rank_ready_tasks",
        "held_tasks",
        "finished_tasks"
      ],
      "additionalProperties": false
    },
    "SourceCommand": {
      "type": "object",
      "properties": {
        "request_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "target_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "expected_revision": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "action": {
          "type": "string",
          "enum": [
            "refresh",
            "quarantine",
            "restore",
            "retire"
          ]
        },
        "reason": {
          "type": "string",
          "maxLength": 2048
        }
      },
      "required": [
        "request_id",
        "target_id",
        "expected_revision",
        "action",
        "reason"
      ],
      "additionalProperties": false
    },
    "SourceEndpoint": {
      "type": "object",
      "properties": {
        "endpoint_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "uri": {
          "type": "string",
          "maxLength": 2048
        },
        "realm": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "kind": {
          "type": "string",
          "enum": [
            "tracker",
            "ed2k_server",
            "other"
          ]
        },
        "state": {
          "type": "string",
          "enum": [
            "candidate",
            "validated",
            "probing",
            "usable_observed",
            "quarantined",
            "retired",
            "manual_review"
          ]
        },
        "revision": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "source_ids": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "maxItems": 16
        },
        "last_checked_at_ms": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "risk_state": {
          "type": "string",
          "enum": [
            "unknown",
            "observed_anomaly",
            "attributed_invalid",
            "manual_deny"
          ]
        },
        "next_probe_at_ms": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "reason_code": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "endpoint_id",
        "uri",
        "realm",
        "kind",
        "state",
        "revision",
        "source_ids",
        "last_checked_at_ms",
        "risk_state",
        "next_probe_at_ms",
        "reason_code"
      ],
      "additionalProperties": false
    },
    "PolicyRecord": {
      "type": "object",
      "properties": {
        "policy_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "revision": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "realm": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "scope": {
          "type": "string",
          "enum": [
            "realm_content_source",
            "realm_endpoint",
            "ip"
          ]
        },
        "target_key": {
          "type": "string",
          "maxLength": 2048
        },
        "content_key": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2048
            },
            {
              "type": "null"
            }
          ]
        },
        "action": {
          "type": "string",
          "enum": [
            "avoid",
            "quarantine",
            "manual_deny",
            "allow_override"
          ]
        },
        "state": {
          "type": "string",
          "enum": [
            "pending",
            "enforced",
            "expired",
            "revoked",
            "unknown",
            "unsupported"
          ]
        },
        "created_at_ms": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "expires_at_ms": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "evidence_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "strikes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "reason_code": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        }
      },
      "required": [
        "policy_id",
        "revision",
        "realm",
        "scope",
        "target_key",
        "content_key",
        "action",
        "state",
        "created_at_ms",
        "expires_at_ms",
        "evidence_id",
        "strikes",
        "reason_code"
      ],
      "additionalProperties": false
    },
    "PolicyCreate": {
      "type": "object",
      "properties": {
        "request_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "expected_revision": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "action": {
          "const": "manual_deny"
        },
        "scope": {
          "type": "string",
          "enum": [
            "realm_content_source",
            "realm_endpoint",
            "ip"
          ]
        },
        "realm": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "target_key": {
          "type": "string",
          "maxLength": 2048
        },
        "content_key": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2048
            },
            {
              "type": "null"
            }
          ]
        },
        "expires_at_ms": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "reason": {
          "type": "string",
          "minLength": 1,
          "maxLength": 2048
        }
      },
      "required": [
        "request_id",
        "expected_revision",
        "action",
        "scope",
        "realm",
        "target_key",
        "content_key",
        "expires_at_ms",
        "reason"
      ],
      "additionalProperties": false,
      "allOf": [
        {
          "if": {
            "properties": {
              "scope": {
                "const": "realm_content_source"
              }
            },
            "required": [
              "scope"
            ]
          },
          "then": {
            "properties": {
              "content_key": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2048
              }
            }
          }
        }
      ]
    },
    "PolicyRevoke": {
      "type": "object",
      "properties": {
        "request_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "target_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "expected_revision": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "action": {
          "const": "revoke"
        },
        "reason": {
          "type": "string",
          "minLength": 1,
          "maxLength": 2048
        }
      },
      "required": [
        "request_id",
        "target_id",
        "expected_revision",
        "action",
        "reason"
      ],
      "additionalProperties": false
    },
    "ConnectionPage": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ConnectionReport"
          },
          "maxItems": 500
        },
        "next_cursor": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2048
            },
            {
              "type": "null"
            }
          ]
        },
        "observed_at_ms": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "has_gaps": {
          "type": "boolean"
        }
      },
      "required": [
        "items",
        "next_cursor",
        "observed_at_ms",
        "has_gaps"
      ],
      "additionalProperties": false
    },
    "SourcePage": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SourceEndpoint"
          },
          "maxItems": 500
        },
        "next_cursor": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2048
            },
            {
              "type": "null"
            }
          ]
        },
        "observed_at_ms": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "has_gaps": {
          "type": "boolean"
        }
      },
      "required": [
        "items",
        "next_cursor",
        "observed_at_ms",
        "has_gaps"
      ],
      "additionalProperties": false
    },
    "PolicyPage": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PolicyRecord"
          },
          "maxItems": 500
        },
        "next_cursor": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2048
            },
            {
              "type": "null"
            }
          ]
        },
        "observed_at_ms": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "has_gaps": {
          "type": "boolean"
        },
        "config_revision": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "items",
        "next_cursor",
        "observed_at_ms",
        "has_gaps",
        "config_revision"
      ],
      "additionalProperties": false
    },
    "ResourceReport": {
      "type": "object",
      "properties": {
        "component_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "run_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "sequence": {
          "type": "string",
          "pattern": "^(0|[1-9][0-9]{0,18})$"
        },
        "sample_interval_ms": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "observed_age_ms": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "network_domain": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "network_bytes_per_second": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0
            },
            {
              "type": "null"
            }
          ]
        },
        "unique_bytes_per_second": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0
            },
            {
              "type": "null"
            }
          ]
        },
        "capacity_bytes_per_second": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0
            },
            {
              "type": "null"
            }
          ]
        },
        "capacity_basis": {
          "type": "string",
          "enum": [
            "configured",
            "estimated",
            "unknown"
          ]
        },
        "fd_limit": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "fd_used": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "memory_available_bytes": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "event_loop_lag_ms": {
          "anyOf": [
            {
              "type": "number",
              "minimum": 0
            },
            {
              "type": "null"
            }
          ]
        },
        "hash_queue_bytes": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ]
        },
        "storage_domains": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "domain_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[A-Za-z0-9_.:-]+$"
              },
              "pending_write_bytes": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "write_p95_ms": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "pressure_ratio": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "free_allocatable_bytes": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "domain_id",
              "pending_write_bytes",
              "write_p95_ms",
              "pressure_ratio",
              "free_allocatable_bytes"
            ],
            "additionalProperties": false
          },
          "maxItems": 64
        },
        "lost_samples": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "component_id",
        "run_id",
        "sequence",
        "sample_interval_ms",
        "observed_age_ms",
        "network_domain",
        "network_bytes_per_second",
        "unique_bytes_per_second",
        "capacity_bytes_per_second",
        "capacity_basis",
        "fd_limit",
        "fd_used",
        "memory_available_bytes",
        "event_loop_lag_ms",
        "hash_queue_bytes",
        "storage_domains",
        "lost_samples"
      ],
      "additionalProperties": false
    },
    "ComponentCapabilities": {
      "type": "object",
      "properties": {
        "component_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "engine_version": {
          "type": "string",
          "maxLength": 2048
        },
        "capability_revision": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "observed_fixture_id": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            },
            {
              "type": "null"
            }
          ]
        },
        "capabilities": {
          "type": "object",
          "properties": {
            "per_connection_identity": {
              "type": "string",
              "enum": [
                "native",
                "observed",
                "unsupported"
              ]
            },
            "service_eligibility": {
              "type": "string",
              "enum": [
                "native",
                "observed",
                "unsupported"
              ]
            },
            "per_peer_piece_map": {
              "type": "string",
              "enum": [
                "native",
                "observed",
                "unsupported"
              ]
            },
            "request_progress": {
              "type": "string",
              "enum": [
                "native",
                "observed",
                "unsupported"
              ]
            },
            "disconnect_connection": {
              "type": "string",
              "enum": [
                "native",
                "observed",
                "unsupported"
              ]
            },
            "avoid_content_source": {
              "type": "string",
              "enum": [
                "native",
                "observed",
                "unsupported"
              ]
            },
            "reversible_ban": {
              "type": "string",
              "enum": [
                "native",
                "observed",
                "unsupported"
              ]
            },
            "metadata_without_payload": {
              "type": "string",
              "enum": [
                "native",
                "observed",
                "unsupported"
              ]
            },
            "retain_queue_without_autostart": {
              "type": "string",
              "enum": [
                "native",
                "observed",
                "unsupported"
              ]
            }
          },
          "required": [
            "per_connection_identity",
            "service_eligibility",
            "per_peer_piece_map",
            "request_progress",
            "disconnect_connection",
            "avoid_content_source",
            "reversible_ban",
            "metadata_without_payload",
            "retain_queue_without_autostart"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "component_id",
        "engine_version",
        "capability_revision",
        "observed_fixture_id",
        "capabilities"
      ],
      "additionalProperties": false
    },
    "DiscoverCommand": {
      "type": "object",
      "properties": {
        "request_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "task_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "expected_task_revision": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "expected_run_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "config_revision": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "deadline_ms": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "action": {
          "const": "discover"
        },
        "content_key": {
          "type": "string",
          "minLength": 1,
          "maxLength": 2048
        },
        "realm": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "selection_digest": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "max_returned_sources": {
          "type": "integer",
          "minimum": 1,
          "maximum": 2048
        },
        "payload_allowed": {
          "const": false
        }
      },
      "required": [
        "request_id",
        "task_id",
        "expected_task_revision",
        "expected_run_id",
        "config_revision",
        "deadline_ms",
        "action",
        "content_key",
        "realm",
        "selection_digest",
        "max_returned_sources",
        "payload_allowed"
      ],
      "additionalProperties": false
    },
    "ProbeCommand": {
      "type": "object",
      "properties": {
        "request_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "task_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "expected_task_revision": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "expected_run_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "config_revision": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "deadline_ms": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "action": {
          "const": "probe_sources"
        },
        "source_ids": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_.:-]+$"
          },
          "maxItems": 2048
        },
        "dial_credit": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "memory_credit_bytes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "rate_tokens": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "release_task_local_on_finish": {
          "const": true
        },
        "preserve_valid_queue": {
          "const": true
        },
        "payload_allowed": {
          "const": false
        }
      },
      "required": [
        "request_id",
        "task_id",
        "expected_task_revision",
        "expected_run_id",
        "config_revision",
        "deadline_ms",
        "action",
        "source_ids",
        "dial_credit",
        "memory_credit_bytes",
        "rate_tokens",
        "release_task_local_on_finish",
        "preserve_valid_queue",
        "payload_allowed"
      ],
      "additionalProperties": false
    },
    "TrialCommand": {
      "type": "object",
      "properties": {
        "request_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "task_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "expected_task_revision": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "expected_run_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "config_revision": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "deadline_ms": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "action": {
          "const": "start_trial"
        },
        "source_snapshot_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "budget": {
          "$ref": "#/$defs/DownloadBudget"
        },
        "verification_extension_allowed": {
          "type": "boolean"
        }
      },
      "required": [
        "request_id",
        "task_id",
        "expected_task_revision",
        "expected_run_id",
        "config_revision",
        "deadline_ms",
        "action",
        "source_snapshot_id",
        "budget",
        "verification_extension_allowed"
      ],
      "additionalProperties": false
    },
    "PauseCommand": {
      "type": "object",
      "properties": {
        "request_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "task_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "expected_task_revision": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "expected_run_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "config_revision": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "deadline_ms": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "action": {
          "const": "pause_or_observe"
        },
        "reason_code": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "preserve_checkpoint": {
          "const": true
        },
        "preserve_queue_if_budgeted": {
          "type": "boolean"
        },
        "target_phase": {
          "type": "string",
          "enum": [
            "observing",
            "held"
          ]
        }
      },
      "required": [
        "request_id",
        "task_id",
        "expected_task_revision",
        "expected_run_id",
        "config_revision",
        "deadline_ms",
        "action",
        "reason_code",
        "preserve_checkpoint",
        "preserve_queue_if_budgeted",
        "target_phase"
      ],
      "additionalProperties": false
    },
    "BudgetCommand": {
      "type": "object",
      "properties": {
        "request_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "task_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "expected_task_revision": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "expected_run_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "config_revision": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "deadline_ms": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "action": {
          "const": "set_download_budget"
        },
        "budget": {
          "$ref": "#/$defs/DownloadBudget"
        }
      },
      "required": [
        "request_id",
        "task_id",
        "expected_task_revision",
        "expected_run_id",
        "config_revision",
        "deadline_ms",
        "action",
        "budget"
      ],
      "additionalProperties": false
    },
    "EngineAck": {
      "type": "object",
      "properties": {
        "request_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "task_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "component_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "run_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_.:-]+$"
        },
        "task_revision": {
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991
        },
        "outcome": {
          "type": "string",
          "enum": [
            "applied",
            "already_applied",
            "rejected",
            "unsupported",
            "unknown"
          ]
        },
        "effective_budget": {
          "anyOf": [
            {
              "$ref": "#/$defs/DownloadBudget"
            },
            {
              "type": "null"
            }
          ]
        },
        "reason_code": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_.:-]+$"
            },
            {
              "type": "null"
            }
          ]
        },
        "observed_at_ms": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        }
      },
      "required": [
        "request_id",
        "task_id",
        "component_id",
        "run_id",
        "task_revision",
        "outcome",
        "effective_budget",
        "reason_code",
        "observed_at_ms"
      ],
      "additionalProperties": false
    }
  },
  "anyOf": [
    {
      "$ref": "#/$defs/ConnectionReport"
    },
    {
      "$ref": "#/$defs/SourceSnapshot"
    },
    {
      "$ref": "#/$defs/DownloadBudget"
    },
    {
      "$ref": "#/$defs/ConnectionCommand"
    },
    {
      "$ref": "#/$defs/ResourceReport"
    },
    {
      "$ref": "#/$defs/ComponentCapabilities"
    },
    {
      "$ref": "#/$defs/Operation"
    },
    {
      "$ref": "#/$defs/PoolStatus"
    },
    {
      "$ref": "#/$defs/SourceCommand"
    },
    {
      "$ref": "#/$defs/PolicyRecord"
    },
    {
      "$ref": "#/$defs/PolicyCreate"
    },
    {
      "$ref": "#/$defs/PolicyRevoke"
    },
    {
      "$ref": "#/$defs/SourceEndpoint"
    },
    {
      "$ref": "#/$defs/DiscoverCommand"
    },
    {
      "$ref": "#/$defs/ProbeCommand"
    },
    {
      "$ref": "#/$defs/TrialCommand"
    },
    {
      "$ref": "#/$defs/PauseCommand"
    },
    {
      "$ref": "#/$defs/BudgetCommand"
    },
    {
      "$ref": "#/$defs/EngineAck"
    }
  ],
  "description": "endpoint が明示的な対象型を選択し、その $defs で検証する。最上位の anyOf は便宜上のものにすぎない。"
}
contracts/store-base.sql
-- P2P Downloader v2.2 の初期参考 schema。旧 v1/v2 DB のインプレース migration ではない。
-- 本番製品は修正済み SQLite(少なくとも 3.51.3 または照合済みの安全な backport)とローカルファイルシステムを固定する。
PRAGMA foreign_keys = ON;
PRAGMA journal_mode = WAL;
PRAGMA synchronous = FULL;
PRAGMA busy_timeout = 2500;

CREATE TABLE IF NOT EXISTS schema_migrations (
 version INTEGER PRIMARY KEY, applied_at_ms INTEGER NOT NULL, digest TEXT NOT NULL
) STRICT;
CREATE TABLE component_instances (
 component_id TEXT PRIMARY KEY, component_type TEXT NOT NULL, current_run_id TEXT,
 capability_json TEXT NOT NULL CHECK(json_valid(capability_json)),
 applied_config_revision INTEGER NOT NULL CHECK(applied_config_revision >= 0)
) STRICT;
CREATE TABLE tasks (
 task_id TEXT PRIMARY KEY, component_id TEXT NOT NULL REFERENCES component_instances,
 title TEXT NOT NULL, desired_state TEXT NOT NULL CHECK(desired_state IN ('running','paused','cancelled')),
 execution_state TEXT NOT NULL, placement_state TEXT NOT NULL DEFAULT 'none',
 availability_class TEXT NOT NULL DEFAULT 'unknown' CHECK(availability_class IN ('high','available','unknown','incomplete','low')),
 auto_priority INTEGER NOT NULL DEFAULT 550 CHECK(auto_priority BETWEEN 0 AND 999),
 protected INTEGER NOT NULL DEFAULT 0 CHECK(protected IN (0,1)),
 revision INTEGER NOT NULL DEFAULT 1 CHECK(revision > 0),
 selection_digest TEXT NOT NULL, scope_key TEXT NOT NULL,
 total_selected_bytes INTEGER CHECK(total_selected_bytes >= 0),
 verified_durable_bytes INTEGER NOT NULL DEFAULT 0 CHECK(verified_durable_bytes >= 0),
 allocated_bytes INTEGER CHECK(allocated_bytes >= 0),
 eligible_wait_ms INTEGER NOT NULL DEFAULT 0 CHECK(eligible_wait_ms >= 0),
 last_service_at_ms INTEGER, last_useful_progress_at_ms INTEGER,
 next_probe_at_ms INTEGER, created_at_ms INTEGER NOT NULL,
 CHECK(total_selected_bytes IS NULL OR verified_durable_bytes <= total_selected_bytes)
) STRICT;
CREATE INDEX tasks_dispatch ON tasks(component_id,desired_state,execution_state,auto_priority,created_at_ms);
CREATE INDEX tasks_probe_due ON tasks(next_probe_at_ms,task_id) WHERE desired_state='running';
CREATE TABLE content_keys (
 task_id TEXT NOT NULL REFERENCES tasks, namespace TEXT NOT NULL, algorithm TEXT NOT NULL,
 digest TEXT NOT NULL, scope_key TEXT NOT NULL,
 strength TEXT NOT NULL CHECK(strength IN ('strong_native','verified_equivalence','locator','candidate')),
 PRIMARY KEY(task_id,namespace,algorithm,digest,scope_key)
) STRICT;
CREATE INDEX content_keys_lookup ON content_keys(namespace,algorithm,digest,scope_key);
CREATE TABLE attempts (
 attempt_id TEXT PRIMARY KEY, task_id TEXT NOT NULL REFERENCES tasks, run_id TEXT,
 outcome TEXT NOT NULL, started_at_ms INTEGER NOT NULL, ended_at_ms INTEGER, reason_code TEXT
) STRICT;
CREATE TABLE active_claims (
 claim_id TEXT PRIMARY KEY, claim_key TEXT NOT NULL, task_id TEXT NOT NULL REFERENCES tasks,
 attempt_id TEXT REFERENCES attempts, active INTEGER NOT NULL CHECK(active IN (0,1))
) STRICT;
CREATE UNIQUE INDEX one_active_claim ON active_claims(claim_key) WHERE active=1;
CREATE TABLE native_jobs (
 mapping_id TEXT PRIMARY KEY, task_id TEXT NOT NULL REFERENCES tasks,
 component_id TEXT NOT NULL REFERENCES component_instances, run_id TEXT NOT NULL,
 native_job_id TEXT NOT NULL, mapping_state TEXT NOT NULL,
 UNIQUE(component_id,run_id,native_job_id)
) STRICT;
CREATE TABLE operations (
 operation_id TEXT PRIMARY KEY, request_id TEXT NOT NULL UNIQUE, task_id TEXT REFERENCES tasks,
 action TEXT NOT NULL, payload_digest TEXT NOT NULL, state TEXT NOT NULL,
 expected_revision INTEGER, created_at_ms INTEGER NOT NULL, completed_at_ms INTEGER
) STRICT;
CREATE TABLE command_outbox (
 command_id TEXT PRIMARY KEY, operation_id TEXT NOT NULL REFERENCES operations,
 task_id TEXT NOT NULL REFERENCES tasks, expected_run_id TEXT NOT NULL,
 expected_revision INTEGER NOT NULL, config_revision INTEGER NOT NULL,
 payload_json TEXT NOT NULL CHECK(json_valid(payload_json)),
 state TEXT NOT NULL CHECK(state IN ('pending','sent','acknowledged','unknown','reconciled','rejected')),
 created_at_ms INTEGER NOT NULL
) STRICT;
CREATE INDEX outbox_pending ON command_outbox(state,created_at_ms);
CREATE TABLE resource_leases (
 lease_id TEXT PRIMARY KEY, task_id TEXT REFERENCES tasks, component_id TEXT NOT NULL REFERENCES component_instances,
 run_id TEXT NOT NULL, generation INTEGER NOT NULL CHECK(generation>0), mode TEXT NOT NULL,
 reservation_json TEXT NOT NULL CHECK(json_valid(reservation_json)),
 enforcement TEXT NOT NULL CHECK(enforcement IN ('hard_native','soft_observed','unsupported')),
 state TEXT NOT NULL CHECK(state IN ('reserved','active','draining','unknown','released')),
 expires_at_ms INTEGER NOT NULL, stopped_confirmed_at_ms INTEGER
) STRICT;
CREATE INDEX leases_accounting ON resource_leases(state,component_id);
CREATE TABLE probe_runs (
 probe_id TEXT PRIMARY KEY, task_id TEXT NOT NULL REFERENCES tasks, run_id TEXT NOT NULL,
 level TEXT NOT NULL, started_at_ms INTEGER NOT NULL, ended_at_ms INTEGER,
 qualified INTEGER NOT NULL CHECK(qualified IN (0,1)), outcome TEXT NOT NULL,
 evidence_json TEXT NOT NULL CHECK(json_valid(evidence_json))
) STRICT;
CREATE INDEX probe_task_time ON probe_runs(task_id,started_at_ms);
CREATE TABLE resource_assessments (
 task_id TEXT PRIMARY KEY REFERENCES tasks, source_run_id TEXT NOT NULL, report_seq INTEGER NOT NULL,
 assessed_at_ms INTEGER NOT NULL, expires_at_ms INTEGER NOT NULL,
 coverage_scope TEXT NOT NULL, quality TEXT NOT NULL,
 summary_json TEXT NOT NULL CHECK(json_valid(summary_json)), config_revision INTEGER NOT NULL
) STRICT;
CREATE TABLE scheduler_decisions (
 decision_id INTEGER PRIMARY KEY, task_id TEXT NOT NULL REFERENCES tasks,
 decision_type TEXT NOT NULL, priority INTEGER CHECK(priority BETWEEN 0 AND 999),
 reasons_json TEXT NOT NULL CHECK(json_valid(reasons_json)),
 config_revision INTEGER NOT NULL, input_report_seq INTEGER, created_at_ms INTEGER NOT NULL
) STRICT;
CREATE TABLE domain_events (
 event_seq INTEGER PRIMARY KEY AUTOINCREMENT, event_id TEXT NOT NULL UNIQUE,
 task_id TEXT REFERENCES tasks, attempt_id TEXT REFERENCES attempts,
 component_id TEXT, run_id TEXT, producer_seq INTEGER,
 event_type TEXT NOT NULL, payload_json TEXT NOT NULL CHECK(json_valid(payload_json)),
 committed_at_ms INTEGER NOT NULL,
 UNIQUE(component_id,run_id,producer_seq)
) STRICT;
CREATE INDEX events_task_cursor ON domain_events(task_id,event_seq);
CREATE TABLE volumes (
 volume_id TEXT PRIMARY KEY, root_path TEXT NOT NULL, filesystem_identity TEXT NOT NULL,
 storage_policy_revision INTEGER NOT NULL
) STRICT;
CREATE TABLE task_storage (
 task_id TEXT PRIMARY KEY REFERENCES tasks, volume_id TEXT NOT NULL REFERENCES volumes,
 storage_key TEXT NOT NULL CHECK(length(storage_key)=64), layout_version INTEGER NOT NULL,
 relative_path TEXT NOT NULL, payload_created INTEGER NOT NULL CHECK(payload_created IN (0,1)),
 native_checkpoint_ref TEXT, checkpoint_digest TEXT,
 logical_bytes INTEGER CHECK(logical_bytes>=0), allocated_bytes INTEGER CHECK(allocated_bytes>=0),
 accounted_at_ms INTEGER
) STRICT;
CREATE TABLE artifacts (
 artifact_id TEXT PRIMARY KEY, task_id TEXT NOT NULL REFERENCES tasks,
 volume_id TEXT NOT NULL REFERENCES volumes, relative_path TEXT NOT NULL,
 selection_digest TEXT NOT NULL, verification_level TEXT NOT NULL,
 presence TEXT NOT NULL CHECK(presence IN ('present','missing','changed','unchecked','deleted')),
 placement_state TEXT NOT NULL, manifest_digest TEXT NOT NULL, verified_at_ms INTEGER,
 UNIQUE(volume_id,relative_path)
) STRICT;
CREATE TABLE artifact_refs (
 artifact_id TEXT NOT NULL REFERENCES artifacts, owner_kind TEXT NOT NULL, owner_id TEXT NOT NULL,
 state TEXT NOT NULL, PRIMARY KEY(artifact_id,owner_kind,owner_id)
) STRICT;
CREATE TABLE file_operations (
 file_op_id TEXT PRIMARY KEY, task_id TEXT NOT NULL REFERENCES tasks, request_id TEXT NOT NULL UNIQUE,
 kind TEXT NOT NULL CHECK(kind IN ('publish','move','quarantine','restore','purge')),
 phase TEXT NOT NULL, expected_task_revision INTEGER NOT NULL,
 source_volume_id TEXT NOT NULL REFERENCES volumes, destination_volume_id TEXT REFERENCES volumes,
 source_path TEXT NOT NULL, destination_path TEXT,
 source_fingerprint TEXT NOT NULL, manifest_digest TEXT NOT NULL,
 copied_bytes INTEGER NOT NULL DEFAULT 0 CHECK(copied_bytes>=0),
 policy_revision INTEGER NOT NULL, created_at_ms INTEGER NOT NULL, updated_at_ms INTEGER NOT NULL
) STRICT;
CREATE INDEX file_operations_pending ON file_operations(phase,updated_at_ms);
CREATE TABLE dead_candidates (
 task_id TEXT PRIMARY KEY REFERENCES tasks, qualified_rounds INTEGER NOT NULL,
 distinct_probe_days INTEGER NOT NULL, reason_code TEXT NOT NULL,
 candidate_at_ms INTEGER NOT NULL, quarantined_at_ms INTEGER, delete_not_before_ms INTEGER,
 policy_revision INTEGER NOT NULL, stale INTEGER NOT NULL DEFAULT 0 CHECK(stale IN (0,1))
) STRICT;
CREATE INDEX cleanup_due ON dead_candidates(delete_not_before_ms,task_id) WHERE stale=0;
CREATE TABLE history_tombstones (
 tombstone_id TEXT PRIMARY KEY, task_id TEXT NOT NULL REFERENCES tasks,
 native_keys_json TEXT NOT NULL CHECK(json_valid(native_keys_json)),
 outcome TEXT NOT NULL, deleted_bytes INTEGER NOT NULL CHECK(deleted_bytes>=0),
 reason_code TEXT NOT NULL, policy_revision INTEGER NOT NULL, created_at_ms INTEGER NOT NULL
) STRICT;
-- 毎秒トラフィック、peer リスト履歴、国分布、RTT などは core DB に書かず、P2P Metrics の独自 DB に保存する。
-- 各 token pool の vector 検査と lease + outbox の作成は、同じ BEGIN IMMEDIATE 内で完了する。
contracts/store-v23.sql
-- v2.2 reference schema の追加型 migration。先にバックアップコピーで baseline schema hash を照合する。
-- このファイルは payload に触れず、履歴を削除せず、user_version を独自に変更しない。migration runner が同じトランザクションでバージョンを記録する。
CREATE TABLE discovery_targets (
 task_id TEXT PRIMARY KEY REFERENCES tasks(task_id),
 phase TEXT NOT NULL CHECK(phase IN ('collecting','rank_ready','trial','active','observing','held','finished')),
 observation_reason TEXT, eligibility_at_ms INTEGER, revision INTEGER NOT NULL DEFAULT 1 CHECK(revision>0),
 qualified_wait_ms INTEGER NOT NULL DEFAULT 0 CHECK(qualified_wait_ms>=0)
) STRICT;
CREATE INDEX discovery_due ON discovery_targets(phase,eligibility_at_ms,task_id);
CREATE TABLE source_snapshots (
 snapshot_id TEXT PRIMARY KEY, task_id TEXT NOT NULL REFERENCES tasks,
 source_id TEXT NOT NULL, realm TEXT NOT NULL, run_id TEXT NOT NULL,
 sequence INTEGER NOT NULL CHECK(sequence>=0), selection_digest TEXT NOT NULL, observation_ms INTEGER NOT NULL, expires_ms INTEGER NOT NULL,
 completeness TEXT NOT NULL CHECK(completeness IN ('complete','partial','unknown')),
 evidence_json TEXT NOT NULL CHECK(json_valid(evidence_json)),
 UNIQUE(task_id,source_id,run_id,sequence), CHECK(expires_ms>=observation_ms)
) STRICT;
CREATE INDEX snapshots_lookup ON source_snapshots(task_id,expires_ms);
CREATE TABLE connection_identities (
 connection_id TEXT PRIMARY KEY, component_id TEXT NOT NULL REFERENCES component_instances,
 run_id TEXT NOT NULL, native_connection_key TEXT NOT NULL, transport_handle_id TEXT NOT NULL, realm TEXT NOT NULL,
 role TEXT NOT NULL, source_key TEXT NOT NULL, task_id TEXT REFERENCES tasks,
 opened_ms INTEGER NOT NULL, closed_ms INTEGER, last_sample_seq INTEGER,
 close_reason TEXT, CHECK(closed_ms IS NULL OR closed_ms>=opened_ms),
 UNIQUE(component_id,run_id,native_connection_key,opened_ms)
) STRICT;
CREATE TABLE connection_evidence (
 evidence_id TEXT PRIMARY KEY, connection_id TEXT REFERENCES connection_identities,
 task_id TEXT REFERENCES tasks, classification TEXT NOT NULL, reason_code TEXT NOT NULL,
 evidence_strength TEXT NOT NULL CHECK(evidence_strength IN ('observed','attributed','suspected','unknown')),
 sample_digest TEXT NOT NULL, evidence_json TEXT NOT NULL CHECK(json_valid(evidence_json)),
 config_revision INTEGER NOT NULL, created_ms INTEGER NOT NULL
) STRICT;
CREATE TABLE connection_policies (
 policy_id TEXT PRIMARY KEY, realm TEXT NOT NULL, target_kind TEXT NOT NULL,
 target_key TEXT NOT NULL, content_scope TEXT,
 action TEXT NOT NULL CHECK(action IN ('avoid','quarantine','manual_deny','allow_override')),
 state TEXT NOT NULL CHECK(state IN ('pending','enforced','expired','revoked','unknown','unsupported')),
 strikes INTEGER NOT NULL CHECK(strikes>=0), expires_ms INTEGER,
 evidence_id TEXT NOT NULL REFERENCES connection_evidence,
 revision INTEGER NOT NULL DEFAULT 1, created_ms INTEGER NOT NULL,
 CHECK(action='manual_deny' OR expires_ms IS NOT NULL), CHECK(revision>0)
) STRICT;
CREATE INDEX policies_target ON connection_policies(realm,target_kind,target_key,expires_ms);
CREATE TABLE connection_commands (
 command_id TEXT PRIMARY KEY, operation_id TEXT NOT NULL UNIQUE REFERENCES operations, request_id TEXT NOT NULL UNIQUE, payload_digest TEXT NOT NULL,
 connection_id TEXT NOT NULL REFERENCES connection_identities, expected_run_id TEXT NOT NULL,
 expected_policy_revision INTEGER NOT NULL, task_id TEXT REFERENCES tasks, action TEXT NOT NULL, scope TEXT NOT NULL,
 evidence_id TEXT REFERENCES connection_evidence,
 outcome TEXT NOT NULL CHECK(outcome IN ('pending','sent','applied','already_closed','unsupported_scope','stale_target','unknown','failed')),
 created_ms INTEGER NOT NULL, observed_ms INTEGER
) STRICT;
CREATE TABLE catalog_feeds (
 feed_id TEXT PRIMARY KEY, uri TEXT NOT NULL, lineage_group TEXT NOT NULL, enabled INTEGER NOT NULL CHECK(enabled IN (0,1)),
 approved_config_revision INTEGER NOT NULL, last_good_digest TEXT, last_checked_ms INTEGER,
 status TEXT NOT NULL
) STRICT;
CREATE TABLE catalog_revisions (
 revision_id TEXT PRIMARY KEY, feed_id TEXT NOT NULL REFERENCES catalog_feeds,
 content_digest TEXT NOT NULL, status TEXT NOT NULL CHECK(status IN ('staged','validated','rejected','published','withdrawn')),
 source_etag TEXT, fetched_ms INTEGER NOT NULL, diff_json TEXT NOT NULL CHECK(json_valid(diff_json)),
 UNIQUE(feed_id,content_digest)
) STRICT;
CREATE TABLE catalog_endpoints (
 endpoint_id TEXT PRIMARY KEY, canonical_uri TEXT NOT NULL, realm TEXT NOT NULL, kind TEXT NOT NULL,
 state TEXT NOT NULL CHECK(state IN ('candidate','validated','probing','usable_observed','quarantined','retired','manual_review')),
 first_seen_ms INTEGER NOT NULL, last_seen_ms INTEGER NOT NULL, next_probe_ms INTEGER,
 risk_state TEXT NOT NULL DEFAULT 'unknown', UNIQUE(realm,kind,canonical_uri)
) STRICT;
CREATE TABLE catalog_provenance (
 endpoint_id TEXT NOT NULL REFERENCES catalog_endpoints, revision_id TEXT NOT NULL REFERENCES catalog_revisions,
 source_line INTEGER CHECK(source_line>0), PRIMARY KEY(endpoint_id,revision_id)
) STRICT;
-- 現在の接続状態/履歴の高頻度時系列は、引き続き P2P Metrics が担当する。
-- Store はライフサイクルのインデックス、判断の根拠となる証拠、永続コマンドだけを保持する。
CREATE TABLE connection_tasks (
 connection_id TEXT NOT NULL REFERENCES connection_identities,
 task_id TEXT NOT NULL REFERENCES tasks,
 PRIMARY KEY(connection_id,task_id)
) STRICT;

-- 接続から独立した/手動のポリシー変更にも、稼働中の接続なしで使える永続コマンド経路が必要。
CREATE TABLE policy_commands (
 command_id TEXT PRIMARY KEY, operation_id TEXT NOT NULL UNIQUE REFERENCES operations,
 request_id TEXT NOT NULL UNIQUE, policy_id TEXT NOT NULL REFERENCES connection_policies,
 expected_revision INTEGER NOT NULL CHECK(expected_revision>0),
 payload_json TEXT NOT NULL CHECK(json_valid(payload_json)),
 outcome TEXT NOT NULL CHECK(outcome IN ('pending','sent','applied','unsupported_scope','unknown','failed')),
 created_ms INTEGER NOT NULL, observed_ms INTEGER
) STRICT;
examples/avoid-command.json
{
  "schema_version": "2.3",
  "request_id": "req_example_18",
  "connection_id": "conn_example_17",
  "expected_run_id": "run_example_4",
  "expected_policy_revision": 3,
  "action": "avoid",
  "scope": "realm_content_source",
  "automatic": true,
  "duration_ms": 60000,
  "evidence_id": "evidence_example_5",
  "reason_code": "QUALIFIED_NO_PAYLOAD",
  "task_id": "task_1"
}
examples/connection-report.json
{
  "schema_version": "2.3",
  "identity": {
    "connection_id": "conn_example_17",
    "component_id": "mule_1",
    "run_id": "run_example_4",
    "native_connection_key": "socket17",
    "transport_handle_id": "transport17",
    "realm": "ed2k",
    "task_ids": [
      "task_1"
    ]
  },
  "sequence": "10",
  "sample_interval_ms": 1000,
  "observed_age_ms": 50,
  "reporting": "exact",
  "role": "payload",
  "endpoint": "example-not-dialed:4662",
  "country": null,
  "country_source": null,
  "peer_id": "claimed_example",
  "identity_strength": "claimed",
  "remote_choked": false,
  "remote_queued": false,
  "service_expected": true,
  "outstanding_requests": 2,
  "queued_disk_bytes": "0",
  "local_blocked": false,
  "delta_payload_bytes": 0,
  "delta_unique_bytes": 0,
  "delta_verified_bytes": 0,
  "rtt_ms": 80,
  "rtt_method": "transport_sample",
  "qualified_idle_ms": 35000,
  "missing_reason": null,
  "native_state": {
    "handshake_complete": true,
    "interested": true,
    "needed_overlap": true,
    "slot_granted": true,
    "remote_queue_rank": null,
    "receive_credit_bytes": 1048576,
    "service_generation": "service_3",
    "protocol_deadline_ms": 30000,
    "common_path_outage": false,
    "enforcement_capabilities": [
      "disconnect_connection",
      "avoid_content_source"
    ]
  },
  "performance": {
    "ttfb_ms": null,
    "request_p50_ms": null,
    "request_p95_ms": null,
    "delta_duplicate_bytes": 0,
    "delta_discarded_bytes": 0,
    "upload_payload_bytes_per_second": 0,
    "payload_bytes_per_second": 0,
    "unique_bytes_per_second": 0,
    "country_db_version": null,
    "asn": null,
    "native_id_class": "high_id_claimed",
    "integrity_attribution": "none"
  }
}
examples/manual-policy.json
{
  "request_id": "req_manual_7",
  "expected_revision": 3,
  "action": "manual_deny",
  "scope": "realm_content_source",
  "realm": "ed2k",
  "target_key": "source_example",
  "content_key": "content_example",
  "expires_at_ms": null,
  "reason": "手動指定の例。実 endpoint が悪意を持つことを示すものではない"
}
examples/pool-status.json
{
  "policy_revision": 3,
  "active_tasks": 5,
  "trial_tasks": 2,
  "observing_tasks": 18,
  "collecting_tasks": 975,
  "network_capacity_bytes_per_second": 100000000,
  "capacity_basis": "configured",
  "utilization": 0.5,
  "local_pressure": 0.2,
  "control_action": "trial_more",
  "reason_code": "NETWORK_HEADROOM",
  "samples_fresh": true,
  "registered_tasks": 1000,
  "rank_ready_tasks": 0,
  "held_tasks": 0,
  "finished_tasks": 0
}
examples/trial-command.json
{
  "request_id": "req_trial_1",
  "task_id": "task_1",
  "expected_task_revision": 1,
  "expected_run_id": "run_example_4",
  "config_revision": 3,
  "deadline_ms": 1790982000000,
  "action": "start_trial",
  "source_snapshot_id": "snapshot_1",
  "budget": {
    "task_id": "task_1",
    "run_id": "run_example_4",
    "generation": 3,
    "network_domain": "link_a",
    "storage_domain": "ssd_a",
    "mode": "trial",
    "network_bytes_per_second": 2097152,
    "write_window_bytes": 4194304,
    "memory_bytes": 8388608,
    "peer_credit": 2,
    "expires_at_ms": 1790982000000,
    "enforcement": "hard_native"
  },
  "verification_extension_allowed": true
}