Skip to content

Status().RPCs[0] shares internal storage; clearing it can corrupt all-time counts #435

Open

Description

@ffumero2003

Context

clear(client.Status().RPCs[0]) (or otherwise mutating the slice returned by Status()) can corrupt later all-time counts, because that slice shares internal backing storage with the counter's accumulator. A caller inspecting status should not be able to mutate internal state.

Notes

Pre-existing — confirmed on both baseline and current HEAD. Separate from the session-restore panic fix; surfaced during a deep SDK-engineer review of that change.

Acceptance criteria

  • Status() returns a copy (or otherwise read-only view) so callers cannot mutate internal counters.
  • Regression test: mutating the returned stats does not affect subsequent all-time counts.

Activity

  1. self-assigned this
    on Nov 19, 2026
  2. added theissue type on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions