GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — id(world): parse_wants accepts a non-object args — a scalar/array args collapses to no arguments, silently widening records.read to every record · Issue #7929 · developing-today/code

id(world): parse_wants accepts a non-object args — a scalar/array args collapses to no arguments, silently widening records.read to every record #7929

New issue
Copy link
New issue
Copy link
Closed
Closed
id(world): parse_wants accepts a non-object args — a scalar/array args collapses to no arguments, silently widening records.read to every record#7929
Copy link
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

@developing-today
developing-today
bot
opened on Nov 9, 2026
Issue body actions

id(world): parse_wants accepts a non-object args — a scalar/array args collapses to no arguments, silently widening records.read to every record

Summary

A capability request in a wants document declares its arguments as a JSON
object (or null/absent). parse_wants never checks that: it accepts any
JSON value as a request's args — a number, a string, an array, a boolean —
and stores it verbatim on the Request. Every downstream handler reads its
fields with args.get("field"), and serde_json::Value::get on a non-object
returns None for every field, so a wrong-shaped args is indistinguishable
from no arguments at all. For records.read that means a program whose
bridge/serializer emits args: 42 (or "co", or [{"prefix":"co"}]) instead
of an object gets the full unscoped first page of the world's records instead
of its scoped page — with an ok result, and no signal anything was dropped.

Evidence (verified on main @ 13eb408)

pkgs/id/crates/id-core/src/world_caps.rs:

  • The Request struct documents the contract: /// Arguments (a JSON object, or null) (line ~656).
  • parse_wants (lines ~801–805) takes the entry's args as
    entry.get("args").cloned().unwrap_or(Value::Null) and checks only its
    serialized size against MAX_ARGS_BYTES. It validates the entry's id and
    cap as strings, the subscribe/requests lists as arrays, and rejects
    duplicate keys (id(world_caps): parse_wants validates a last-wins collapse — duplicate keys bypass the version check and the 64-entry bounds (residual door of #6501/#6520) #7621) — but never checks that args is an object or null.
  • Every provider manifest with arguments declares
    ArgumentSchema::JsonObject(&[...]) (e.g. RECORDS_READ_ARGUMENTS,
    lines ~264–276): the schema is a fields-of-an-object schema.

pkgs/id/src/world/actor.rs:

  • Handlers read fields off request.args (args.get("prefix"),
    args.get("count"), …). On a non-object Value, .get() yields None
    for every key, so each optional argument collapses to its omitted behavior:
    records.read (lines ~924–925) → no prefix filter, no cursor;
    chat.history (lines ~885–888) → the default count of 16. (Caps with
    required arguments, e.g. chat.say/schedule.at, do fail downstream with
    bad_args — the harm is specific to caps whose arguments are all optional.)

Reproduction (probe on the laptop, ~/git/fleet/probe-wants-args-20261108,
worktree at origin/main 13eb408; two tests added to
pkgs/id/src/world/tests.rs in the probe only):

  • probe_parse_wants_accepts_non_object_args: parse_wants returns Ok
    with the value preserved verbatim for args = 42, "co",
    [{"prefix":"co"}], and true. Controls: object args and absent args
    parse as documented.
  • probe_records_read_non_object_args_unscoped (the WorldActor::for_test
    harness from the existing records.read tests; the program publishes
    count=1, other=2, zebra=3; records.read + chat.history granted):
    • Control: args {"prefix":"co"} → ok, records = [count].
    • args 42 → ok, records = [count, other, zebra] — the full page.
    • args "co" → ok, records = [count, other, zebra].
    • args [{"prefix":"co"}] → ok, records = [count, other, zebra].
    • args true → ok, records = [count, other, zebra].
    • chat.history with args "2" → ok (accepted, default behavior).

Existing tests pin per-field types inside an object args (#7899, #7892) but
nothing pins the shape of args itself.

Why it matters

This is the layer above #7899/#7892: those cover a wrong-typed field inside
an object args; this covers args itself being the wrong JSON type, which
bypasses every field check at once because no field is ever read. The
scope-widening consequence is the same one #7899 calls out — a scoped
records.read silently becomes a whole-world read, indistinguishable in the
result from a legitimate unscoped read — but the trigger is a single
serialization mistake at the envelope level (a host bridge emitting the args
payload unwrapped), and the fix belongs at the one gate every request passes
through (parse_wants), not in each handler. parse_wants' own doc says
"Anything outside the schema or its bounds" is an error the caller treats as
a program failure; a non-object args is outside the documented schema
today yet is the one shape it does not reject.

Related but distinct: #7899 (non-string prefix/after fields of
records.read), #7892 (chat.history count field type). A fixer may
reasonably land all three in one pass; this issue is only the
parse_wants-level args-shape gate.

Acceptance criteria

  • parse_wants rejects a request whose args is present and is neither a JSON object nor null (at least number, string, array, and boolean cases), with an error that names the problem, consistent with its other schema refusals.
  • Absent args and args: null keep behaving exactly as today (treated as no arguments), and object args are unchanged.
  • A records.read request with a non-object args can no longer return a page: end-to-end (wants → actor), it fails instead of returning the unscoped page; valid object-args controls ({"prefix":"co"} → [count]) are unchanged.
  • New tests pin the rejection at the parse_wants level for scalar/array/boolean args and at the world level for records.read, alongside the valid controls.
  • The existing world/world_caps suites stay green.

Activity

  1. developing-today
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    status/needs-triageNot yet triaged; needs a first look
    source/creatorFiled by the new-issue-creator job
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued queue task
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    effort/sSmall: expected under 2 hours of work
    on Nov 9, 2026
  2. developing-today commented on Nov 9, 2026

    @developing-today
    developing-todayBot
    on Nov 9, 2026 – with developing.today
    ContributorAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator job (lane A, slug new-issue-creator-code-a)
    • Session / ID: cron job new-issue-creator-code-a, run 2026-11-08 20:35 CST
    • Found via: filed this run
    • Task: Reject a non-object args in parse_wants (pkgs/id/crates/id-core/src/world_caps.rs) — a request whose args is present and neither an object nor null should fail at the wants gate instead of collapsing to no arguments in every handler (for records.read, an unscoped full page).
    • Expectation: effort/s — done when the acceptance criteria in the issue body pass and the existing world/world_caps suites stay green.
    • Links: verification probe on the laptop at ~/git/fleet/probe-wants-args-20261108 (worktree at origin/main 13eb408; both probe tests pass asserting the current wrong behavior: parse_wants accepts args 42/"co"/array/true verbatim, and records.read returns the full [count, other, zebra] page for each; control {"prefix":"co"} scopes to [count]). Related, distinct: issue id(world): records.read prefix/after shape-trusted — a non-string prefix silently widens a scoped read to every record, a non-string after silently restarts pagination #7899 (non-string prefix/after fields inside an object args), issue id(world): reject invalid chat.history count types #7892 (chat.history count field type). Filed via the developing.today GitHub App (user token under a secondary rate limit; App create verified by readback).
  3. dezren39 commented on Nov 10, 2026

    @dezren39
    dezren39
    on Nov 10, 2026
    Member
    More actions

    Agent note - parked (awaiting triage)

    • Agent: repo-worker-code-j (lane code-j)
    • State: parked 1500s - awaiting the triage step
    • Task: task 14293 - queue repo-health-code-pilot - kind small_fix - execution lane opencode (lane row 5879)
    • Reason: this fix packet's issue id(world): parse_wants accepts a non-object args — a scalar/array args collapses to no arguments, silently widening records.read to every record #7929 still carries status/needs-triage (verified fresh 2026-11-10T08:01Z, no triage-step note in its comments). Per Queue/lane design rules: no by-id blocking by default, optional platform selector, triage separate from fixes #8097 Rule 3 (runbook section 1c), fix work starts only on triaged items; triage belongs to the triage step. Bookkeeping park only - no findings, no label changes.
    • Next: triage step triages issue id(world): parse_wants accepts a non-object args — a scalar/array args collapses to no arguments, silently widening records.read to every record #7929 and emits the fix packet; this packet resumes after.
  4. dezren39 commented on Nov 11, 2026

    @dezren39
    dezren39
    on Nov 11, 2026
    Member
    More actions

    Agent note — lane code-m, task 14293 — inline triage + pickup

    • event: triaged + picked_up
    • task: 14293 (fix, issue id(world): parse_wants accepts a non-object args — a scalar/array args collapses to no arguments, silently widening records.read to every record #7929)
    • triage (per runbook §1c): work kind task/small-fix (already labelled); priority priority/normal (Drew's priorities brief line 5 — an internal world-API argument-validation bug with a silent scope-widening effect on records.read; serious correctness, not fleet-stalling, no Drew expedite); effort effort/s (one function + tests); kind kind/bug (already labelled). Removing status/needs-triage.
    • first concrete step: locate parse_wants, reject present-but-non-object non-null args with a naming error; pin at parse level and at world level for records.read with valid controls.
    • acceptance check: the packet's — rejection for number/string/array/boolean args; absent/null/object unchanged; records.read with non-object args fails end-to-end instead of returning the unscoped page; world/world_caps suites green.
  5. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 11, 2026
  6. dezren39
    added a commit that references this issue on Nov 11, 2026

    Merge pull request #8520 from developing-today/queue/14293-7929-parse…

    78fcd2b
  7. dezren39 commented on Nov 11, 2026

    @dezren39
    dezren39
    on Nov 11, 2026
    Member
    More actions

    Agent note — lane code-m, task 14293

    • event: done (fixed_merged)
    • task: 14293 (small_fix, issue id(world): parse_wants accepts a non-object args — a scalar/array args collapses to no arguments, silently widening records.read to every record #7929; triaged inline at pickup per runbook §1c — task/small-fix, priority/normal, effort/s; see the triage note on this issue)
    • merged: PR fix(id/world): reject non-object args in parse_wants (#7929) #8520 (merge 78fcd2b) — parse_wants now rejects a request args that is present and neither a JSON object nor null, with an error naming the problem (request args must be a JSON object or null, not a number|string|array|boolean). Absent/null/object args unchanged. Rejection is at parse time, so neither the world actor nor the session handle can dispatch such a request.
    • tests (laptop, PR head 5f1c016): id-core suite 362/362 (new non_object_request_args_are_rejected: four bad shapes rejected, absent/null/object controls pass, {"prefix":"co"} carried through unchanged); world_dos 12/12 (new non_object_args_never_reach_the_world: records.read with args: 42 is never dispatched — no usage recorded — world stays responsive; object-args control dispatches exactly once); id --lib world 653+82 pass. CI still queued in the fleet runner stall at merge time; merged under the standing local-verification bar.
  8. dezren39 commented on Nov 11, 2026

    @dezren39
    dezren39
    on Nov 11, 2026
    Member
    More actions

    Fixed by PR #8520 (merged 78fcd2b): parse_wants rejects non-object args at parse time. Full verification record: #7929 (comment) and the done note above.

  9. dezren39
    closed this as completedon Nov 11, 2026
  10. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    on Nov 11, 2026
  11. dezren39
    added 2 commits that reference this issue on Nov 14, 2026

    feat(id): id.device.v1 MQTT device bridge spec + labelled PoC (#2343) (…

    1fd1a80

    test(id): device_bridge oversize-args case uses object args per #7929 …

    3d3b642
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)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobtask/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

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.