Skip to content

feat: let agents query online people and device activity - #159117

Merged
steipete merged 10 commits into
mainfrom
codex/unified-presence
Sep 27, 2026
Merged

steipete merged 10 commits into
mainfrom
codex/unified-presence

Conversation

@steipete

@steipete steipete commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Agents could not directly answer who is online or identify which connected machine produced a person’s latest activity. Raw presence duplicated tabs, and the active-computer prompt hint selected one machine across the whole Gateway.

User Impact

The core presence tool supports list, person, and device reads on personal and shared Gateways, including compatible remote workers. person accepts me, a returned ID, or an unambiguous name. Agents can optionally include devices, observed IPs, client time zones, and approximate IP locations; list limits default to 50 and cap at 100.

Names are grouped by qualified identity, activity retains its source device, and active-computer hints follow the requesting person. Shared or unidentified machines remain separate. This reads current connected presence; it adds no durable activity history, GPS sampling, storage migration, numeric protocol-version bump, or permission scope.

Why This Change Was Made

The query reuses existing connection, identity, node, and geolocation owners. Main’s presence.activity reporter feeds the same activity owner: the UI keeps person-wide OpenClaw interaction timing for idle labels, while the agent retains per-connection and source-labelled native device activity. UI and agent reads share identity grouping.

Reads preserve the original requester and recheck live authority after asynchronous work. Authenticated readers retain operator.read access; unknown callers cannot inherit synthetic System read access. Worker authority stays on the admitting Gateway’s live owner. Optional location enrichment uses the existing local database with a five-minute cold-lookup budget. Existing raw system-presence clients retain their contract; older workers omit the unsupported tool.

Evidence

  • The integrated activity/query/node/UI selection passed 90 tests in 60.15s. The registered activity RPC test preserves distinct per-tab timestamps alongside the shared person timestamp. Disabling per-connection recording made that assertion fail; exact source restoration passes all six file cases in 17.20s.
  • The actual tool → Gateway router → live summary regression rejects unidentified callers before roster access, preserves authenticated non-owner readers, and withholds revoked delayed results. Worker tests cover real scheduled admission → identity preparation → executor and transport timeout/revocation boundaries.
  • Full independent review of the integrated feature is clean through P2. The additive method catalog preserves main’s existing positions, and native schemas are generated canonically. All 16 native wrapper extraction tests pass after including the inline activity validator’s runtime dependency.
  • A full local build passed in 21m12.6s. The final reviewed head ab9123e8d373acb1adf299289b695be4b8db2586 passed CI on its first attempt: 187 successful jobs, 9 skipped, no failures or cancellations, in 24m53s. Build Artifacts also passed, and exact-head ClawSweeper review reported no code or security findings. The comment-only CLI rebase passed 204 affected tests; the activity integration passed changed-file checks, core/UI typechecks, all core test type graphs, and full protocol checks. Merged as fe609d4ce1a82050b305e660925741793bb70f39.
  • Synthetic catalog screenshots below prove discovery. Execution and permissions are covered by the real Gateway and worker boundaries. No production Gateway was deployed or restarted.
CI repairs and remaining diagnostic limits

The branch repairs missing display metadata, append-only native method ordering, native wrapper extraction inventory, and the MCP heartbeat fixture’s assumption that buffered heartbeats disappear at shutdown. The MCP fixture now drains to EOF within its unchanged deadline; 20 fresh processes passed 100 tests. Main owns the incorporated scheduler, suppression-inventory, database-cleanup, and roster repairs, including #159103, #159163, #159340, #159394, and #159553; duplicate branch work was removed. The approved three-entry lint inventory expansion is already in main.

An earlier macOS lipo process-cleanup failure did not reproduce in its original 553-test selection; no fix was claimed. A separate unchanged SIWC callback-port retry failure did not reproduce in the original 39-file, two-worker selection: 922 passed/1 skipped in 628.96s on Node 24.21. Its original terminal error omitted the message, so the cause remains unproven.

The unchanged legacy webhook listener fixture twice hit Linux EADDRINUSE in different cases. A macOS replay passed, but used Node 24.21 rather than failing Blacksmith’s 24.19. The matching Linux original selection then passed 1,452 tests/5 skipped in 99.74s; five instrumented fresh fixture processes passed all 65 cases and captured only the intentionally occupied port. Node/libuv and cooperative-lock audits established no safe repair. The source, assertions, timeouts, and suppressions remain unchanged; the original failures and non-reproduction remain documented under the best-effort policy. Later hosted runs passed these runtime shards. Linux Testbox evidence, lease tbx_01m3grwkvf0ez2493c9z5bm5bn, is completed/stopped.

The later Android ChatControllerBranchCoordinationTest.rewindInvalidatesAHistoryResponseStartedBeforeTheMutation stalled in its coroutine body for 60 seconds. Controller, test, and dependencies are identical in both CI merge parents; the presence Android delta is only the generated method entry. A configured Blacksmith Testbox source-verified probe could not run the class because the prepared environment lacked CI’s pinned JDK 21.0.12.1, Android platform 37.0, and Robolectric initialization/cache. No Android test ran in that probe; the lease is stopped. Environment-gap evidence. The cause remains unproven; final-head hosted Android CI passed, with no timeout or assertion changes.

Platform failures were distinct: one Rust installation failed on runner DNS; a later iPhone simulator reboot was killed before UI tests. iPad built and passed two screenshots, then XCTest timed out after 60s while Xcode acknowledged launch only after 77.7s. The artifact shows OpenClaw subsequently launched and became active, with no crash. No app readiness timeout or product code was changed for these failures. All final-head platform lanes passed.

Catalog discovery (synthetic)

Same Settings → Agents → Tools renderer and viewport, using the actual base and PR catalogs with a synthetic Demo Agent. The mock runtime preview is empty ("Not listed"); these images prove catalog discovery and enabled defaults. Gateway and worker tests prove execution.

Before:

Tools catalog before presence

After:

Tools catalog with presence

Focused test cost

Measured individually with pnpm test <file> --maxWorkers=1; these wall times include wrapper/import overhead. Existing larger suites reuse their fixtures, and the cold-lookup regression advances a fake clock instead of sleeping.

File Local wall
src/gateway/server-methods/presence.test.ts 19.23s
src/gateway/server-methods.presence-activity.test.ts 17.20s
src/gateway/node-registry.presence.test.ts 3.80s
extensions/geolocation/index.test.ts 28.02s
extensions/geolocation/src/lookup-route.test.ts 2.45s
src/gateway/server/client-presence.test.ts 12.65s
src/worker/worker-connection.test.ts 4.68s
src/agents/tools/presence-tool.test.ts 47.39s (real router/import and worker preparation dominate)
src/gateway/worker-environments/worker-session-tool-executor.test.ts 58.22s (existing database/placement fixtures and imports dominate)
src/gateway/server-methods-list.test.ts 41.47s (under 1s test work; imports/compiler preparation dominate)
src/gateway/mcp-http.keepalive.test.ts 28.126s median across 20 fresh processes

The source-authorization file exercises the real router and summary handler, and the worker file exercises real placement and scheduled admission; a pure predicate test cannot prove these boundaries. Existing worker fixtures are reused. The final-head CI completed in 1,493s: 187 successful jobs and 9 skipped. Earlier successful hosted runtime shards took 654s (small-37) and 1009s (large-11), including runner setup.

@clawsweeper

clawsweeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: android App: android app: web-ui App: web-ui gateway Gateway runtime scripts Repository scripts agents Agent runtime and tooling plugin: workboard plugin: geolocation Geolocation plugin (IP to coarse city) size: XL labels Sep 26, 2026
@clawsweeper clawsweeper Bot added P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 26, 2026
@clawsweeper

clawsweeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 27, 2026, 7:22 AM ET / 11:22 UTC (Revision 21).

ClawSweeper review

What this changes

Adds a read-only presence tool so agents can query connected people, devices, activity, and optional IP location through the Gateway, including from compatible remote workers.

Merge readiness

⛔ Blocked before merge - 3 items remain

Keep open. Current main exposes raw presence but lacks an agent-facing query for online people and device activity. The introduced Gateway and worker paths are coherent, and this review found no concrete blocking defect.

Priority: P2
Reviewed head: ab9123e8d373acb1adf299289b695be4b8db2586

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The feature has coherent owner boundaries, direct transport and authority coverage, and visible catalog evidence, with no concrete blocking finding.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The maintainer-authored PR is exempt from the external-contributor real-setup gate. Inspected synthetic screenshots show tool discovery, and Gateway WebSocket and agent-router tests cover the query and denied or revoked readers; the PR reports no deployed agent turn. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored PR is exempt from the external-contributor real-setup gate. Inspected synthetic screenshots show tool discovery, and Gateway WebSocket and agent-router tests cover the query and denied or revoked readers; the PR reports no deployed agent turn. No stored-data contract changes.
Evidence reviewed 11 items Current main lacks the agent tool: The hosted Gateway tool list on fetched main has no presence tool; its method catalog retains raw system-presence and presence.activity without presence.query.
Introduced agent entry point: The new tool captures source authority before making a Gateway presence.query request.
Live Gateway query: The handler checks current request authority after optional asynchronous location lookup and rebuilds the response from live connection and node snapshots.
Findings None None.
Security None None.

How this fits together

The Gateway receives live connection and node activity from clients. Its presence query groups those observations by person and device, checks the requester's authority, and returns a snapshot to an agent or Gateway client.

flowchart LR
  A[Connected clients and nodes] --> B[Gateway presence snapshot]
  C[Agent or remote worker] --> D[Live read authorization]
  D --> B
  B --> E[Person and device summary]
  F[Local IP location plugin] --> E
  E --> G[Agent answer]
Loading

Before merge

  • Resolve review confidence - ClawSweeper must reach high confidence before merge readiness is known.
  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

Metric Value Why it matters
Production and test lines production +1,634/−335; tests +1,731/−381 The substantial production growth spans the justified Gateway, worker, native protocol, and plugin wiring for one query; no stored-state migration is added.

Stored data model

Persistent data-model change detected: unknown-data-model-change: packages/gateway-protocol/src/schema/presence.ts, unknown-data-model-change: packages/gateway-protocol/src/schema/worker-admission.ts, unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep the Gateway as the live presence owner, preserve source-bound reads from local and remote agents, and leave IP geography with the geolocation plugin without retaining activity history.

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

Not applicable: this proposes a new agent capability. Current main's hosted tool list and method catalog establish that the query is absent.

Is this the best way to solve the issue?

Yes. The Gateway already owns connections and identity, while the existing geolocation plugin owns address lookup; the branch uses those owners and gates remote-worker access on its original reader.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 4f227c5c76a6.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a useful but non-urgent agent capability with bounded impact.
  • merge-risk: 🚨 security-boundary: Agent and worker reads carry live human authority into cross-person presence, activity, and optional IP results; the stated operator.read scope and source checks define the intended boundary.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored PR is exempt from the external-contributor real-setup gate. Inspected synthetic screenshots show tool discovery, and Gateway WebSocket and agent-router tests cover the query and denied or revoked readers; the PR reports no deployed agent turn. No stored-data contract changes.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The maintainer-authored PR is exempt from the external-contributor real-setup gate. Inspected synthetic screenshots show tool discovery, and Gateway WebSocket and agent-router tests cover the query and denied or revoked readers; the PR reports no deployed agent turn. No stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit fc60bf0 adds src/gateway/node-registry.presence.ts:17 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: fc60bf09f224; files: src/gateway/node-registry.presence.ts)
  • RoboClaw: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (20 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-27T04:17:33.821Z sha 3391daa :: blocked before merge. :: none
  • reviewed 2026-09-27T04:26:52.640Z sha 3391daa :: blocked before merge. :: none
  • reviewed 2026-09-27T04:55:38.255Z sha f0978b762f7837e0c3e2286064d8346f8e0e58f6 :: blocked before merge. :: none
  • reviewed 2026-09-27T05:29:51.370Z sha f0978b762f7837e0c3e2286064d8346f8e0e58f6 :: blocked before merge. :: none
  • reviewed 2026-09-27T06:12:55.179Z sha 682d3b6 :: blocked before merge. :: none
  • reviewed 2026-09-27T07:05:32.507Z sha 682d3b6 :: blocked before merge. :: none
  • reviewed 2026-09-27T09:21:40.401Z sha 0b22147 :: blocked before merge. :: none
  • reviewed 2026-09-27T11:10:33.607Z sha 0b22147 :: blocked before merge. :: none

@steipete
steipete force-pushed the codex/unified-presence branch from d28f65d to 41e895c Compare September 26, 2026 19:32
@steipete
steipete marked this pull request as ready for review September 26, 2026 19:35
@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components. This comment is informational because the PR author has repository Maintain or Admin access.

  • Current SHA: ab9123e8d373acb1adf299289b695be4b8db2586
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/agents/cron-creator-authority-context.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/agents/tools/presence-tool-authority.ts: Controls credential persistence, secret resolution, or redaction. Check storage permissions, credential scope, and exposure in logs or responses.
  • src/gateway/methods/core-descriptors.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/methods/core-profile-access.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/server/ws-connection/connect-session.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/server/ws-connection/worker-connection-dispatch.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/server/ws-connection/worker-connection.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

@steipete
steipete marked this pull request as draft September 26, 2026 20:32
@clawsweeper clawsweeper Bot added the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Sep 26, 2026
@steipete
steipete marked this pull request as ready for review September 26, 2026 21:20
@clawsweeper clawsweeper Bot added 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. and removed P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Sep 26, 2026
@steipete
steipete force-pushed the codex/unified-presence branch from 682d3b6 to 0b22147 Compare September 27, 2026 09:11
Expose a read-only presence tool for online people, requester-scoped device activity, and optional network and IP geography. Reuse live connection, profile, node, and geolocation owners; preserve activity provenance and worker requester authority without retaining activity history.
Preserve authenticated Team read scopes and explicitly admitted owner or scheduled sources before synthetic Gateway dispatch. Retain the same source through worker execution and revalidate before returning observations. Append the advertised RPC to preserve existing method indices.

Include the already-landed c0e6951 Cron fixture scheduler corrections so the branch typechecks independently. Add real local router and worker admission regressions for unknown, limited, scheduled, and revoked sources.
Keep the negative-type assertion from #159132 explicit in the inventory and bind its allowance to the exact synthetic invalid-input fixture. The existing zero-any and inventory checks remain active, and a changed-input control fails at the fixture qualification.
@steipete
steipete force-pushed the codex/unified-presence branch from 0b22147 to ab9123e Compare September 27, 2026 11:13
@steipete
steipete enabled auto-merge (squash) September 27, 2026 11:34
@steipete
steipete merged commit fe609d4 into main Sep 27, 2026
248 checks passed
@steipete
steipete deleted the codex/unified-presence branch September 27, 2026 11:38
@domenicogirolamo24-hub

Copy link
Copy Markdown

What Problem This Solves

Agents could not directly answer who is online or identify which connected machine produced a person’s latest activity. Raw presence duplicated tabs, and the active-computer prompt hint selected one machine across the whole Gateway.

User Impact

The core presence tool supports list, person, and device reads on personal and shared Gateways, including compatible remote workers. person accepts me, a returned ID, or an unambiguous name. Agents can optionally include devices, observed IPs, client time zones, and approximate IP locations; list limits default to 50 and cap at 100.

Names are grouped by qualified identity, activity retains its source device, and active-computer hints follow the requesting person. Shared or unidentified machines remain separate. This reads current connected presence; it adds no durable activity history, GPS sampling, storage migration, numeric protocol-version bump, or permission scope.

Why This Change Was Made

The query reuses existing connection, identity, node, and geolocation owners. Main’s presence.activity reporter feeds the same activity owner: the UI keeps person-wide OpenClaw interaction timing for idle labels, while the agent retains per-connection and source-labelled native device activity. UI and agent reads share identity grouping.

Reads preserve the original requester and recheck live authority after asynchronous work. Authenticated readers retain operator.read access; unknown callers cannot inherit synthetic System read access. Worker authority stays on the admitting Gateway’s live owner. Optional location enrichment uses the existing local database with a five-minute cold-lookup budget. Existing raw system-presence clients retain their contract; older workers omit the unsupported tool.

Evidence

  • The integrated activity/query/node/UI selection passed 90 tests in 60.15s. The registered activity RPC test preserves distinct per-tab timestamps alongside the shared person timestamp. Disabling per-connection recording made that assertion fail; exact source restoration passes all six file cases in 17.20s.
  • The actual tool → Gateway router → live summary regression rejects unidentified callers before roster access, preserves authenticated non-owner readers, and withholds revoked delayed results. Worker tests cover real scheduled admission → identity preparation → executor and transport timeout/revocation boundaries.
  • Full independent review of the integrated feature is clean through P2. The additive method catalog preserves main’s existing positions, and native schemas are generated canonically. All 16 native wrapper extraction tests pass after including the inline activity validator’s runtime dependency.
  • A full local build passed in 21m12.6s, and hosted builds passed on subsequent published heads. The fully green predecessor CI on f0978b762f78 had 187 successful jobs and 9 skipped. The later comment-only CLI rebase passed 204 affected tests; the current activity integration passed changed-file checks, core/UI typechecks, all core test type graphs, and full protocol checks. Final hosted checks are pending.
  • Synthetic catalog screenshots below prove discovery. Execution and permissions are covered by the real Gateway and worker boundaries. No production Gateway was deployed or restarted.
CI repairs and remaining diagnostic limits

The branch repairs missing display metadata, append-only native method ordering, native wrapper extraction inventory, and the MCP heartbeat fixture’s assumption that buffered heartbeats disappear at shutdown. The MCP fixture now drains to EOF within its unchanged deadline; 20 fresh processes passed 100 tests. Main owns the incorporated scheduler, suppression-inventory, database-cleanup, and roster repairs, including #159103, #159163, #159340, #159394, and #159553; duplicate branch work was removed. The approved three-entry lint inventory expansion is already in main.

An earlier macOS lipo process-cleanup failure did not reproduce in its original 553-test selection; no fix was claimed. A separate unchanged SIWC callback-port retry failure did not reproduce in the original 39-file, two-worker selection: 922 passed/1 skipped in 628.96s on Node 24.21. Its original terminal error omitted the message, so the cause remains unproven.

The unchanged legacy webhook listener fixture twice hit Linux EADDRINUSE in different cases. A macOS replay passed, but used Node 24.21 rather than failing Blacksmith’s 24.19. The matching Linux original selection then passed 1,452 tests/5 skipped in 99.74s; five instrumented fresh fixture processes passed all 65 cases and captured only the intentionally occupied port. Node/libuv and cooperative-lock audits established no safe repair. The source, assertions, timeouts, and suppressions remain unchanged; the original failures and non-reproduction remain documented under the best-effort policy. Later hosted runs passed these runtime shards. Linux Testbox evidence, lease tbx_01m3grwkvf0ez2493c9z5bm5bn, is completed/stopped.

The later Android ChatControllerBranchCoordinationTest.rewindInvalidatesAHistoryResponseStartedBeforeTheMutation stalled in its coroutine body for 60 seconds. Controller, test, and dependencies are identical in both CI merge parents; the presence Android delta is only the generated method entry. A configured Blacksmith Testbox source-verified probe could not run the class because the prepared environment lacked CI’s pinned JDK 21.0.12.1, Android platform 37.0, and Robolectric initialization/cache. No Android test ran in that probe; the lease is stopped. Environment-gap evidence. The cause remains unproven; required Android CI remains the verification gate, with no timeout or assertion changes.

Platform failures were distinct: one Rust installation failed on runner DNS; a later iPhone simulator reboot was killed before UI tests. iPad built and passed two screenshots, then XCTest timed out after 60s while Xcode acknowledged launch only after 77.7s. The artifact shows OpenClaw subsequently launched and became active, with no crash. No app readiness timeout or product code was changed for these failures.

Catalog discovery (synthetic)

Same Settings → Agents → Tools renderer and viewport, using the actual base and PR catalogs with a synthetic Demo Agent. The mock runtime preview is empty ("Not listed"); these images prove catalog discovery and enabled defaults. Gateway and worker tests prove execution.

Before:

Tools catalog before presence

After:

Tools catalog with presence

Focused test cost

Measured individually with pnpm test <file> --maxWorkers=1; these wall times include wrapper/import overhead. Existing larger suites reuse their fixtures, and the cold-lookup regression advances a fake clock instead of sleeping.

File Local wall
src/gateway/server-methods/presence.test.ts 19.23s
src/gateway/server-methods.presence-activity.test.ts 17.20s
src/gateway/node-registry.presence.test.ts 3.80s
extensions/geolocation/index.test.ts 28.02s
extensions/geolocation/src/lookup-route.test.ts 2.45s
src/gateway/server/client-presence.test.ts 12.65s
src/worker/worker-connection.test.ts 4.68s
src/agents/tools/presence-tool.test.ts 47.39s (real router/import and worker preparation dominate)
src/gateway/worker-environments/worker-session-tool-executor.test.ts 58.22s (existing database/placement fixtures and imports dominate)
src/gateway/server-methods-list.test.ts 41.47s (under 1s test work; imports/compiler preparation dominate)
src/gateway/mcp-http.keepalive.test.ts 28.126s median across 20 fresh processes

The source-authorization file exercises the real router and summary handler, and the worker file exercises real placement and scheduled admission; a pure predicate test cannot prove these boundaries. Existing worker fixtures are reused. The full green predecessor CI took 29m52s: 187 successful jobs and 9 skipped. Subsequent hosted runtime shards passed in 654s (small-37) and 1009s (large-11), including runner setup. Final-head evidence will be recorded when complete.

@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash auto-merge.

vincentkoc added a commit that referenced this pull request Sep 27, 2026
* commit '69809d7a94277d01be964bd1cbbb7aa0ebc58c9b': (219 commits)
  perf(agents): serialize large model requests once (#159574)
  refactor(cli): share capability agent-selection test cases (#159616)
  fix(workers): restore installation type checks (#159629)
  test(channels,qa,providers): remove low-value tests (batch d065) (#159627)
  test(doctor): run isolated migration cases concurrently (#159609)
  feat(apple): show agent identities in native chat (#159528)
  chore(i18n): refresh native locales (#159635)
  fix(gateway): keep node provisioning's installation contract after overlapped preparation
  fix(models): keep shared catalog requests alive for remaining callers (#157191)
  feat: let agents query online people and device activity (#159117)
  perf(gateway): first cloud dispatch prepares worker artifacts one after another (#159520)
  refactor(android): deslop Android app third pass (#159589)
  test(qa-lab,openshell,slack,reef,team-reports): remove low-value tests (batch d064) (#159607)
  fix: align process liveness checks (#151107) thanks @ekinnee
  fix: sessions model default does not clear the override (#159587)
  fix(ios): preserve typing during reentrant SwiftUI updates
  fix(ci): frozen 2026.8.33 validation fails on inherited test clock (#159594)
  perf(gateway): avoid duplicate recipient row lookup (#159595)
  refactor(gateway): deslop gateway fourth pass (#158786)
  test(agents): split subagent task-settlement test support under the line cap (#159584)
  ...
vincentkoc added a commit that referenced this pull request Sep 27, 2026
* commit '69809d7a94277d01be964bd1cbbb7aa0ebc58c9b': (219 commits)
  perf(agents): serialize large model requests once (#159574)
  refactor(cli): share capability agent-selection test cases (#159616)
  fix(workers): restore installation type checks (#159629)
  test(channels,qa,providers): remove low-value tests (batch d065) (#159627)
  test(doctor): run isolated migration cases concurrently (#159609)
  feat(apple): show agent identities in native chat (#159528)
  chore(i18n): refresh native locales (#159635)
  fix(gateway): keep node provisioning's installation contract after overlapped preparation
  fix(models): keep shared catalog requests alive for remaining callers (#157191)
  feat: let agents query online people and device activity (#159117)
  perf(gateway): first cloud dispatch prepares worker artifacts one after another (#159520)
  refactor(android): deslop Android app third pass (#159589)
  test(qa-lab,openshell,slack,reef,team-reports): remove low-value tests (batch d064) (#159607)
  fix: align process liveness checks (#151107) thanks @ekinnee
  fix: sessions model default does not clear the override (#159587)
  fix(ios): preserve typing during reentrant SwiftUI updates
  fix(ci): frozen 2026.8.33 validation fails on inherited test clock (#159594)
  perf(gateway): avoid duplicate recipient row lookup (#159595)
  refactor(gateway): deslop gateway fourth pass (#158786)
  test(agents): split subagent task-settlement test support under the line cap (#159584)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 28, 2026
…9117)

* feat(presence): let agents inspect people and active devices

Expose a read-only presence tool for online people, requester-scoped device activity, and optional network and IP geography. Reuse live connection, profile, node, and geolocation owners; preserve activity provenance and worker requester authority without retaining activity history.

* fix(presence): register tool display metadata

* fix(presence): require live source authority for agent reads

Preserve authenticated Team read scopes and explicitly admitted owner or scheduled sources before synthetic Gateway dispatch. Retain the same source through worker execution and revalidate before returning observations. Append the advertised RPC to preserve existing method indices.

Include the already-landed 03f9f7e Cron fixture scheduler corrections so the branch typechecks independently. Add real local router and worker admission regressions for unknown, limited, scheduled, and revoked sources.

* fix(protocol): regenerate appended presence method enum

* fix(tooling): include presence schema in PR wrapper extraction

* test(gateway): drain buffered MCP keepalives on shutdown

* test: qualify synthetic approval kind assertion

Keep the negative-type assertion from openclaw#159132 explicit in the inventory and bind its allowance to the exact synthetic invalid-input fixture. The existing zero-any and inventory checks remain active, and a changed-input control fails at the fixture qualification.

* test(presence): reconcile rebased lookup and inventory fixtures

* build(presence): refresh plugin assets after dependency update

* test(presence): verify activity reporting retains device attribution
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: android App: android app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. plugin: geolocation Geolocation plugin (IP to coarse city) plugin: workboard proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts security-sensitive-changed size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants