Skip to content

fix(gateway): make activeRunIds presence mean a complete exact run set - #126106

Merged
steipete merged 5 commits into
mainfrom
steipete/normalize-active-run-ids
Aug 19, 2026
Merged

steipete merged 5 commits into
mainfrom
steipete/normalize-active-run-ids

Conversation

@steipete

@steipete steipete commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Related: #125983

What Problem This Solves

Sessions could report hasActiveRun: true with activeRunIds: [] because exact IDs came only from direct chat abort controllers while aggregate liveness also includes projected lifecycle and embedded owners. That empty list looked like a proven idle exact set even though another owner was active. Incremental events also needed an explicit way to invalidate an exact set already cached by a client when ownership moved to a source that exposes only aggregate liveness.

Why This Change Was Made

This implements the supported direction in the #125983 maintainer close decision: the field remains Gateway-owned exact fact. Full snapshots use presence for a complete exact set, omission for identities unavailable, and [] for proven idle. Incremental session-change and lifecycle events use an event-only null tombstone to clear a previously cached exact set to unavailable; plain event omission remains no change.

One soleActiveSessionRunId() helper replaces arbitrary first-run selection in observer digest, transcript cache keys, activity inspection, and stale-terminal reconciliation, each with its owner-fact fallback. Gateway event projection now owns the tombstone, while web, Android, and Apple cache reconciliation preserve the distinction between omitted and explicitly null fields. Producer-side liveness/observer projections beyond this exact-set contract remain the named follow-up requiring an owner-level Gateway contract.

Protocol Compatibility Decision

Owner direction was to decide the event-only null tombstone by the decoders shipped in the installed beta lines, not to gate the repair by default. Both inspected lines are null-tolerant, so the tombstone remains unchanged:

  • At v2026.8.1-beta.2, generated Swift GatewayModels.swift lines 6010-6072 define SessionRow without activeRunIds; generated Kotlin GatewayProtocol.kt lines 42-44 carry event payloads as nullable JsonElement and line 602 only names sessions.changed. The actual Apple event decoder in ChatTransport.swift lines 152-156 uses decodeIfPresent, including activeRunIds at line 181. The Android parser in ChatController.kt lines 6620-6623 uses asArrayOrNull, whose safe-cast implementation at line 7417 turns JsonNull into null.
  • At v2026.7.2-beta.7, generated Swift GatewayModels.swift lines 4961-5016 likewise omit the field; generated Kotlin GatewayProtocol.kt lines 42-44 use nullable JsonElement and line 524 only names the event. The Apple decoder uses decodeIfPresent at ChatTransport.swift lines 120-125 and applies it to activeRunIds at line 149. Android uses the null-safe array parse at ChatController.kt lines 6259-6262, backed by the safe cast at line 7056.

Therefore already-installed beta-line native clients decode a present null without rejecting the event. They treat it as nil and retain their current pre-fix stale-ID behavior until upgraded; there is no crash or new failure mode. These beta builds carry no compatibility obligation, and activeRunIds was schema-absent implementation surface in their generated protocol models.

User Impact

Projected or hidden-owner sessions no longer masquerade as idle or retain a stale exact run ID after ownership changes. Otherwise behavior is unchanged.

Evidence

  • Pre-fix regression: the direct exact-ID to projected-owner transition emitted omission rather than a tombstone; the focused run failed 3 tests because cached exact IDs remained stale.
  • Pre-fix list regression: a proven-idle row omitted activeRunIds instead of emitting []; the focused list suite failed 3 tests while the identities-unavailable assertion stayed correct.
  • Comprehensive client sweep: five Apple boundary tests failed pre-fix with stale exact IDs across authoritative history, snapshot row replacement, ordinary event projection, lifecycle tombstones, and session.message; Android has the equivalent reconnect-history regression, while the web snapshot replacement regression was already green.
  • node scripts/run-vitest.mjs src/gateway/server.sessions.list-changed.test.ts src/gateway/server-methods/session-active-runs.test.ts src/gateway/server-methods/chat-history-handler.test.ts — 56 tests passed, covering idle [], unavailable omission, and the already-consistent history path.
  • node scripts/run-vitest.mjs src/gateway/server-methods/session-change-event.test.ts src/gateway/server-session-events.test.ts src/gateway/server-chat.agent-events.test.ts ui/src/lib/sessions/reconcile.test.ts — 203 tests passed for event tombstones and client reconciliation.
  • node scripts/run-vitest.mjs ui/src/lib/sessions/reconcile.test.ts — 22 tests passed, covering snapshot replacement plus delta omission/tombstone behavior.
  • swift test --package-path apps/shared/OpenClawKit --filter ChatViewModelTests — 286 tests passed, including snapshot, reconnect, ordinary event, lifecycle, and session.message cache paths.
  • swift test --package-path apps/shared/OpenClawKit --filter ChatSessionSidebarModelTests — 39 tests passed.
  • Updated original focused set (ui/src/lib/observer-digest.test.ts, ui/src/lib/sessions/index.test.ts, ui/src/pages/chat/chat-projection-run-id.test.ts, src/gateway/server-methods/session-active-runs.test.ts) — 50 tests passed.
  • Android focused proof could not start locally because no Android SDK is installed; exact-head CI includes the Android lane.
  • The first Android CI attempt exposed a test-only ordering issue: a later empty sessions.list removed the row before the history assertion. The regression now holds that list request pending so it measures the authoritative history snapshot directly; the same run also had an unrelated managed-child-process timing flake.
  • pnpm check:docs — clean: 0 Markdown issues and 0 broken internal links.
  • Changed guards passed through formatting, test types, core/apps lint, dead exports, and native schema checks.
  • Fresh Codex autoreview — clean, no accepted/actionable findings, patch correct at 0.98 confidence.
  • Production +178/-48; tests +398/-23; docs +31/-11. The growth closes one presence-sensitive public contract across Gateway producers and every web, Android, and Apple cache boundary.
  • Exact-head CI passed on f81b16c82571b869b9b348524944994ae7907788 (run 32222591000, attempt 2), including Android, Swift, Node, docs, and UI E2E.

The source-blind overlap harness cannot manufacture projected/embedded owner state, so this PR claims focused owner-boundary and client-cache regressions plus exact-head CI, not live overlap proof.

@clawsweeper

clawsweeper Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete
steipete marked this pull request as ready for review August 19, 2026 00:59
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime labels Aug 19, 2026
@steipete steipete self-assigned this Aug 19, 2026
@openclaw-barnacle openclaw-barnacle Bot added size: M maintainer Maintainer-authored PR labels Aug 19, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 19, 2026
@clawsweeper

clawsweeper Bot commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 19, 2026, 3:49 AM ET / 07:49 UTC.

ClawSweeper review

What this changes

The PR redefines Gateway activeRunIds presence as a complete exact set and updates Gateway, web, Android, Apple, and documentation handling for snapshots and incremental tombstones.

Merge readiness

⛔ Blocked by patch quality or review findings - 7 items remain

Keep open: the new null event tombstone is ignored by current-main Apple clients, leaving stale exact run IDs after a Gateway upgrade; the compatibility transition needs an owner-approved protocol path before merge.

Priority: P1
Reviewed head: f81b16c82571b869b9b348524944994ae7907788
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) PR readiness rating was derived from proof quality, review findings, security review, and reviewer confidence.
Proof confidence 🌊 off-meta tidepool Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🧂 unranked krab (1/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Evidence reviewed 7 items Gateway contract change: The PR omits run IDs whenever projected or embedded ownership makes the exact set incomplete, while retaining an array only for complete sets.
New tombstone encoding: Incremental Gateway events convert unavailable exact IDs to explicit null, which is the compatibility-sensitive behavior.
Current-main Apple behavior: Current main updates Apple cached IDs only when the decoded value is non-null, so an explicit null event leaves an existing stale ID unchanged.
Findings 1 actionable finding [P1] Preserve legacy Apple clearing before emitting null tombstones
Security None None.

Live Verification

Command: pnpm openclaw --help

Result: PASS (completed)

pnpm openclaw --help
runner@runnervmzvulz:/tmp/clawsweeper-live-proof-126106-05uIhK/target$ pnpm openclaw --help
$ node scripts/run-node.mjs --help
pnpm openclaw --help
[openclaw] Building TypeScript (dist is stale: missing_build_stamp - build stamp missing).
[openclaw] Building bundled plugin assets.
[canvas] build: node scripts/bundle-a2ui.mjs
[log] ‹DIR›/a2ui.bundle.js  chunk │ size: 400.66 kB
[log] ‹DIR›/a2ui-v0.9.bundle.js  chunk │ size: 615.66 kB
[log]
[success] rolldown v1.2.0 Finished in 107.62 ms
[diffs] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts curated
[diffs-language-pack] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts full
[discord] build: node --import tsx ../../scripts/build-discord-activity-sdk.mts
[tsdown-build] invocation 1/2 finished in 0.7s
node_modules/web-tree-sitter/web-tree-sitter.js (2343:30) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2343:31 ]
      │
 2343 │           ASM_CONSTS[start] = eval(func);
      │                               ──┬─
      │                                 ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

node_modules/web-tree-sitter/web-tree-sitter.js (2366:32) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2366:33 ]
      │
 2366 │           moduleExports[name] = eval(func);
      │                                 ──┬─
      │                                   ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

node_modules/playwright-core/lib/coreBundle.js (65821:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65821:29 ]
       │
 65821 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

node_modules/playwright-core/lib/coreBundle.js (65828:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65828:29 ]
       │
 65828 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

[tsdown-build] invocation 2/2 finished in 13.7s
[plugin-control-plane-loads] verified 36 built modules with native require and checked doctor closures
runtime-postbuild: 10 phases completed in 4266ms (slowest: built plugin control-plane loads 3516ms)

OpenClaw 2026.8.1 (f81b16c) — All your chats, one OpenClaw.

Usage: openclaw [options] [command]

Options:
  --container ‹name›   Run the CLI inside a running Podman/Docker container named ‹name› (default: env OPENCLAW_CONTAINER)
  --dev                Dev profile: isolate state under ~/.openclaw-dev, default gateway port 19001, and shift derived ports (browser/canvas)
  -h, --help           Display help for command
  --log-level ‹level›  Global log level override for file + console
… output truncated …

Assertions:

  • PASS expect_output: Usage:

How this fits together

Gateway combines direct, projected, and embedded run ownership into session snapshots and events. Web and native caches consume those facts to show session activity and exact run-owned UI safely.

flowchart LR
  A[Direct and hidden run owners] --> B[Gateway run-state resolver]
  B --> C[Snapshot exact-set projection]
  B --> D[Incremental event tombstone]
  C --> E[Web and updated native caches]
  D --> E
  D --> F[Existing Apple clients]
  E --> G[Current session activity UI]
  F --> H[Stale run identity risk]
Loading

Decision needed

Question Recommendation
Should Gateway negotiate the new null tombstone and retain legacy clearing for installed Apple clients, or is an explicitly coordinated lockstep native/Gateway upgrade an accepted release requirement? Capability-gate the new tombstone: Add a negotiated client capability so legacy Apple clients receive their compatible clear representation while updated clients receive null.

Why: The new event meaning conflicts with current-main Apple merge semantics, and selecting a protocol capability or release-coordination boundary requires maintainer ownership.

Before merge

  • Preserve legacy Apple clearing before emitting null tombstones (P1) - Current-main Apple clients clear cached IDs only when activeRunIds decodes to a non-null array. This new helper emits null whenever ownership becomes unavailable, so an installed Apple client keeps its old ID after the transition. Negotiate the new tombstone meaning (or preserve the legacy clear encoding for uncapped clients) before changing this producer.
  • Resolve merge risk (P1) - Existing Apple clients retain a stale exact ID when an upgraded Gateway sends the new activeRunIds: null tombstone, because their current merge path treats null as omission.
  • Resolve merge risk (P1) - The supplied exact-head status still reports the newly added Android reconnect regression as failing.
  • Resolve merge risk (P1) - The PR reports production +178/-48 alongside tests +398/-23 and docs +31/-11; that cross-client growth is defensible only with a safe compatibility transition.
  • Complete next step (P2) - A maintainer must select the protocol compatibility boundary before any repair can safely change producer behavior.
  • Improve patch quality - Address the highest-priority review finding and re-run the changed-surface validation.

Findings

  • [P1] Preserve legacy Apple clearing before emitting null tombstones — src/gateway/session-event-payload.ts:31-35
Agent review details

Security

None.

PR surface

Source +32, Tests +179, Docs +20, Other +294. Total +525 across 29 files.

View PR surface stats
Area Files Added Removed Net
Source 8 48 16 +32
Tests 6 201 22 +179
Docs 2 31 11 +20
Config 0 0 0 0
Generated 0 0 0 0
Other 13 327 33 +294
Total 29 607 82 +525

Review metrics

Metric Value Why it matters
Production versus test delta production +178/-48; tests +398/-23; docs +31/-11 The PR-reported net production growth spans Gateway plus three cache implementations, so the compatibility transition must justify the added surface.

Stored data model

Persistent data-model change detected: serialized state: src/gateway/server-methods/session-active-runs.test.ts, serialized state: src/gateway/server-methods/session-active-runs.ts, serialized state: src/gateway/server-methods/session-change-event.test.ts, serialized state: src/gateway/server-methods/session-change-event.ts, serialized state: src/gateway/session-event-payload.ts, serialized state: ui/src/lib/sessions/reconcile.test.ts, and 2 more. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: canonical
Canonical: #126106
Summary: This PR is the active producer-and-cache contract change; related UI work addressed arbitrary ownership selection without changing field-presence semantics.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Add a negotiated compatibility transition (recommended)
    Gate null tombstones on a client capability and retain legacy clearing for uncapped native clients, with a regression covering the old Apple decoder.
  2. Accept a coordinated upgrade requirement
    Merge only after maintainers explicitly document and own a lockstep Gateway-and-native release requirement.
  3. Pause for protocol ownership
    Hold this PR if neither compatibility path is acceptable for the supported native-client fleet.

Technical review

Best possible solution:

Introduce an owner-approved, capability-gated transition: preserve the legacy clear encoding for pre-change native clients and emit the null tombstone only to clients that explicitly support it, with legacy-client regression coverage and after-fix native evidence.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: start a current-main Apple cache with an exact ID, then deliver this PR's Gateway event containing activeRunIds: null; current-main Apple ignores the null and retains the stale ID.

Is this the best way to solve the issue?

No: the updated-client cache repair is sound, but unconditional null emission is not the best solution while supported Apple clients use the current non-null-only merge behavior.

Full review comments:

  • [P1] Preserve legacy Apple clearing before emitting null tombstones — src/gateway/session-event-payload.ts:31-35
    Current-main Apple clients clear cached IDs only when activeRunIds decodes to a non-null array. This new helper emits null whenever ownership becomes unavailable, so an installed Apple client keeps its old ID after the transition. Negotiate the new tombstone meaning (or preserve the legacy clear encoding for uncapped clients) before changing this producer.
    Confidence: 0.96

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 0151ef17b3d6.

Labels

Label changes:

  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🌊 off-meta tidepool and patch quality is 🧂 unranked krab.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🧂 unranked krab, so this older rating label is no longer current.

Label justifications:

  • P1: An upgraded Gateway can leave installed Apple clients showing a stale active run identity.
  • merge-risk: 🚨 compatibility: The PR changes a documented Gateway event-field meaning without compatibility negotiation for current native clients.
  • merge-risk: 🚨 session-state: The incompatible tombstone leaves cached exact run IDs stale after run-owner transitions.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🌊 off-meta tidepool and patch quality is 🧂 unranked krab.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.

Evidence

What I checked:

Likely related people:

  • steipete: Current-head blame attributes the Gateway exact-set contract and Android merge work to this contributor; the related merged UI ownership repair is also theirs. (role: recent session-runtime contributor; confidence: high; commits: f81b16c82571, 948a444d63d2; files: src/gateway/server-methods/session-active-runs.ts, src/gateway/session-event-payload.ts, apps/android/app/src/main/java/ai/openclaw/app/chat/ChatController.kt)
  • vincentkoc: Current main records a recent sessions refactor under this author, making them a relevant routing candidate for an upgrade-sensitive session protocol decision. (role: adjacent current-main sessions contributor; confidence: low; commits: 0151ef17b3d6; files: src/gateway/server-methods/session-active-runs.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (6 earlier review cycles)
  • reviewed 2026-08-19T01:06:23.728Z sha 587b501 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-19T01:25:06.889Z sha 587b501 :: found issues before merge. :: [P1] Clear cached IDs when identities become unavailable | [P1] Accept observer facts when IDs are unavailable
  • reviewed 2026-08-19T01:46:06.463Z sha 7a765475b67ef5b6f05915912f15ce29160455ac :: found issues before merge. :: [P1] Clear cached IDs when identities become unavailable | [P1] Retain membership checks for complete multi-run sets
  • reviewed 2026-08-19T02:15:04.760Z sha 881f8aa :: found issues before merge. :: [P1] Clear cached IDs when identities become unavailable
  • reviewed 2026-08-19T03:06:30.615Z sha ca5ad3a :: needs changes before merge. :: [P2] Emit complete empty sets from sessions.list
  • reviewed 2026-08-19T04:08:06.648Z sha 75a6cd5 :: needs changes before merge. :: [P1] Clear native exact IDs on unavailable history snapshots

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. labels Aug 19, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 19, 2026
@steipete
steipete force-pushed the steipete/normalize-active-run-ids branch from 7a76547 to c3eb3d6 Compare August 19, 2026 01:56
Session rows no longer emit activeRunIds: [] while hasActiveRun is
true. Presence now means the complete exact set of direct run ids;
omission means identities are unavailable (projected/embedded owners);
[] only ever represents proven idle. Consumers stop guessing:
soleActiveSessionRunId() replaces the arbitrary [0] fallbacks in the
observer digest, transcript cache key, activity inspector, and
stale-terminal reconciliation, each falling back to its owner fact.

Follows the maintainer direction from #125983: the field stays as
Gateway-owned exact facts; producer-side liveness/observer projections
are a named follow-up.
@steipete
steipete force-pushed the steipete/normalize-active-run-ids branch from c3eb3d6 to 881f8aa Compare August 19, 2026 02:07
@openclaw-barnacle openclaw-barnacle Bot added size: S and removed app: web-ui App: web-ui size: M labels Aug 19, 2026
@openclaw-barnacle openclaw-barnacle Bot added app: android App: android app: web-ui App: web-ui size: M and removed size: S labels Aug 19, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 19, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 19, 2026
@blacksmith-sh

This comment has been minimized.

@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The compatibility P1 is resolved by owner-directed decoder evidence now recorded in the PR body. At both installed beta tags, Apple decodes activeRunIds through decodeIfPresent and Android maps a non-array JsonNull to null via a safe JsonArray? cast; the generated protocol models do not include this field. Existing beta clients therefore accept the event and degrade only to their existing stale-ID behavior until upgrade, with no crash or rejected payload.

@clawsweeper

clawsweeper Bot commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 19, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Retrying once because run 32230132956 completed its model review but stalled past lease expiry in Install exact live-proof terminal tools. The compatibility P1 is resolved by owner-directed decoder evidence recorded in the PR body: both installed beta lines accept present null without rejecting the payload, and generated protocol models do not include this field.

@clawsweeper

clawsweeper Bot commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete
steipete merged commit e71fc90 into main Aug 19, 2026
440 of 442 checks passed
@steipete
steipete deleted the steipete/normalize-active-run-ids branch August 19, 2026 09:09
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 20, 2026
openclaw#126106)

* fix(gateway): make activeRunIds presence mean a complete exact run set

Session rows no longer emit activeRunIds: [] while hasActiveRun is
true. Presence now means the complete exact set of direct run ids;
omission means identities are unavailable (projected/embedded owners);
[] only ever represents proven idle. Consumers stop guessing:
soleActiveSessionRunId() replaces the arbitrary [0] fallbacks in the
observer digest, transcript cache key, activity inspector, and
stale-terminal reconciliation, each falling back to its owner fact.

Follows the maintainer direction from openclaw#125983: the field stays as
Gateway-owned exact facts; producer-side liveness/observer projections
are a named follow-up.

* fix(gateway): clear unavailable active run ids in events

* fix(gateway): preserve idle active run sets

* fix(clients): close active run id cache gaps

* test(android): isolate history run snapshot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: android App: android app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant