Expose complete scoped AgentOS limit usage for observability
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- rust, typescript, wasm
調査の方向性
まず VmLimits と QueueRegistry を監査し、次に TypeScript core、Rust client、actor package にある既存の NodeRuntime.getResourceSnapshot() の transport と AgentOs API を追跡します。各 limit をその descriptor と usage source に対応付け、その後 acceptance criteria を使って、完全な結果、認可されたスコープ、audit coverage、parity、および複数 VM 間の leakage テストを検証します。
索引モデルが issue の本文から書いたものです。
説明
Problem
AgentOS has two centralized limit mechanisms today:
VmLimitsis the authoritative sidecar-owned configuration and enforcement surface.QueueRegistrytracks live usage for manually registered gauges and producesdepth,high_water,capacity, andfill_percentsnapshots.
The existing get_resource_snapshot path exposes the registered gauges, but it does not represent every configured limit. The registry currently covers selected queues, kernel resources, V8 budgets, and WASM budgets. There is no automatic descriptor/catalog connection between a VmLimits field and its observable usage.
The snapshot also reads from a process-global registry whose entries do not carry scope or VM identity. A VM-addressed request therefore cannot reliably distinguish VM-local gauges from sidecar-wide gauges when a sidecar hosts multiple VMs.
Missing measurable usage
Audit and register live usage where it is meaningful, including at least:
- ACP sessions, prompts, retained history bytes/events, and pending permissions
- JavaScript timers
- reactor capabilities, ready handles, tasks, bridge calls, async completions, and blocking jobs/bytes
- UDP buffered datagrams/bytes
- TLS buffered bytes
- HTTP/2 connections, streams, pending commands/events, and buffered/header/data bytes
- any other count/byte limit with durable current usage that is enforced through
VmLimits
Non-gauge limits
Some configured limits do not have meaningful persistent usage, including per-operation payload caps, page sizes, work quanta, and inactive deadlines. These should still appear in an authoritative limit catalog with their configured capacity and measurement semantics, while reporting live usage as unavailable rather than inventing a percentage.
Example shape:
interface LimitUsage {
name: string;
configurationPath: string;
category: "queue" | "resource" | "memory" | "cpu" | "deadline" | "payload";
scope: "sidecar" | "vm" | "session" | "process" | "capability" | "connection" | "stream";
unit: "items" | "bytes" | "milliseconds" | "tasks" | "connections" | "streams";
capacity: number;
currentUsage: number | null;
highWater: number | null;
fillPercent: number | null;
measurement: "gauge" | "per_operation" | "deadline" | "quantum";
}
The exact wire shape can differ, but the sidecar must remain the single source of truth.
Scope and security
- Associate registered gauges with their owning scope and VM where applicable.
- A VM-scoped snapshot must not expose another VM's usage or identities.
- Sidecar-wide aggregate usage should be available only through an explicitly host-authorized observability surface.
- Preserve the design requirement that guest-visible diagnostics cannot become a cross-tenant occupancy oracle.
Public API
Expose the resulting snapshot with behavioral parity across:
AgentOs.getResourceSnapshot()in@rivet-dev/agentos-core- the Rust
AgentOsclient - a
getResourceSnapshotaction in@rivet-dev/agentos
@rivet-dev/agentos-runtime-core already has the lower-level transport and NodeRuntime.getResourceSnapshot() implementation; product users should not need to depend on that implementation package directly.
Acceptance criteria
- Every
VmLimitsfield has one canonical runtime descriptor containing its configuration path, category, unit, scope, and measurement semantics. - Every meaningfully measurable count/byte/budget limit is connected to live usage and high-water accounting.
- Non-gauge limits are returned with configured values and nullable usage/percentage.
- VM-addressed snapshots contain only that VM's data plus explicitly labeled, authorized sidecar aggregates.
- TypeScript core, Rust client, and actor APIs expose equivalent JSON-serializable results.
- The limits audit fails when a new operator-facing limit lacks a descriptor, and fails when a measurable limit lacks accounting.
- Tests cover multiple VMs in one shared sidecar and prove there is no cross-VM leakage.
- Resource-limit documentation is updated to distinguish configured limits, measurable gauges, and non-gauge enforcement limits.
This enables an inspector page to render the complete limit inventory directly from the API without maintaining a separate UI mapping.
- 主要言語
- Rust
- スター
- 4.8k
- フォーク
- 266
- 平均マージ
- 7時間 36分
- マージ済み PR(30日)
- 38
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rivet-dev/agentos のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
rivet-dev/agentos#2042 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 18/100
rivet-dev/agentos#2027 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Python edits to filesystem.writeFile-created files are reverted by shadow reconciliation対応中かも @ankssjain が 11 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
rivet-dev/agentos#2022 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 半日 初心者へのやさしさ 32/100
rivet-dev/agentos#2020 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
rivet-dev/agentos の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
AimesSoft/NipaPlay-Reload#1022 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ZcashFoundation/frost-tools#612 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
ScoopInstaller/Extras#19070 ·
メンテナーはふだん 1 日以内に返信
-
test: sim_zero_omega_tests race on shared temp-file names, so two pairs of tests fail at randomオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100