Skip to content

fix(linux): recover disconnected sessions and preserve update delivery - #145355

Closed
vincentkoc wants to merge 1 commit into
mainfrom
fix/linux-audit-recommendations-20260909
Closed

vincentkoc wants to merge 1 commit into
mainfrom
fix/linux-audit-recommendations-20260909

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 11, 2026 •

Copy link
Copy Markdown
Member

Replacement Stack

Superseded by these eight draft PRs, in dependency order. Each child targets
the preceding branch; the complete signed stack preserves this PR's original
tree, including file modes. This is an organizational split, not a merge or
release. The original branch and commit remain available.

  1. Local Gateway status: fix(linux): recover when local Gateway status is unknown #146045
  2. Sleep lifecycle: fix(linux): retire sleep guards when logind disconnects #146046
  3. Remote recovery/navigation: fix(linux): recover saved remote connections without replacing active sessions #146047
  4. Quick Chat recovery: fix(linux): recover completed Quick Chat replies without resending #146048
  5. Widget ownership/coalescing: fix(linux): keep Quick Chat widgets bound to their Gateway #146049
  6. Updater ordering/retry: fix(linux): offer correction updates and retain download retry #146050
  7. Linux support documentation: docs(linux): clarify desktop compatibility and qualification limits #146051
  8. Release delivery: fix(linux): preserve update delivery across core releases #146052

The known Connection Settings local-navigation P2 remains explicitly unresolved
in layer 3. Public feed activation and signed installed-client migration remain
unperformed in layer 8. Existing platform/proof limitations remain unchanged;
the split does not imply new native validation or green CI.

Original description preserved below.


Related: #127486
Related: #127466

Additional instructions

This PR uses a branch in openclaw/openclaw, which maintainers with repository
push access can update. This PR is intentionally a draft.

What Problem This Solves

Fixes issues where Linux companion users can get stuck after a failed remote
connection, lose their selected route when opening the dashboard, or leave
Quick Chat waiting after the Gateway has already completed a retried turn.
It also addresses stale widget access, sleep-listener failure recovery, and
pending UI state accumulating behind a slow update.

Linux update delivery currently depends on the latest core release carrying
Linux metadata, and ordinary SemVer ordering can skip calendar correction
releases.

Why This Change Was Made

Keep connection selection and generation ownership intact through queued
operations, reconnects, dashboard presentation, and Quick Chat retries; recover
only the exact completed turn and prevent retained widgets from using another
Gateway's access. Retire terminal sleep guards without consuming a later wake,
coalesce pending UI state, and reuse the existing calendar-version ordering
contract with the vendor fallback preserved.

Separate Linux update metadata into linux-stable, retain an ongoing
exact-byte legacy mirror, and detach mirror delivery from core finalization.
Publication checks bind the selected source, release and asset identities;
failures remain visible and require reconciliation. Support and first-run docs
now distinguish implemented behavior from unqualified platform capabilities.

User Impact

  • Remote users retain a usable settings/retry path without implicitly starting a
    local Gateway. Opening a healthy dashboard preserves an in-flight Quick Chat
    retry's identity.
  • An unchanged Quick Chat retry recovers a matching completed reply when bounded
    history permits; unavailable or incomplete history remains an explicit error.
  • Terminal sleep-listener failures do not leave recovery blocked, and slow UI
    updates retain only the active state and the latest pending state.
  • Correction releases use the existing OpenClaw ordering contract. Linux feed
    independence and legacy compatibility are implemented, but public channel
    activation and installed-client migration have not been performed
    .

No version, dependency, protocol or supported-platform expansion is included.
No release publication, signing, merge or public activation is authorized by
this draft. Existing clients still require separately authorized feed repair
and a signed migration; changing future clients' endpoint does not migrate them.

Evidence

  • Native before/after recovery evidence covers remote route/status handling,
    settings/retry, owned SSH failures, and the dashboard/Quick Chat interaction.
    The isolated real-Gateway lost-ACK flow recovered the original completed turn
    without creating a second provider turn. Captures were inspected.
  • Native sleep/version run:
    sleep controls and the calendar comparator regression passed, including
    the intended original vendor-ordering failure and four candidate Rust cases.
    Shared version vectors passed 70 focused JavaScript tests. Pending-state
    recovery also has intended original failures and focused candidate coverage.
  • Release tooling: 223 distinct passing cases, including stateful CLI boundary
    fixtures and all 23 finalizer cases. These fixtures do not constitute real
    GitHub publication or cryptographic signature verification.
  • Final scripts/root TypeScript run
    passed on an isolated physical dependency tree. Targeted lint/format checks and the complete workflow-check wrapper
    passed, including the approved Linux-only actionlint queue exception.
  • Fresh independent review of the full 36-file candidate completed in two
    partitions and returned scoped-clean at P0, with final source verification
    passing. This is a P0-scoped result, not a new lower-severity review.
  • An earlier pinned candidate produced unsigned Ubuntu 22.04 AMD64 packages and
    passed ABI checks plus 12 Ubuntu 22.04/Debian 12 loader probes. This is not a
    final-candidate package build, install/upgrade, or complete packaged-GUI claim.

Native repair proof used isolated X11/Xvfb with the recorded functional graphics
profile and explicit focus. It does not qualify default graphics, native
Wayland, ARM64, microphone/media output, or macOS/Windows parity. Exact
CachyOS/Fedora blank-window and affected attachment/auth retests remain
incomplete because matching reporter environment/auth inputs are missing;
isolated HTTP evidence does not prove real Tailscale identity or attachment
painting. No claim is made that existing shipped AppImages contain this patch.

@vincentkoc vincentkoc self-assigned this Sep 11, 2026
@clawsweeper

clawsweeper Bot commented Sep 11, 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 scripts Repository scripts app: linux plugin: linux-node size: XL maintainer Maintainer-authored PR labels Sep 11, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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. labels Sep 11, 2026
@clawsweeper

clawsweeper Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 11, 2026, 6:38 PM ET / 22:38 UTC.

ClawSweeper review

What this changes

The Linux companion preserves connection and chat ownership during recovery, bounds pending widget updates, repairs sleep cleanup, and introduces an independent updater feed with a legacy mirror.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked before merge - 7 items remain

Keep open: current main still needs the recovery fixes, and this maintainer-owned PR is not eligible for cleanup closure. One introduced navigation defect prevents a clean correctness verdict.

Priority: P2
Reviewed head: bacf62fe2ea58f19479c22d82c440be3a72fcb6b
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful recovery work and focused boundary coverage remain limited by a navigation defect and unresolved feed qualification.
Proof confidence 🌊 off-meta tidepool Not applicable: Member-authored work is exempt from the ordinary contributor proof gate. The captured body reports native recovery and real-Gateway lost-ACK evidence, while explicitly excluding real publication and installed-client upgrade proof; those remain release-readiness gaps.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Member-authored work is exempt from the ordinary contributor proof gate. The captured body reports native recovery and real-Gateway lost-ACK evidence, while explicitly excluding real publication and installed-client upgrade proof; those remain release-readiness gaps.
Evidence reviewed 9 items Pinned PR and live ownership: REST confirms the reviewed head, MEMBER authorship, intentional draft state, and merge conflicts. The supplied introduction evidence identifies the delta from 113e8cf; endpoint drift was not treated as contributor changes.
Settings changes navigation ownership before a connection is chosen: Opening Connection Settings unconditionally calls select_remote. The editor hides the local choice and Back navigation; present_remote_dashboard returns true when remote navigation has no retained presentation, so Open Dashboard does not reconnect the local dashboard.
Editor has no return path for local installations: The local connection button is hidden and disabled, the setup navigation is hidden, and Retry is offered only when saved remote settings exist. The inspected dashboard tests cover CLI recovery and updater banners, not local dashboard return from this editor.
Findings 1 actionable finding [P2] Preserve a local-dashboard return path when opening settings
Security None None.

How this fits together

The Linux companion connects local or remote Gateways to its dashboard and Quick Chat windows. Its updater consumes signed release metadata published by the Linux and core release workflows.

flowchart TD
  A[Connection settings] --> B[Gateway connection owner]
  B --> C[Dashboard and Quick Chat]
  D[Sleep and disconnect events] --> B
  E[Linux release bundles] --> F[Canonical update feed]
  F --> G[Legacy feed mirror]
  F --> H[Installed Linux updater]
  G --> H
Loading

Decision needed

Question Recommendation
Should the updater endpoint and automatic mirror cutover remain in this repair PR before public-feed and legacy-client qualification is complete? Separate the feed cutover: Preserve the runtime repairs while deferring endpoint and automatic mirror activation to a release-owner-qualified change.

Why: The branch changes future clients and core publication behavior, while its body explicitly withholds activation and migration authority.

Before merge

  • Preserve a local-dashboard return path when opening settings (P2) - The new tray entry is available on local installations, but opening it unconditionally sets remote_dashboard = true. With no saved remote connection, the editor hides both the local choice and Back, while present_remote_dashboard() returns true without a remote presentation, so Open Dashboard only reveals the settings form. Preserve the selected route while editing and provide Cancel/Back, or restrict this remote-only editor to an existing remote connection.
  • Resolve merge risk (P1) - Distributing the new endpoint before canonical-feed activation would leave new Linux builds unable to retrieve updates; installed legacy clients also require the separately documented signed migration.
  • Resolve merge risk (P1) - The new core finalizer and detached mirror have fixture coverage but no demonstrated real GitHub publication/readback in the supplied evidence.
  • Resolve merge risk (P1) - GitHub reports merge conflicts, and no pinned test-merge result is available to establish the final integrated behavior.
  • Complete next step (P2) - Restore the settings return path, resolve the merge conflicts, and obtain the release owner's decision on separating or qualifying the feed cutover.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.

Findings

  • [P2] Preserve a local-dashboard return path when opening settings — apps/linux/src-tauri/src/main.rs:1000-1004
Agent review details

Security

None.

PR surface

Tests +2482, Docs +219, Config +227, Other +5547. Total +8475 across 36 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 10 2567 85 +2482
Docs 4 247 28 +219
Config 3 265 38 +227
Generated 0 0 0 0
Other 19 6192 645 +5547
Total 36 9271 796 +8475

Review metrics

Metric Value Why it matters
Updater compatibility paths 1 new canonical feed; 1 retained legacy mirror Both client generations need qualification because changing the source endpoint does not migrate installed AppImages.

Stored data model

Persistent data-model change detected: serialized state: scripts/lib/release-publish-children.sh, serialized state: scripts/linux-app-channel.mjs, unknown-data-model-change: scripts/lib/release-publish-children.sh, unknown-data-model-change: scripts/linux-app-channel.mjs. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Stage runtime repair and feed activation separately (recommended)
    Restore the dashboard return path and defer the endpoint and automatic mirror cutover until release owners qualify both updater generations.
  2. Retain the combined draft for qualification
    Keep the branch paused while owners validate real finalization, mirror readback, and signed legacy upgrades under explicit publication authority.

Technical review

Best possible solution:

Keep settings reversible without changing the selected Gateway, and stage the feed cutover under release-owner-approved activation and legacy-upgrade qualification.

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

Yes, from source: on a local installation, open Connection Settings and then Open Dashboard; the new remote-navigation state suppresses local reconnection while the editor hides Back. This path was not executed during the read-only review.

Is this the best way to solve the issue?

Partly: generation fencing, bounded recovery, and latest-pending coalescing address the owning boundaries, but settings must preserve a return path and the feed cutover needs separate release qualification.

Full review comments:

  • [P2] Preserve a local-dashboard return path when opening settings — apps/linux/src-tauri/src/main.rs:1000-1004
    The new tray entry is available on local installations, but opening it unconditionally sets remote_dashboard = true. With no saved remote connection, the editor hides both the local choice and Back, while present_remote_dashboard() returns true without a remote presentation, so Open Dashboard only reveals the settings form. Preserve the selected route while editing and provide Cancel/Back, or restrict this remote-only editor to an existing remote connection.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against b6b7ec4b7d3e.

Labels

Label changes:

  • add P2: The PR addresses bounded Linux recovery defects and updater reliability without evidence of an emergency.
  • add merge-risk: 🚨 compatibility: The updater endpoint changes before public activation and legacy-client migration have been demonstrated.
  • add merge-risk: 🚨 automation: The diff replaces core GitHub finalization and adds an automatic detached mirror whose real publication behavior remains unqualified.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: Member-authored work is exempt from the ordinary contributor proof gate. The captured body reports native recovery and real-Gateway lost-ACK evidence, while explicitly excluding real publication and installed-client upgrade proof; those remain release-readiness gaps.

Label justifications:

  • P2: The PR addresses bounded Linux recovery defects and updater reliability without evidence of an emergency.
  • merge-risk: 🚨 compatibility: The updater endpoint changes before public activation and legacy-client migration have been demonstrated.
  • merge-risk: 🚨 automation: The diff replaces core GitHub finalization and adds an automatic detached mirror whose real publication behavior remains unqualified.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: Member-authored work is exempt from the ordinary contributor proof gate. The captured body reports native recovery and real-Gateway lost-ACK evidence, while explicitly excluding real publication and installed-client upgrade proof; those remain release-readiness gaps.

Evidence

What I checked:

Likely related people:

  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • openclaw/openclaw-release-managers: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Restore and cover local dashboard return after opening Connection Settings.
  • Resolve the feed sequencing choice and provide the corresponding publication and upgrade qualification.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: linux docs Improvements or additions to documentation maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. plugin: linux-node rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: XL 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