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): reject invalid chat.history count types · Issue #7892 · developing-today/code

id(world): reject invalid chat.history count types #7892

New issue
Copy link
New issue
Copy link
Closed
Closed
id(world): reject invalid chat.history count types#7892
Copy link
Assignees
dezren39
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

@dezren39
dezren39
opened on Nov 9, 2026
Issue body actions

Confirmed behavior

chat.history declares count as an optional unsigned integer in pkgs/id/crates/id-core/src/world_caps.rs:258-263. However, parse_wants only bounds the serialized args size (world_caps.rs:798-805); it does not validate the argument against that schema. The handler then reads count with as_u64().unwrap_or(16) (pkgs/id/src/world/actor.rs:880-888).

For example, this request is accepted and silently uses the default 16 instead of reporting invalid arguments:

{"v":1,"requests":[{"id":"h","cap":"chat.history","args":{"count":"2"}}]}

The same fallback applies to other non-unsigned values such as negative numbers, fractions, null, and objects. The existing test chat_history_defaults_and_clamps_and_records_read_rejects_an_oversized_first_record (pkgs/id/tests/world/tests.rs:1782-1832) verifies the omitted-count default and oversized-count clamp, but not malformed supplied values.

This is distinct from #796 / PR #4681: that proving test covers the default, clamp, and oversized records.read behavior, not wrong-typed chat.history.count values. No open PR for this behavior was found.

Why it matters

A caller typo or serialization mismatch is silently turned into a successful request for 16 lines. The declared argument contract is therefore not enforced, making client errors harder to detect and potentially returning more history than requested.

Acceptance criteria

  • A supplied non-unsigned chat.history.count (at least string, negative, fractional, null, and object cases) is rejected with bad_args, rather than treated as omitted.
  • An omitted count still returns the documented default of 16.
  • Valid unsigned counts still work, and values above MAX_CHAT_HISTORY_LINES still clamp as they do today.
  • Add a world-level regression test exercising malformed input through the request path.

Activity

  1. dezren39
    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
    on Nov 9, 2026
  2. developing-today commented on Nov 9, 2026

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

    CODE-2340

  3. dezren39
    added
    source/creatorFiled by the new-issue-creator job
    priority/normalOrdinary priority (the default)
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Nov 9, 2026
  4. developing-today
    added
    status:in-review
    on Nov 9, 2026
  5. github-actions
    assigned
    dezren39
    on Nov 12, 2026
  6. dezren39
    added 2 commits that reference this issue on Nov 14, 2026

    fix(id/world): reject malformed chat.history count types (#7892)

    05bb7ea

    Merge pull request #8016 from developing-today/sweep/7892-chat-histor…

    bcaa352
  7. dezren39
    closed this as completedon Nov 17, 2026
  8. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 17, 2026
  9. dezren39 commented on Nov 17, 2026

    @dezren39
    dezren39
    on Nov 17, 2026
    MemberAuthor
    More actions

    agent-note:v1
    state: triaged
    task: 18544 (queue repo-health-code-pilot, worker repo-worker-code, lane code-d)

    Triage verdict for issue #7892: ALREADY DONE. Fresh check this shift (2026-11-17): issue #7892 is CLOSED (status:done; closed 2026-11-17T03:15:29Z) and the fix landed in PR #8016 "fix(id/world): reject malformed chat.history count types (#7892)", MERGED 2026-11-14T21:25:08Z. Completing task 18544 as already_done; no follow-on needed.

  10. dezren39 commented on Nov 17, 2026

    @dezren39
    dezren39
    on Nov 17, 2026
    MemberAuthor
    More actions

    Agent note — task 20035 already_done (lane any-n)

    • State: already_done — issue id(world): reject invalid chat.history count types #7892 is CLOSED (status:done). The fix landed in PR fix(id/world): reject malformed chat.history count types (#7892) #8016 "fix(id/world): reject malformed chat.history count types (id(world): reject invalid chat.history count types #7892)", merged 2026-11-14T21:25:08Z, as recorded by triage of record task 18544 (2026-11-17, comment 6937279548).
    • Revalidated fresh this claim: issue state CLOSED; no work remains for this follow-on.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus: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

    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.