Skip to content

Coalesce attached SSE wakeups without building discarded snapshots - #368

Closed
concordia-claw wants to merge 34 commits into
google-deepmind:mainfrom
concordia-claw:perf/operation-sse-wakeups-029
Closed

concordia-claw wants to merge 34 commits into
google-deepmind:mainfrom
concordia-claw:perf/operation-sse-wakeups-029

Conversation

@concordia-claw

@concordia-claw concordia-claw commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Consolidated into #314. Closed only as a superseded review thread, following Joel Z. Leibo’s category guidance. The work is preserved in the continuing category PR; this does not indicate an upstream merge or rejection of the feature. Continuing issue: #313; continuing PR: #314. Reusable server-error handling continues in PR #314; Bellwether demonstrations continue in PR #372.


Closes #367.

Dependencies and focused review

Draft dependent on #366 and its attached-operation/Bellwether stack. Feature-only comparison: concordia-claw/concordia@d157d82...perf/operation-sse-wakeups-029 . One commit, four files. No merge requested.

Change

OperationService.subscribe gains an optional notifications_only mode: scope is validated on subscription, and at most one payload-free wakeup is pending. Snapshot subscribers keep their existing default behavior. SimulationServer uses the new mode because it already discards queued snapshots and rebuilds the current authorized view at delivery.

The event ledger, revisions, successful retry behavior, JSON envelopes, heartbeat comments and reconnect semantics remain intact. A slow client receives current state; wakeups are not an event-history API. Snapshot construction at delivery still re-resolves the principal, so an earlier approved role is not frozen into a queued private projection. No replacement engine/server/transport or new authorization mechanism.

Evidence

Controlled 40-update probe, same 672000-character view:

Metric Existing snapshot subscription SSE notification mode
View builds before delivery 66 0
Pending queue entries 16 full snapshots 1 None token
Aggregate serialized queue values 10,755,808 bytes 4 bytes
View builds including one delivery snapshot 67 1
Retained events / latest revision 40 / 40 40 / 40

These are controlled code-path/serialized-value measurements, not process RSS, transferred bytes, model latency or physical-device performance. Full delivered snapshots can still be large. The original measurement is retained privately alongside the fixed probe.

Checks

  • 26 operation/Bellwether service checks passed in 2.17s: default owned snapshots, coalescing, scope rejection, unsubscribe, retry semantics, concurrent event retention and real HTTP role revocation before delivery.
  • 24 browser/server checks passed in 25.89s: large developer view, GUI/CLI edits, multiplayer privacy/approval, reconnect, focus and legacy server behavior.
  • Full affected suite: 246 passed in 137.96s.
  • Changed-file lint/type/format/import checks pass; wheel utilities match the reviewed source.
  • Unit/component/browser fixtures only; no simulation launch, provider calls or hosted-game change. Existing acceptance/showcase baselines remain unchanged.

The first repeated REST inventory unexpectedly returned empty despite an open parent; independent listings returned 69 open PRs/44 open issues and direct SSE/snapshot searches showed no overlapping queue change. Related #362 concerns bounded browser rendering, whereas this change concerns redundant publisher snapshot work.

…/remotes/bellwether/human-example' into feat/bellwether-shared-slice-001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Avoid eager full snapshots discarded by attached SSE delivery

1 participant