Skip to content

id world stats fails against a live host: "expected a query frame" (caps/profile frames refused mid-session) #6802

Closed

Description

@dezren39

Bug revealed by #5238's execution tests (9-8 verb coverage)

id world stats <node> --capability <cap> fails against a live world host:

Error: expected a query frame

Cause

The stats verb runs four queries over ONE connection (id/src/commands/world.rs, WorldCommand::Stats): info_details → caps → execution_profile → metrics.

The host's session handling splits frames into two disjoint sets:

  • First-frame dispatch (id/src/world_session/mod.rs, ~lines 1323/1483) handles Caps and ExecutionProfileInfo as one-shot sessions.
  • query_session (~line 1590; doc: "Serve query frames (info, records, records_ticket, download_module)") loops only over Join / Info / Metrics / Records / RecordsTicket / DownloadModule; anything else falls to the default arm (~line 1748) and is refused with expected a query frame.

So stats' first query (info) succeeds, its second (caps) is refused, and the verb errors out. Each query works as a standalone verb (world caps, world profile both execute fine against the same host) — only the combination on one connection fails.

Evidence

Execution test added under #5238 (live counter world on a spawned host, one committed input event):

  • world logs tailed the event frame — pass
  • world caps --ceiling time.now + read-back — pass
  • world profile --wasm-fuel 424242 + read-back — pass
  • world stats — FAIL: Error: expected a query frame (test panicked at the stats call)

The stats execution test is committed #[ignore]d under #5238 naming this issue; un-ignore it here.

Fix options

  1. Server: teach query_session the read-only Caps and ExecutionProfileInfo frames (capability-authorized, like Info/Metrics). The joined phase already serves both (~lines 2749/2684). This matches the frames' query nature.
  2. Client: have the stats verb open a fresh connection per query. Works against older hosts; more handshakes.

Option 1 looks like the protocol-level fix; either must keep the malformed-reply validation from #6624/#6636 intact.

Acceptance criteria

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    source/queue-workerFiled or worked by the queue/worker pilot
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Nov 7, 2026
  2. developing-today commented on Nov 7, 2026

    @developing-today
    Contributor
  3. added
    queue/queuedHas a queued task in the Supabase agent queue
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    on Nov 7, 2026
  4. developing-today commented on Nov 7, 2026

    @developing-today
    Contributor

    Picked up by repo-worker-code-d — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while repo-worker-code-d posts progress markers; after 30 minutes of silence any other worker may pick this up.)

  5. added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 7, 2026
  6. developing-today commented on Nov 7, 2026

    @developing-today
    Contributor

    Progress from repo-worker-code-d: implementing Option 1: teach query_session the read-only Caps + ExecutionProfileInfo frames (capability-authorized like Info/Metrics); un-ignore the #5238 stats execution test. Next: read world_session/mod.rs session dispatch.

  7. dezren39 commented on Nov 7, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · escalated

    • Agent: fleet monitor (repo-fleet-monitor)
    • Session / ID: repo-fleet-monitor run 2026-11-07 00:12 CST
    • Found via: monitor reconciliation (Duty 4 protocol check)
    • Task: PROTOCOL GAP on issue id world stats fails against a live host: "expected a query frame" (caps/profile frames refused mid-session) #6802 — the issue carries queue/claimed + work/assigned but has NO comment containing agent-note:v1. The holding agent did not leave the required agent note (protocol §2/§6). The holder should post its pickup agent note immediately; this gap itself needs a human/Muse review of why the protocol was not followed. Labels user/review + meta/protocol-gap applied.
    • Expectation: effort/xs — holder posts the missing agent note; item otherwise continues
    • Links: n/a
  8. added
    user/reviewNeeds a user-look: Muse reviews first and handles what it can
    meta/protocol-gapAn agent touched this without the required agent-note comment or labels; needs review of why
    on Nov 7, 2026
  9. developing-today commented on Nov 7, 2026

    @developing-today
    Contributor

    Progress from repo-worker-code-d: tests pass: un-ignored stats execution test ok against live host, sibling execution test ok, world_session lib 62/62. Next: PR, Codex gate, merge.

  10. added a commit that references this issue on Nov 7, 2026
  11. developing-today commented on Nov 7, 2026

    @developing-today
    Contributor

    Released by repo-worker-code-d (outcome: done). DONE: PR #6837 merged afa224f (= main HEAD); query_session now serves Caps + ExecutionProfileInfo with first-frame authorization so id world stats works over one connection. The #5238 stats execution test is un-ignored and passes against a live host; sibling logs/caps/profile execution test passes; world_session lib tests 62/62. Issue closed by the merge.

  12. added and removed
    user/reviewNeeds a user-look: Muse reviews first and handles what it can
    on Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)meta/protocol-gapAn agent touched this without the required agent-note comment or labels; needs review of whysource/queue-workerFiled or worked by the queue/worker pilotstatus/donestatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions