Skip to content

id(comms): P0-A integration — frame-seam charging, HTTP 429+Retry-After, chat limiter consumer, counter visibility (phase of #2244) #3882

Closed

Description

@dezren39

Phase of #2244 (P0-A integration, per the #2033 design in PR #3834). Sequenced AFTER the P0-A core phase issue (shared abuse evaluator + structured refusal + counter registry) lands. Triage record: task 5839 on #2244.

Wire the shared evaluator into the real paths — this phase delivers #2244's Done-when:

  • Charge counters at the frames.rs seam: read_frame (L150–165) charges after the length prefix and before body allocation/decode; the write path charges via the encode_frame/write_frame funnel (L27–39); adapters thread the remote EndpointId. Retain the 1 MiB MAX_FRAME_BYTES cap — do not duplicate it.
  • HTTP mapping: existing 429 sites emit the structured refusal with a Retry-After header (web/routes.rs:1218 save limiter — currently 429 with a prose body; web/world_ws.rs:350).
  • World chat limiter becomes a consumer of the same bucket: world/core.rs chat_rates (L38) and the prose refusal "chat rate exceeded; try again later" (L1000) are replaced by the shared bucket + structured refusal where the caller can expose one; chat semantics/caps unchanged, no limit duplicated.
  • Counter visibility: surface the registry snapshot via id peers or the existing metrics surface.
  • A refusal sheds the request/stream, never the whole peer connection (except a permanent operator block, which is id(comms): operator block list by public key, with one-button block in the web UI (P0 of #2032) #2245 scope, not this phase).

Acceptance:

  • A peer exceeding the bucket is refused with a machine-readable retry value on the frame and HTTP paths.
  • Counters are visible to an operator.
  • Tests cover: over-bucket refusal with retry value, request-stream shed without peer disconnect, counters incrementing in both directions.

Parent: #2244 · Design: #2033 (PR #3834) · Program: #2056

Activity

  1. added
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    queue/queuedHas a queued task in the Supabase agent queue
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 1, 2026
  2. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  3. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked

  4. 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 1, 2026
  5. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked — dependency gate CLEARED; ready to implement next claim

  6. removed
    status/parkedDeliberately paused with a recorded resume condition
    on Nov 1, 2026
  7. 117 remaining items

  8. added
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    on Nov 2, 2026
  9. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    Parked: OpenChamber scheduled lane parked task 5847 for 30 minutes, naming the Drew-owned artifacts.

  10. added
    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 2, 2026
  11. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    Lane E resumed task 5847: PR #3960 is the queue agent PR for this task (branch queue/5847-3882-p0a-integration; the shared dezren39 author account is not a Drew-owned stop — same pattern as task 5236/PR #4206). Fresh revalidation: PR #3960 MERGEABLE/CLEAN at head 6e868c6, core PR #3891 merged, all 7 Codex findings dispositioned with fix replies (latest P2 fixed in 6e868c6). Proceeding to merge.

  12. added a commit that references this issue on Nov 2, 2026
  13. dezren39 commented on Nov 2, 2026

    @dezren39
    MemberAuthor

    Done: PR #3960 merged (merge commit 762f32a). All acceptance criteria landed: frame-seam charging with structured refusal + retry value, HTTP 429 sites emit Retry-After, world chat limiter consumes the shared bucket, counters visible via peers/metrics surface. All 7 Codex findings dispositioned with fixes. Closing as complete.

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)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions