Repository navigation
fix(apps): restore live session updates after native reconnects - #113634
Merged
Merged
Conversation
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 26, 2026
…claw#113634) * fix(apps): replay session visibility across native reconnects * fix(apps): refresh shifted native i18n source lines --------- Co-authored-by: Peter Steinberger <[email protected]>
steipete
added a commit
that referenced
this pull request
Oct 13, 2026
Remove duplicate visibility/cache/startup state and unreachable platform/encoder fallbacks in old iOS and Android files. Share outside-tap recognition and let the node invoke boundary own mirrored-notification normalization. Keep physical-route authorization, permission checks, durable Watch admission and ACKs, FIFO sends, protocol/data shapes, and ordinary concurrency. Net production reduction: 289 LOC, excluding tests, fixtures, and generated files. Proof: iPhone app/Share/embedded Watch builds, final 273 invoke/Watch ingress/delegate/location tests and 74 sidebar/dashboard tests; Watch scheme build and 11 media tests; Android APK and 89 distinct focused unit cases; 18 shared source-resource tests. Changed-file guards, native lint, runtime/Madge cycles (zero), lint-suppressions (3 tests), and final independent P0-P2 review pass. No hosted CI or hardware/provider-audio/battery proof is claimed. Best-effort tradeoffs accepted: - Observer declarations (#113634): synthetic stale-ACK fencing is replaced by FIFO sends and subscription/reconnect replay; failed or obsolete metadata heals on the next declaration. - Dashboard refresh (#111339): the sole SwiftUI refresh task is sequential and cancellation-owned, so a second generation counter is redundant; a future concurrent direct caller must cancel prior work or accept last-completing cosmetic data until refresh. Roster event/mutation overlap still retains its own generation. - Delayed cosmetic actions (#113062): the synthetic post-delay interleaving no longer needs generations; replacing an action does not revoke work that already started. - Delayed gate lifetime (#113062): both real view owners cancel on disappearance, so a second weak-gate lifetime condition is redundant; a future caller omitting cancellation may still perform a harmless cosmetic completion after releasing its gate. - Watch one-shot transport (#135808): cancelled instances cannot restart, so generations add no supported lifetime; cancellation and physical-resource checks remain. - Command advertisements (#136192): the synthetic synchronous preference flip may briefly split a command family until reconnect; live invocation admission remains. - Turn recaps (#112221/#113084): synthetic metadata-only mode and a duplicated pending terminal value are removed; the sole production caller always provides transcript facts, and same-timestamp metadata corrections now use the latest authoritative session row. History/terminal attribution, settlement bounds and all 21 retained tests remain. - Realtime coordinator (#111033): direct concurrent reset/reuse is unsupported by serialized phone/Wear callers; current-session, duplicate-run, and live-submit guards remain. - Network availability (#138732): an unexpected duplicate SDK AVAILABLE may wake offline retry early; the human battery fix (#127872), retry ladder, and current-session admission remain. - iOS resource adapter (#148906): a captured invalidated loader may redundantly reload current metadata; the shared cache owner still cancels stale in-flight results and live authority remains checked. - Watch startup buffer (5e9bc09): synchronous MainActor registration cannot interleave with queued inbound delivery; a future caller yielding before registration may drop ephemeral requests, never ACK uncommitted chat. - Mirror validation (#23636): the sole caller supplies normalized bounded fields; future internal callers must preserve that precondition. - Beacon payload UTF-8 (#73330): Foundation JSONEncoder guarantees the bytes; a framework contract violation is an internal failure, not a recoverable conversion branch. - Beacon envelope UTF-8 (#73330): the same guarantee removes the second conversion fallback; actual encoding errors still throw. - Watch request UTF-8 (#135808): default encoder output cannot fail UTF-8 conversion; actual encoding errors still throw. - Location event UTF-8 (#18260): default encoder output cannot fail UTF-8 conversion; nonfinite-value encoding failures keep their existing handling. - HealthKit identifiers (#105616): fixed supported identifiers use nonfailable SDK constructors; authorization, privacy scope, and queries remain unchanged. - Pre-iOS26 button fallback (#168595): the existing native deployment floor is26.2, so supported rendering is unchanged. - Pre-Android26 priority fallback (#29398): the app minimum is31; notification-channel importance remains the active owner. - WebView task document fences (#139514): existing MainActor cancellation-at-effect already rejects retired callbacks; navigation and document authority remain. (cherry picked from commit 3dd5a00)
This was referenced Oct 13, 2026
Merged
steipete
added a commit
that referenced
this pull request
Oct 13, 2026
* refactor(apple): simplify old shared and macOS bookkeeping Replace redundant generations with existing cancellation or actual owner identity, consolidate parallel fallback/policy paths, and remove test-only forwarding layers. Preserve authority, FIFO, durable state, resource bounds, public protocol/config shapes, signing, permissions, and visible rendering. Reuse canonical session-key normalization for Voice Wake delivery selection: opaque Signal group IDs remain case-sensitive and main aliases are not added. Use canonical IP-literal policy for discovery labels and remote CLI validation. Best-effort tradeoffs accepted - Palette generation (#159350): synthetic direct completions bypassed the sole cancellation-owning caller; unsupported future callers can show stale results until the next search. Current cancellation/request/agent checks remain. - Link preview generation (#160710): synthetic URL replacement without caller cancellation is outside the SwiftUI task lifecycle; a late cosmetic result can remain until the next refresh. Network/SSRF checks and bounded caches remain. - Sidebar preview generation (#147197): same-request overlapping cache reads can finish out of order; no linked human failure report, and a later refresh replaces the cosmetic projection. Owner/request checks remain. - Source-preview producer revision (#148906): duplicate of exact task cancellation, with no human failure report. Consumer revision and authenticated resource authority remain. - Mermaid generations (#135470/#135746): feature stress fixtures, no linked human race report. Exact subscriber cancellation and job/WebView identity retain the same admission; no extra failure accepted. - Camera JPEG UUID (#107879): duplicates exact task cancellation; #107804 was a human feature request, not a generation-specific incident. Captured session/agent/route and attachment admission remain. - Discovery generation (#145435): speculative queued callbacks, no linked human incident. A stopped browser may publish one late discovery projection; next discovery/refresh repairs it. Connection authority remains separate. - FSEvents generation (#145453): synthetic stop/restart fixtures, no linked human incident. An old callback after restart may cause one extra refresh; serial lifecycle ownership and pending-work cancellation remain. - Menu generations (#139688): feature-local late-result fixtures, no linked human incident. Exact task cancellation replaces duplicate tokens; drain-before-disconnect and real consumer/window authority remain. - Cron generation (#131466/#137502): #138209 cut every load over to one cancel-and-drain chain. No direct concurrent load caller remains; cancellation and physical source leases stay checked after awaits. - WebChat visibility acknowledgement/retry (#113634/#137089): synthetic timeout/reconnect interleavings, no linked human incident. A timed-out visibility update is best effort until the next transition/reconnect; FIFO and live socket leases remain. - WebChat cleanup UUID (#113634/#137089): retain one bounded completed Task handle per live connection instead of matching cleanup tokens. Completion releases captures; replacement/retirement removes the handle. - Child-exit polling (#145437): synthetic missed-notification coverage, no linked human report. A lost OS exit notification may wait for the existing deadline; final non-reaping liveness/status checks and cleanup remain. - Realtime iterator borrowing trap (#156772): every real consumer awaits its own iterator sequentially. Unsupported concurrent next calls no longer get a custom custody protocol; bounded stream/cancellation/socket checks remain. - Receipt projection admission (#161745): both real callers already match receipt and row identity immediately before synchronous projection. Those effect checks remain; no unsupported internal caller is defended twice. - Recap attribution heuristics (#112188/#113084): synthetic guard matrix, no linked human race report. Missing initial rows or very late unrelated completion may supply a cosmetic footer; per-session freshness, failed-turn handling and settled results remain. - PortGuardian per-write schema scans (#110527): synthetic live-handle version advance, no linked human incident. Concurrent external schema upgrades are best effort until reopen; initial admission, migration locks, receipts, transactions and durability remain. - Unread queue counter (#110019): actual Task equality replaces the duplicate integer token. Exact-tail reclamation, bounded bookkeeping, FIFO and route authority remain unchanged. Review dispositions: the claimed Task compilation failure is disproved by the selected SDK's Equatable conformance and native builds. Repeated receipt identity admission is unnecessary at its internal projector because both real callers retain it immediately before projection. Per-write schema revalidation was declined under the explicit best-effort policy above. Proof and scope Net production reduction: 369 lines (148 added, 517 deleted), excluding tests. Fresh seven-day census permits all substantive production edits; the only recent caller change is the unavoidable one-line fallback-to-parse rename. Shared Swift build passed. Final focused shared tests passed 396 cases in six suites (6.683s execution), Watch decoder tests passed five cases (0.003s), and isolated whole-owner native tests passed 16 cases. macOS SwiftPM compiled all products and the test bundle. Final macOS and iOS/Watch xcodebuild builds passed (89.60s and 120.87s wall), without signing changes or app launches. Canonical Apple lint/format checks passed; the initial iOS format failure in WatchCommands was ours and corrected, with no gate weakened. Lint-suppression tests passed 3/3 (14.09s wall). Earlier runtime cycles and Madge each reported 0; the TypeScript graph is unchanged. Native localization stayed at 4476 entries. The 45 original packaging/elevation timeout cases passed one focused retry (94.79s wall), with no assertion/budget change and no claim of a diagnosed fix. Known gaps: seven issues remained in the earlier ChatStreamReplayTests narration=false package cases; causality/current-main attribution is unproven. App-hosted macOS tests were not executed on the operator desktop. No hosted CI or PR was started: the explicit BELOW-500 rule requires a branch-only handoff. * refactor(ui): consolidate old UI owners and validation Share route decoding, attachment retention, gallery preparation, transient identity encoding, override copying, and extension classification. Remove duplicate admission/schema mirrors and obsolete supported-browser fallbacks. Both Lit and Solid paths remain; no rendering change is intended. No config, protocol, persisted shape, dependency, or public SDK change. Best-effort tradeoffs accepted - Malformed internal native requests (#140988): all callers are typed and native hosts validate at the effect; their error replaces the renderer mirror. - Worker replacement during an identity query (#140484): added for synthetic autoreview interleavings, not a human incident. Return false; normal worker announcements and foreground recovery observe the next active worker. - Native readiness changing between synchronous checks (#140484/#109719): rely on queued events. A broken native event can require another worker event or reload; camera readiness retains its existing five-second error deadline. - Overlapping application-root health reporters (#152638): startup mounts one root. Unsupported overlapping roots are last-publication-wins; the actual reported health/status feature and native trusted-document checks remain. - Polling after stop (#139704): its sole owner retires eligibility first. Scheduling now uses that owner admission, not a separate read-only generation. - Resetting an observer without retiring its connection (#116887): no production caller does this. Canonical connection epochs remain the sole retirement owner; unsupported direct live-scope reset no longer fences an old response separately. - Upload policy changing during local reads (#158567): decoded/hash work can finish. Draft publication and every upload request retain live policy checks. - Missing supported browser primitives (#105240/#151388/#100024/#102745): unsupported runtimes error instead of code-point initials, skipped input yield, wall-clock timing, or approximate microtask paint. The human progress-card fix in #151386 keeps its browser yield and durable FIFO handoff unchanged. - URL APIs disappearing after URL creation (#100024/#149330): supported browsers keep paired APIs. An unsupported replaced global can throw during cleanup; undefined URLs, creation fallback, cancellation and release ordering remain. - Malformed internal MCP calls bypassing AppBridge (#161747): may throw. The SDK still rejects malformed wire blocks before dispatch, proved over real in-memory App/AppBridge transport. UI content, authority, confirmation and custody policy remain. The introducing PR cites no human incident for the second mirror. Production: +176/-394, net -218 lines across 21 eligible old files. Tests: +30. Focused owner/sibling tests, targeted types/lint/format, lint-suppression and independent P0-P2 review pass. Import edges are unchanged; runtime/Madge cycle proof remains zero. Whole-tree Knip timed out at existing limits; heavy gallery renderer runs did not reach assertions, while its owning controller suite passed. * refactor(ui): remove obsolete Fetch capability branch The supported Control UI browser floor includes Fetch. Start attachment metadata reads directly rather than leaving an unsupported runtime in a permanent checking state. Best-effort tradeoffs accepted - Missing global Fetch: the guard originated in #64104, whose feature report cites no human missing-Fetch incident. An unsupported runtime that replaces Fetch now reaches the existing rejected-request/unavailable path. Metadata validation, auth/tickets, allow POST, cancellation, resource admission, expiry and bounded retry remain unchanged. No intended rendering change. Unchanged lifecycle baseline: 21/21, 25.09 s. Final lifecycle and attachment siblings: 50/50, 14.77 s. UI types, typed lint, formatting and lint-suppression checks pass. This cut removes five production lines including formatter reflow, bringing the lane to 223 net production lines removed. Fresh independent P0-P2 review is scoped-clean with no actionable findings. * fix(ui): use global frame scheduling APIs Preserve double-frame paint timing and cancellation without requiring a Window object in renderer-free hosts that supply the standard global APIs. The existing access suite reproduces seven unhandled errors before this fix and passes on main; all 130 affected cases plus 262 timing/state/send sibling cases now pass without test changes.
steipete
added a commit
that referenced
this pull request
Oct 13, 2026
…el and native code (#170815) * fix(signal): reserve canonical default transport during legacy cleanup Keep the canonical root transport in managed-port reservations when a nested default account still carries retired transport fields. Otherwise Doctor can allocate the default port to an implicit sibling and produce a collision. Cover synchronous and asynchronous Doctor migration, nested-field cleanup, and resolving both accounts to distinct ports. No new configuration surface or persisted format; existing update/Doctor ownership stays authoritative. * fix(channels): keep message content out of transport diagnostics Remove raw content from IRC line/NOTICE, WhatsApp mention/skip, LINE inbound and postback, Twitch callback, iMessage echo, and Tlon settings diagnostics. Retain metadata and the complete payload in its delivery/history owner. LINE peer routing also consumes already prepared source facts instead of reinspecting the same source through a one-use helper. Extend existing owning-boundary tests, including real IRC sockets, rather than adding a separate logging implementation. IRC, WhatsApp, and Tlon privacy probes failed on the old path and pass with content preserved. * refactor(channels): simplify old transport helpers and lifecycle state Consolidate Matrix send preparation, Zalo account/error traversal onto existing SDK seams, and Google Meet CLI dispatch. Remove pass-through Promise wrappers, duplicate lifecycle facts, and internal clock defenses. Keep transport validation, effect authority, FIFO and durable shutdown. Best-effort tradeoffs accepted: - Internal cache/follow-up clocks are ordinary Date.now plus constant TTLs; synthetic invalid-clock cases are not actual-use incidents. A corrupt clock may distort metadata expiry until repair/restart. - FaceTime does not fence unsupported start-before-stop reentry; its runtime creates a new supervisor after joined shutdown. Initial feature #119291 introduced the generation, without a human reentry incident. - LINE uses timer cancellation and its stop Promise, not a second stopped flag. Synchronous stop reentry is not performed by production callers. - Mattermost uses one stopped fact, recursive polling and native Promise settlement; synchronous callbacks cannot interleave with cancellation. - Teams uses a fresh UUID without reparsing text to reject a theoretical authored-placeholder collision; no human collision report was identified. - FaceTime expects the documented system_profiler JSON output; malformed output reports missing devices instead of parsing old plaintext fixtures. - Feishu serialization rejects cycles before element counting; exotic getter/toJSON objects remain best effort rather than a second graph walk. - Zalo shares SDK error traversal; provider errors with throwing cause getters remain best effort rather than a private short-circuit walker. - ClickClack uses the timeout race winner directly; exact-deadline late microtasks can discard stale ephemeral details, never the durable reply. - Raft's private FIFO settles replay commits before another claim. If that invariant were violated, an unexpected inflight wake is a duplicate hint rather than a second settlement path. #109117 gives synthetic/generic ownership reasoning, not a human actual-use incident. Old-code lane o07: production files checked against the last-seven-day origin/main inventory. No SDK exports, dependencies, schemas or protocols changed. Standalone session memory remains untouched. * refactor(mobile): simplify old native lifecycle bookkeeping Remove duplicate visibility/cache/startup state and unreachable platform/encoder fallbacks in old iOS and Android files. Share outside-tap recognition and let the node invoke boundary own mirrored-notification normalization. Keep physical-route authorization, permission checks, durable Watch admission and ACKs, FIFO sends, protocol/data shapes, and ordinary concurrency. Net production reduction: 289 LOC, excluding tests, fixtures, and generated files. Proof: iPhone app/Share/embedded Watch builds, final 273 invoke/Watch ingress/delegate/location tests and 74 sidebar/dashboard tests; Watch scheme build and 11 media tests; Android APK and 89 distinct focused unit cases; 18 shared source-resource tests. Changed-file guards, native lint, runtime/Madge cycles (zero), lint-suppressions (3 tests), and final independent P0-P2 review pass. No hosted CI or hardware/provider-audio/battery proof is claimed. Best-effort tradeoffs accepted: - Observer declarations (#113634): synthetic stale-ACK fencing is replaced by FIFO sends and subscription/reconnect replay; failed or obsolete metadata heals on the next declaration. - Dashboard refresh (#111339): the sole SwiftUI refresh task is sequential and cancellation-owned, so a second generation counter is redundant; a future concurrent direct caller must cancel prior work or accept last-completing cosmetic data until refresh. Roster event/mutation overlap still retains its own generation. - Delayed cosmetic actions (#113062): the synthetic post-delay interleaving no longer needs generations; replacing an action does not revoke work that already started. - Delayed gate lifetime (#113062): both real view owners cancel on disappearance, so a second weak-gate lifetime condition is redundant; a future caller omitting cancellation may still perform a harmless cosmetic completion after releasing its gate. - Watch one-shot transport (#135808): cancelled instances cannot restart, so generations add no supported lifetime; cancellation and physical-resource checks remain. - Command advertisements (#136192): the synthetic synchronous preference flip may briefly split a command family until reconnect; live invocation admission remains. - Turn recaps (#112221/#113084): synthetic metadata-only mode and a duplicated pending terminal value are removed; the sole production caller always provides transcript facts, and same-timestamp metadata corrections now use the latest authoritative session row. History/terminal attribution, settlement bounds and all 21 retained tests remain. - Realtime coordinator (#111033): direct concurrent reset/reuse is unsupported by serialized phone/Wear callers; current-session, duplicate-run, and live-submit guards remain. - Network availability (#138732): an unexpected duplicate SDK AVAILABLE may wake offline retry early; the human battery fix (#127872), retry ladder, and current-session admission remain. - iOS resource adapter (#148906): a captured invalidated loader may redundantly reload current metadata; the shared cache owner still cancels stale in-flight results and live authority remains checked. - Watch startup buffer (5e9bc09): synchronous MainActor registration cannot interleave with queued inbound delivery; a future caller yielding before registration may drop ephemeral requests, never ACK uncommitted chat. - Mirror validation (#23636): the sole caller supplies normalized bounded fields; future internal callers must preserve that precondition. - Beacon payload UTF-8 (#73330): Foundation JSONEncoder guarantees the bytes; a framework contract violation is an internal failure, not a recoverable conversion branch. - Beacon envelope UTF-8 (#73330): the same guarantee removes the second conversion fallback; actual encoding errors still throw. - Watch request UTF-8 (#135808): default encoder output cannot fail UTF-8 conversion; actual encoding errors still throw. - Location event UTF-8 (#18260): default encoder output cannot fail UTF-8 conversion; nonfinite-value encoding failures keep their existing handling. - HealthKit identifiers (#105616): fixed supported identifiers use nonfailable SDK constructors; authorization, privacy scope, and queries remain unchanged. - Pre-iOS26 button fallback (#168595): the existing native deployment floor is26.2, so supported rendering is unchanged. - Pre-Android26 priority fallback (#29398): the app minimum is31; notification-channel importance remains the active owner. - WebView task document fences (#139514): existing MainActor cancellation-at-effect already rejects retired callbacks; navigation and document authority remain. (cherry picked from commit 3dd5a00) * refactor(ios): keep delayed cosmetic actions synchronous Both production callers update toast or flash state synchronously on MainActor. Remove the unused async action contract and invoke it directly after the existing sleep/cancellation boundary. Keep asynchronous sleeping, cancellation, replacement and the returned task unchanged. Best-effort tradeoffs accepted: - None added by this type narrowing. The helper is internal, both callers and all retained tests already supply synchronous actions. The hypothetical suspending action discussed with #113062 is not a supported caller and is no longer expressible through this API. Earlier guard-removal provenance and campaign proof are recorded in the preceding mobile cleanup commit. This follow-up changes no production LOC total, public protocol, permission, signing, dependency, persistence or visible rendering. Validation: iPhone app/Share/embedded Watch build and61 focused tests in2 suites pass (DelayedActionGateTests and RootTabsPresentationTests),196.654s xcodebuild/0.628s tests. Configured SwiftFormat and strict SwiftLint pass; independent P0-P2 review is scoped-clean. Earlier unchanged-input changed-file, cycle and lint-suppression gates remain valid. (cherry picked from commit c7c9fb6) * fix(mattermost): keep inbound message content out of diagnostics Log conversation, post ID and length instead of a body preview. Keep the complete agent body and attachment order unchanged, and update the existing monitor boundary test to reject content in diagnostics. The regression fails before the repair on the leaked synthetic body prefix after complete-body/ordered-media assertions pass, then passes after repair. Final owner24, sibling25 and lint-suppressions3 tests pass; runtime and Madge cycles are zero. Fresh production/test types, syntax lint, format and line-cap checks pass, with no baseline, suppression or timeout increase. This minimal privacy fix is explicitly authorized outside the old-code eligibility restriction. The combined channel/native patch received a fresh independent review with no actionable P0-P2 findings. * fix(ios): remove retired Watch error from i18n inventory * fix(mattermost): normalize nullable shutdown cleanup before await
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 14, 2026
…#170823) * refactor(apple): simplify old shared and macOS bookkeeping Replace redundant generations with existing cancellation or actual owner identity, consolidate parallel fallback/policy paths, and remove test-only forwarding layers. Preserve authority, FIFO, durable state, resource bounds, public protocol/config shapes, signing, permissions, and visible rendering. Reuse canonical session-key normalization for Voice Wake delivery selection: opaque Signal group IDs remain case-sensitive and main aliases are not added. Use canonical IP-literal policy for discovery labels and remote CLI validation. Best-effort tradeoffs accepted - Palette generation (openclaw#159350): synthetic direct completions bypassed the sole cancellation-owning caller; unsupported future callers can show stale results until the next search. Current cancellation/request/agent checks remain. - Link preview generation (openclaw#160710): synthetic URL replacement without caller cancellation is outside the SwiftUI task lifecycle; a late cosmetic result can remain until the next refresh. Network/SSRF checks and bounded caches remain. - Sidebar preview generation (openclaw#147197): same-request overlapping cache reads can finish out of order; no linked human failure report, and a later refresh replaces the cosmetic projection. Owner/request checks remain. - Source-preview producer revision (openclaw#148906): duplicate of exact task cancellation, with no human failure report. Consumer revision and authenticated resource authority remain. - Mermaid generations (openclaw#135470/openclaw#135746): feature stress fixtures, no linked human race report. Exact subscriber cancellation and job/WebView identity retain the same admission; no extra failure accepted. - Camera JPEG UUID (openclaw#107879): duplicates exact task cancellation; openclaw#107804 was a human feature request, not a generation-specific incident. Captured session/agent/route and attachment admission remain. - Discovery generation (openclaw#145435): speculative queued callbacks, no linked human incident. A stopped browser may publish one late discovery projection; next discovery/refresh repairs it. Connection authority remains separate. - FSEvents generation (openclaw#145453): synthetic stop/restart fixtures, no linked human incident. An old callback after restart may cause one extra refresh; serial lifecycle ownership and pending-work cancellation remain. - Menu generations (openclaw#139688): feature-local late-result fixtures, no linked human incident. Exact task cancellation replaces duplicate tokens; drain-before-disconnect and real consumer/window authority remain. - Cron generation (openclaw#131466/openclaw#137502): openclaw#138209 cut every load over to one cancel-and-drain chain. No direct concurrent load caller remains; cancellation and physical source leases stay checked after awaits. - WebChat visibility acknowledgement/retry (openclaw#113634/openclaw#137089): synthetic timeout/reconnect interleavings, no linked human incident. A timed-out visibility update is best effort until the next transition/reconnect; FIFO and live socket leases remain. - WebChat cleanup UUID (openclaw#113634/openclaw#137089): retain one bounded completed Task handle per live connection instead of matching cleanup tokens. Completion releases captures; replacement/retirement removes the handle. - Child-exit polling (openclaw#145437): synthetic missed-notification coverage, no linked human report. A lost OS exit notification may wait for the existing deadline; final non-reaping liveness/status checks and cleanup remain. - Realtime iterator borrowing trap (openclaw#156772): every real consumer awaits its own iterator sequentially. Unsupported concurrent next calls no longer get a custom custody protocol; bounded stream/cancellation/socket checks remain. - Receipt projection admission (openclaw#161745): both real callers already match receipt and row identity immediately before synchronous projection. Those effect checks remain; no unsupported internal caller is defended twice. - Recap attribution heuristics (openclaw#112188/openclaw#113084): synthetic guard matrix, no linked human race report. Missing initial rows or very late unrelated completion may supply a cosmetic footer; per-session freshness, failed-turn handling and settled results remain. - PortGuardian per-write schema scans (openclaw#110527): synthetic live-handle version advance, no linked human incident. Concurrent external schema upgrades are best effort until reopen; initial admission, migration locks, receipts, transactions and durability remain. - Unread queue counter (openclaw#110019): actual Task equality replaces the duplicate integer token. Exact-tail reclamation, bounded bookkeeping, FIFO and route authority remain unchanged. Review dispositions: the claimed Task compilation failure is disproved by the selected SDK's Equatable conformance and native builds. Repeated receipt identity admission is unnecessary at its internal projector because both real callers retain it immediately before projection. Per-write schema revalidation was declined under the explicit best-effort policy above. Proof and scope Net production reduction: 369 lines (148 added, 517 deleted), excluding tests. Fresh seven-day census permits all substantive production edits; the only recent caller change is the unavoidable one-line fallback-to-parse rename. Shared Swift build passed. Final focused shared tests passed 396 cases in six suites (6.683s execution), Watch decoder tests passed five cases (0.003s), and isolated whole-owner native tests passed 16 cases. macOS SwiftPM compiled all products and the test bundle. Final macOS and iOS/Watch xcodebuild builds passed (89.60s and 120.87s wall), without signing changes or app launches. Canonical Apple lint/format checks passed; the initial iOS format failure in WatchCommands was ours and corrected, with no gate weakened. Lint-suppression tests passed 3/3 (14.09s wall). Earlier runtime cycles and Madge each reported 0; the TypeScript graph is unchanged. Native localization stayed at 4476 entries. The 45 original packaging/elevation timeout cases passed one focused retry (94.79s wall), with no assertion/budget change and no claim of a diagnosed fix. Known gaps: seven issues remained in the earlier ChatStreamReplayTests narration=false package cases; causality/current-main attribution is unproven. App-hosted macOS tests were not executed on the operator desktop. No hosted CI or PR was started: the explicit BELOW-500 rule requires a branch-only handoff. * refactor(ui): consolidate old UI owners and validation Share route decoding, attachment retention, gallery preparation, transient identity encoding, override copying, and extension classification. Remove duplicate admission/schema mirrors and obsolete supported-browser fallbacks. Both Lit and Solid paths remain; no rendering change is intended. No config, protocol, persisted shape, dependency, or public SDK change. Best-effort tradeoffs accepted - Malformed internal native requests (openclaw#140988): all callers are typed and native hosts validate at the effect; their error replaces the renderer mirror. - Worker replacement during an identity query (openclaw#140484): added for synthetic autoreview interleavings, not a human incident. Return false; normal worker announcements and foreground recovery observe the next active worker. - Native readiness changing between synchronous checks (openclaw#140484/openclaw#109719): rely on queued events. A broken native event can require another worker event or reload; camera readiness retains its existing five-second error deadline. - Overlapping application-root health reporters (openclaw#152638): startup mounts one root. Unsupported overlapping roots are last-publication-wins; the actual reported health/status feature and native trusted-document checks remain. - Polling after stop (openclaw#139704): its sole owner retires eligibility first. Scheduling now uses that owner admission, not a separate read-only generation. - Resetting an observer without retiring its connection (openclaw#116887): no production caller does this. Canonical connection epochs remain the sole retirement owner; unsupported direct live-scope reset no longer fences an old response separately. - Upload policy changing during local reads (openclaw#158567): decoded/hash work can finish. Draft publication and every upload request retain live policy checks. - Missing supported browser primitives (openclaw#105240/openclaw#151388/openclaw#100024/openclaw#102745): unsupported runtimes error instead of code-point initials, skipped input yield, wall-clock timing, or approximate microtask paint. The human progress-card fix in openclaw#151386 keeps its browser yield and durable FIFO handoff unchanged. - URL APIs disappearing after URL creation (openclaw#100024/openclaw#149330): supported browsers keep paired APIs. An unsupported replaced global can throw during cleanup; undefined URLs, creation fallback, cancellation and release ordering remain. - Malformed internal MCP calls bypassing AppBridge (openclaw#161747): may throw. The SDK still rejects malformed wire blocks before dispatch, proved over real in-memory App/AppBridge transport. UI content, authority, confirmation and custody policy remain. The introducing PR cites no human incident for the second mirror. Production: +176/-394, net -218 lines across 21 eligible old files. Tests: +30. Focused owner/sibling tests, targeted types/lint/format, lint-suppression and independent P0-P2 review pass. Import edges are unchanged; runtime/Madge cycle proof remains zero. Whole-tree Knip timed out at existing limits; heavy gallery renderer runs did not reach assertions, while its owning controller suite passed. * refactor(ui): remove obsolete Fetch capability branch The supported Control UI browser floor includes Fetch. Start attachment metadata reads directly rather than leaving an unsupported runtime in a permanent checking state. Best-effort tradeoffs accepted - Missing global Fetch: the guard originated in openclaw#64104, whose feature report cites no human missing-Fetch incident. An unsupported runtime that replaces Fetch now reaches the existing rejected-request/unavailable path. Metadata validation, auth/tickets, allow POST, cancellation, resource admission, expiry and bounded retry remain unchanged. No intended rendering change. Unchanged lifecycle baseline: 21/21, 25.09 s. Final lifecycle and attachment siblings: 50/50, 14.77 s. UI types, typed lint, formatting and lint-suppression checks pass. This cut removes five production lines including formatter reflow, bringing the lane to 223 net production lines removed. Fresh independent P0-P2 review is scoped-clean with no actionable findings. * fix(ui): use global frame scheduling APIs Preserve double-frame paint timing and cancellation without requiring a Window object in renderer-free hosts that supply the standard global APIs. The existing access suite reproduces seven unhandled errors before this fix and passes on main; all 130 affected cases plus 262 timing/state/send sibling cases now pass without test changes.
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 14, 2026
…el and native code (openclaw#170815) * fix(signal): reserve canonical default transport during legacy cleanup Keep the canonical root transport in managed-port reservations when a nested default account still carries retired transport fields. Otherwise Doctor can allocate the default port to an implicit sibling and produce a collision. Cover synchronous and asynchronous Doctor migration, nested-field cleanup, and resolving both accounts to distinct ports. No new configuration surface or persisted format; existing update/Doctor ownership stays authoritative. * fix(channels): keep message content out of transport diagnostics Remove raw content from IRC line/NOTICE, WhatsApp mention/skip, LINE inbound and postback, Twitch callback, iMessage echo, and Tlon settings diagnostics. Retain metadata and the complete payload in its delivery/history owner. LINE peer routing also consumes already prepared source facts instead of reinspecting the same source through a one-use helper. Extend existing owning-boundary tests, including real IRC sockets, rather than adding a separate logging implementation. IRC, WhatsApp, and Tlon privacy probes failed on the old path and pass with content preserved. * refactor(channels): simplify old transport helpers and lifecycle state Consolidate Matrix send preparation, Zalo account/error traversal onto existing SDK seams, and Google Meet CLI dispatch. Remove pass-through Promise wrappers, duplicate lifecycle facts, and internal clock defenses. Keep transport validation, effect authority, FIFO and durable shutdown. Best-effort tradeoffs accepted: - Internal cache/follow-up clocks are ordinary Date.now plus constant TTLs; synthetic invalid-clock cases are not actual-use incidents. A corrupt clock may distort metadata expiry until repair/restart. - FaceTime does not fence unsupported start-before-stop reentry; its runtime creates a new supervisor after joined shutdown. Initial feature openclaw#119291 introduced the generation, without a human reentry incident. - LINE uses timer cancellation and its stop Promise, not a second stopped flag. Synchronous stop reentry is not performed by production callers. - Mattermost uses one stopped fact, recursive polling and native Promise settlement; synchronous callbacks cannot interleave with cancellation. - Teams uses a fresh UUID without reparsing text to reject a theoretical authored-placeholder collision; no human collision report was identified. - FaceTime expects the documented system_profiler JSON output; malformed output reports missing devices instead of parsing old plaintext fixtures. - Feishu serialization rejects cycles before element counting; exotic getter/toJSON objects remain best effort rather than a second graph walk. - Zalo shares SDK error traversal; provider errors with throwing cause getters remain best effort rather than a private short-circuit walker. - ClickClack uses the timeout race winner directly; exact-deadline late microtasks can discard stale ephemeral details, never the durable reply. - Raft's private FIFO settles replay commits before another claim. If that invariant were violated, an unexpected inflight wake is a duplicate hint rather than a second settlement path. openclaw#109117 gives synthetic/generic ownership reasoning, not a human actual-use incident. Old-code lane o07: production files checked against the last-seven-day origin/main inventory. No SDK exports, dependencies, schemas or protocols changed. Standalone session memory remains untouched. * refactor(mobile): simplify old native lifecycle bookkeeping Remove duplicate visibility/cache/startup state and unreachable platform/encoder fallbacks in old iOS and Android files. Share outside-tap recognition and let the node invoke boundary own mirrored-notification normalization. Keep physical-route authorization, permission checks, durable Watch admission and ACKs, FIFO sends, protocol/data shapes, and ordinary concurrency. Net production reduction: 289 LOC, excluding tests, fixtures, and generated files. Proof: iPhone app/Share/embedded Watch builds, final 273 invoke/Watch ingress/delegate/location tests and 74 sidebar/dashboard tests; Watch scheme build and 11 media tests; Android APK and 89 distinct focused unit cases; 18 shared source-resource tests. Changed-file guards, native lint, runtime/Madge cycles (zero), lint-suppressions (3 tests), and final independent P0-P2 review pass. No hosted CI or hardware/provider-audio/battery proof is claimed. Best-effort tradeoffs accepted: - Observer declarations (openclaw#113634): synthetic stale-ACK fencing is replaced by FIFO sends and subscription/reconnect replay; failed or obsolete metadata heals on the next declaration. - Dashboard refresh (openclaw#111339): the sole SwiftUI refresh task is sequential and cancellation-owned, so a second generation counter is redundant; a future concurrent direct caller must cancel prior work or accept last-completing cosmetic data until refresh. Roster event/mutation overlap still retains its own generation. - Delayed cosmetic actions (openclaw#113062): the synthetic post-delay interleaving no longer needs generations; replacing an action does not revoke work that already started. - Delayed gate lifetime (openclaw#113062): both real view owners cancel on disappearance, so a second weak-gate lifetime condition is redundant; a future caller omitting cancellation may still perform a harmless cosmetic completion after releasing its gate. - Watch one-shot transport (openclaw#135808): cancelled instances cannot restart, so generations add no supported lifetime; cancellation and physical-resource checks remain. - Command advertisements (openclaw#136192): the synthetic synchronous preference flip may briefly split a command family until reconnect; live invocation admission remains. - Turn recaps (openclaw#112221/openclaw#113084): synthetic metadata-only mode and a duplicated pending terminal value are removed; the sole production caller always provides transcript facts, and same-timestamp metadata corrections now use the latest authoritative session row. History/terminal attribution, settlement bounds and all 21 retained tests remain. - Realtime coordinator (openclaw#111033): direct concurrent reset/reuse is unsupported by serialized phone/Wear callers; current-session, duplicate-run, and live-submit guards remain. - Network availability (openclaw#138732): an unexpected duplicate SDK AVAILABLE may wake offline retry early; the human battery fix (openclaw#127872), retry ladder, and current-session admission remain. - iOS resource adapter (openclaw#148906): a captured invalidated loader may redundantly reload current metadata; the shared cache owner still cancels stale in-flight results and live authority remains checked. - Watch startup buffer (5a652b8): synchronous MainActor registration cannot interleave with queued inbound delivery; a future caller yielding before registration may drop ephemeral requests, never ACK uncommitted chat. - Mirror validation (openclaw#23636): the sole caller supplies normalized bounded fields; future internal callers must preserve that precondition. - Beacon payload UTF-8 (openclaw#73330): Foundation JSONEncoder guarantees the bytes; a framework contract violation is an internal failure, not a recoverable conversion branch. - Beacon envelope UTF-8 (openclaw#73330): the same guarantee removes the second conversion fallback; actual encoding errors still throw. - Watch request UTF-8 (openclaw#135808): default encoder output cannot fail UTF-8 conversion; actual encoding errors still throw. - Location event UTF-8 (openclaw#18260): default encoder output cannot fail UTF-8 conversion; nonfinite-value encoding failures keep their existing handling. - HealthKit identifiers (openclaw#105616): fixed supported identifiers use nonfailable SDK constructors; authorization, privacy scope, and queries remain unchanged. - Pre-iOS26 button fallback (openclaw#168595): the existing native deployment floor is26.2, so supported rendering is unchanged. - Pre-Android26 priority fallback (openclaw#29398): the app minimum is31; notification-channel importance remains the active owner. - WebView task document fences (openclaw#139514): existing MainActor cancellation-at-effect already rejects retired callbacks; navigation and document authority remain. (cherry picked from commit 3dd5a00) * refactor(ios): keep delayed cosmetic actions synchronous Both production callers update toast or flash state synchronously on MainActor. Remove the unused async action contract and invoke it directly after the existing sleep/cancellation boundary. Keep asynchronous sleeping, cancellation, replacement and the returned task unchanged. Best-effort tradeoffs accepted: - None added by this type narrowing. The helper is internal, both callers and all retained tests already supply synchronous actions. The hypothetical suspending action discussed with openclaw#113062 is not a supported caller and is no longer expressible through this API. Earlier guard-removal provenance and campaign proof are recorded in the preceding mobile cleanup commit. This follow-up changes no production LOC total, public protocol, permission, signing, dependency, persistence or visible rendering. Validation: iPhone app/Share/embedded Watch build and61 focused tests in2 suites pass (DelayedActionGateTests and RootTabsPresentationTests),196.654s xcodebuild/0.628s tests. Configured SwiftFormat and strict SwiftLint pass; independent P0-P2 review is scoped-clean. Earlier unchanged-input changed-file, cycle and lint-suppression gates remain valid. (cherry picked from commit c7c9fb6) * fix(mattermost): keep inbound message content out of diagnostics Log conversation, post ID and length instead of a body preview. Keep the complete agent body and attachment order unchanged, and update the existing monitor boundary test to reject content in diagnostics. The regression fails before the repair on the leaked synthetic body prefix after complete-body/ordered-media assertions pass, then passes after repair. Final owner24, sibling25 and lint-suppressions3 tests pass; runtime and Madge cycles are zero. Fresh production/test types, syntax lint, format and line-cap checks pass, with no baseline, suppression or timeout increase. This minimal privacy fix is explicitly authorized outside the old-code eligibility restriction. The combined channel/native patch received a fresh independent review with no actionable P0-P2 findings. * fix(ios): remove retired Watch error from i18n inventory * fix(mattermost): normalize nullable shutdown cleanup before await
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Fixes an issue where Android, iOS, and macOS users could stop receiving live session updates after reconnecting, changing app visibility, closing one of multiple chat windows, or reopening the app.
Why This Change Was Made
Track actual observer visibility per physical Gateway connection, serialize declarations, reject stale acknowledgements, replay visibility after reconnect, and aggregate macOS windows without weakening Gateway authorization.
User Impact
Native session and chat views recover live updates correctly across foreground/background transitions and Gateway reconnects. Multiple macOS chat windows no longer accidentally unregister each other.
Evidence