[PIR][WP33] Adaptive runtime monitoring with VoI escalation (ADR-337)
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 42/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- rust
調査の方向性
crates/mcp-gate/ から始めて crates/ruvector-tiny-dancer-core/src/voi.rs を読み、特に decide()、observe()、および検証の動作を確認してください。ラダーとその計上方法を定義する前に、既存の mcp-gate のエントリーポイントをたどってください。無条件の検査リグレッションテスト、cargo nextest run -p mcp-gate、セキュリティスキャンを含む受け入れチェックに合格すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Part of the PIR program epic #837. See 12-wave5-evidence-review.md and 13-wave5-program-plan.md. ADRs land via #911.
The hard part already shipped in Wave 4
crates/ruvector-tiny-dancer-core/src/voi.rs (ADR-331, WP28, merged) was written with this exact use case named in its own module docstring:
"
decideis a standalone pure function so the same primitive can gate model selection..., retrieval depth, verifier invocations, agent spawning, and escalation. Only the router integration is implemented here; the others are expected to construct their ownEstimatorSpecladders over the same API."
The mapping is one-to-one: each EstimatorSpec { cost, latency_us, noise_std } is one investigator rung — cheap/noisy first, expensive/sharp last. The purchase inequality value_of_success × VoI − cost > 0 is "investigate when P(violation) × damage > verification cost". observe() does the Bayesian update between rungs.
Consume it unchanged. Reimplementing the closed form inside mcp-gate is exactly the "more independent primitives instead of strengthening the substrate" failure the Wave-5 briefing names.
Ladder
stream → cheap detector → risk score — low continues; medium buys a local verifier; high buys a strong-model investigator; critical stops execution via RVM.
Greenfield here: the detector, risk-score plumbing, ladder wiring, per-rung cost accounting. crates/mcp-gate/ is the mount point.
Four binding caveats, each documented in voi.rs and each a real failure mode
- Every rung must have
cost > 0, or cap the rounds.EstimatorSpec::validatepermitscost == 0, and a free rung is bought forever — the docstring records a probe running 100,000 rounds still returningBuy. A monitoring ladder that never terminates is a self-inflicted DoS. - A
noise_std == 0rung is an oracle — take its verdict and EXIT.decide()may returnBuyfor it;observe()deliberately refuses it. Piping an oracle purchase intoobserveis a contract violation. value_of_successmust be the currency value of catching a real violation. VoI is bounded by ≈0.4σ; left at a nominal 1.0 the gate degenerates into a never-investigate switch that still looks configured — identical to the calibration hazard ADR-331 records for routing.- Rescale utilities to unit range. A&S 7.1.26
norm_cdf(abs. err ≤ 1.5e-7) biases one-directionally in the deep tail, toward worthless purchases.
Blocking: the unconditional-inspection floor is not subject to the economics
Privilege escalation, network access, credential use, runtime mutation, and destructive operations are inspected ALWAYS, whatever the VoI computation returns. The economics govern discretionary investigation only. This is the monitoring analog of ADR-331's escalate-only invariant — the failure direction must be conservative by construction, because a monitoring gate that decides not to investigate is a gate that can fail open.
Regression test: configure an economics that would suppress all discretionary investigation, assert the five classes are still inspected.
Cost target — a goal, not a claim
Under 5% average monitoring overhead, measured against a real unmonitored baseline on the identical path, with downgrade-only accounting (a skipped or partial inspection may never be scored as a completed one — the 5% cannot be achieved by accounting).
Do not compare this to OpenAI's ~20%. Their figure's denominator is "the inference compute being monitored" — a deliberately narrow, risk-selected slice (RL training + evals with tools for Sol-capability-or-higher; extended Aug 7 to all Astra inference with tools). Ours would be broader. The two numbers are not comparable and this WP does not claim to beat theirs.
Also worth adopting: OpenAI's 30-minute fail-closed alerting SLO — an uncleared critical flag pauses the activity. Window configurable; fail-closed direction is not.
Scope boundary + name warning
Token-level stream inspection belongs in ruvnet/midstream (external), not here. Note ruvector's own crates/mcp-brain-server/src/midstream.rs is the pi.ruv.io brain AGI-diagnostics subsystem (ADR-077/078) — a different thing sharing the name. Do not conflate.
Acceptance
- Ladder consumes
voi::decidewith no forked math - All four caveats enforced at ladder construction, not first use
- Unconditional floor regression-tested
- Non-finite surviving a clamp resolves toward investigating, never skipping
cargo nextest run -p mcp-gate+npx @claude-flow/cli@latest security scan
Depends on: WP28 (merged). Repo: ruvnet/ruvector.
- 主要言語
- Rust
- スター
- 4.6k
- フォーク
- 621
- 平均マージ
- 2日 10時間
- マージ済み PR(30日)
- 40
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ruvnet/RuVector のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 71/100
ruvnet/RuVector#1179 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 2 日以内に返信
-
RVF SDK: deleteByFilter omits required native filter fields対応中かも @rudycelekli が 32 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
RVF SDK: WASM queries override the configured metric with L2対応中かも @rudycelekli が 32 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 2 日以内に返信
-
`rvf-manifest` pulls in `std` transitively via `crc32c`対応中かも @rudycelekli が 34 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 2 日以内に返信
ruvnet/RuVector の issue をすべて見る
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 70/100
OpenZeppelin/openzeppelin-relayer#967 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
src/runs.rs:1987: a missing --source-run-id now answers 400 "Source run ... does not exist", not 404オープンnightly-audit
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
antithesishq/snouty#602 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
libnativeapi/nativeapi#21 ·