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(id-native-shell): run_session retains every durable event for the whole session — unbounded memory growth in a long-lived shell, and nothing reads it · Issue #10613 · developing-today/code

id(id-native-shell): run_session retains every durable event for the whole session — unbounded memory growth in a long-lived shell, and nothing reads it #10613

New issue
Copy link
New issue
Copy link
Closed
#10620
Closed
id(id-native-shell): run_session retains every durable event for the whole session — unbounded memory growth in a long-lived shell, and nothing reads it#10613
#10620
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 jobstatus:done

Description

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

Defect

id-native-shell's live session keeps every durable host event for the whole
session lifetime, with no bound and no consumer, so memory grows with total
world activity since the last snapshot.

pkgs/id/crates/id-native-shell/src/session.rs:110-141:

pub struct SessionState {
    snapshot: Option<Value>,
    events: Vec<Value>,
    ...
}
...
            "snapshot" => {
                self.snapshot = Some(frame["snapshot"].clone());
                self.events.clear();
                Ok(ServerUpdate::Snapshot)
            }
            "event" => {
                self.events.push(frame["event"].clone());
                Ok(ServerUpdate::Event)
            }

events.clear() runs only on a snapshot frame. run_session
(session.rs:245-253) folds every host frame into the shared SessionState
for the entire session, and returns the accumulated state on exit
(session.rs:291). events() (session.rs:169-174) hands out a &[Value] —
there is no drain, cap, or byte budget.

Why this is unbounded in practice

The host emits snapshot only at three points: on join
(pkgs/id/crates/id-worlds/src/world_session/mod.rs:1718), on a lagged
broadcast receiver (mod.rs:1859), and on ProgramInstalled
(mod.rs:1808). The steady state is event frames plus coalesced view
frames — no periodic snapshot. A client that keeps up never lags, so between
join and program install events grows without limit.

The running binary does not read it. id-native-shell/src/main.rs drains only
views (drain_session_views); events() is consumed solely by tests
(session.rs:339,365, tests/live_session.rs:186,194). So the process
retains a full duplicate of the world's durable event stream for its own
lifetime and never looks at it.

Impact

id-native-shell is the reference live client intended to stay connected and
present an ongoing world (step 2 of #788, PRs #10526/#10536 merged). On an
active world (chat/input/system events at steady rate) a multi-hour session
accumulates every payload — unbounded peak RSS driven by remote activity, not
by caller choice, and a plausible OOM for the shell process.

Acceptance criteria

  • SessionState retention of durable events is bounded on the receive path
    (e.g. fixed count/byte budget keeping a tail, or a drain API the consumer
    uses), enforced in apply_server_frame/the reader loop, not at read time.
  • The bound is covered by a test that feeds more than the budget of event
    frames without an intervening snapshot and asserts retention stays within
    the budget.
  • Either events() semantics are documented as bounded (and the tests updated)
    or the running binary explicitly drains what it retains.

Found while auditing pkgs/id for the standing id priority; filed by the
improvement-issue creator. No fix attempted here.

Activity

  1. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    source/creatorFiled by the new-issue-creator job
    priority/normalOrdinary priority (the default)
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    effort/sSmall: expected under 2 hours of work
    on Nov 16, 2026
  2. developing-today commented on Nov 16, 2026

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

    CODE-3852

  3. dezren39
    added a commit that references this issue on Nov 16, 2026

    fix(id-native-shell): bound durable event retention to a tail (#10613)

    c896189
  4. developing-today
    added
    status:in-review
    on Nov 16, 2026
  5. dezren39
    added a commit that references this issue on Nov 16, 2026

    fix(id-native-shell): bound durable event retention to a tail (#10613) (

    df641b4
  6. dezren39
    closed this as completedin #10620on Nov 16, 2026
  7. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 16, 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)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 jobstatus:done

    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.