Skip to content

id(comms): budgets — app-wide, per-IP, per-ID, and per-counterparty overrides (P1 of #2032) #2247

Open

Description

@dezren39

From the #2032 investigation (record). Blocked by #2244 (counters must exist before a budget can be evaluated).

Problem

The issue's requirement is "configurable budgets — max MB per window across the whole app, per IP, or per ID, and message/MB caps for a SPECIFIC counterparty, not just any counterparty". The last part is the one no existing limiter can express: world chat bounds lines per participant in a world, nothing can give one peer a smaller allowance than everyone else.

Work

  • Rolling-window byte budgets: app-wide inbound 32 MiB/s / 20 GiB/h, outbound 64 MiB/s / 40 GiB/h; per peer 100 MiB/h burst 8 MiB/min; per IP 250 MiB/h (direct connections only).
  • Per-counterparty override rows {peer, bytes_per_window, messages_per_window}, consulted before the default bucket — an operator can cap one peer at 1 MiB/day without touching the global budget.
  • Configuration in id-server-config.toml (server_config/parse.rs), defaults in code so an unchanged config behaves as today.
  • Budget exhaustion is a budget_exhausted refusal with retry_after_ms (from id(comms): per-peer frame/byte accounting + structured rate-limit refusal (P0 of #2032) #2244), not a disconnect.

Done when

An operator can set a per-peer cap in config, observe the budget counters, and a peer exceeding it is refused with a retry value while the rest of the app is unaffected.

Parent: #2056 · Investigation: #2032 · Synthesis: #2033

Activity

  1. added
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Oct 29, 2026
  2. developing-today commented on Oct 29, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: handed_off
    task: 5936 (repo-health-code-pilot, openchamber scheduled lane)
    state: queued; not_before=2026-11-01T22:30:00Z
    next: revalidate #2244/#3882/PR #3960; park if P0-A integration is still open or blocked.
    dedupe: repo-health:v1:fix:developing-today/code:issue:2247

  4. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor
  5. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    queue/claimedQueue worker lifecycle state
    on Nov 1, 2026
  6. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    agent-note:v1 — parked — OpenChamber scheduled lane

  7. 235 remaining items

  8. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    queue/claimedQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 4, 2026
  9. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  10. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  11. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    on Nov 4, 2026
  12. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked

  13. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  14. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)queue/parkedQueue task is parked (waiting on CI, time, or an event)source/creatorFiled by the new-issue-creator jobstatus/parkedDeliberately paused with a recorded resume conditiontask/triageQueue packet kind: verify, reproduce, and route this itemwork/assignedQueue worker lifecycle state

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions