Skip to content

feat(desktop): manage remote runtime host services - #3282

Open
M4n5ter wants to merge 6 commits into
mainfrom
feat/desktop-runtime-host-management
Open

feat(desktop): manage remote runtime host services#3282
M4n5ter wants to merge 6 commits into
mainfrom
feat/desktop-runtime-host-management

Conversation

@M4n5ter

@M4n5ter M4n5ter commented Aug 20, 2026

Copy link
Copy Markdown
Member
English

Summary

Add a per-computer management surface for SSH-managed Runtime Hosts. Desktop can inspect service status and bounded recent logs, start or restart the service, repair its managed installation, and uninstall the Maka-managed service while preserving both the State Root and Desktop Profile.

Onboarding now binds each managed Profile to the exact managed service and State Root. Every repair or management action revalidates that binding before mutation, so manual connection Profiles cannot manage an unrelated service and SSH destination drift fails closed. The SSH management channel also closes admission before Desktop shutdown.

Direct connection Profiles remain usable without claiming a service-management channel. Runtime Host protocol clients still cannot upgrade or terminate the service; these explicit management actions run through the separately authenticated SSH operator channel.

Depends on #3236

Fixes #3281

Verification

  • npm run lint
  • npm run format:check
  • npm run typecheck
  • npx knip --workspace apps/desktop
  • Runtime Host tests: 1025 passed, 1 skipped
  • CLI tests: 319 passed
  • Desktop tests: 992 passed
  • Exercised status, recent logs, service action errors, and uninstall confirmation against a Linux systemd user service over SSH; the uninstall action itself was cancelled

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: OpenAI Codex implemented the change and assisted with tests, validation, and PR wording under maintainer direction and review.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No
中文

概要

为通过 SSH 管理的 Runtime Host 增加 per-computer 管理界面。Desktop 可以查看服务状态和有界的近期日志,启动或重启服务,修复其托管安装,以及在保留 State Root 和 Desktop Profile 的前提下卸载 Maka 管理的服务。

Onboarding 现在会把每个 managed Profile 绑定到精确的 managed service 与 State Root。每次修复或管理操作都会在执行变更前重新验证该绑定,因此手工 connection Profile 无法管理无关服务,SSH 目标漂移也会 fail closed。Desktop shutdown 前还会先关闭 SSH 管理操作的 admission。

Direct connection Profile 仍可正常使用,但不会被描述为具备服务管理通道。Runtime Host protocol Client 仍不能升级或终止服务;这些显式管理操作经由单独认证的 SSH operator channel 执行。

依赖 #3236

修复 #3281

验证

  • npm run lint
  • npm run format:check
  • npm run typecheck
  • npx knip --workspace apps/desktop
  • Runtime Host 测试:1025 项通过,1 项跳过
  • CLI 测试:319 项通过
  • Desktop 测试:992 项通过
  • 通过 SSH 在 Linux systemd user service 上验证状态、近期日志、服务操作错误和卸载确认;实际卸载操作已取消

AI 使用

仅选择一项:

  • 没有生成式工具作出实质贡献
  • 生成式工具作出了实质贡献

工具与范围:OpenAI Codex 在维护者指导与审核下实施变更,并协助测试、验证和 PR 措辞。

检查清单

  • 测试覆盖此变更,且在缺少变更时会失败
  • lint、format、typecheck 和相关测试套件已在本地通过

这个 PR 是否包含行为变更?

  • 是——已在上方概要中说明

Product walkthrough / 功能演示

▶ Watch the complete management flow / 查看完整管理流程(MP4,45 秒)

Managed computer entry / 托管电脑入口 Service overview and actions / 服务概览与操作
Latest bounded logs / 最新的有界日志 Explicit uninstall boundary / 明确的卸载边界

Astro-Han added a commit that referenced this pull request Aug 20, 2026
Branch protection landed in .asf.yaml (#3262) and now requires an approving review and a passing `test` check on every pull request to main, with stale approvals dismissed on each new commit. Every open pull request based on main reports reviewDecision REVIEW_REQUIRED; #3282, based on a feature branch, reports nothing.

That leaves the fast path with nothing to exempt. CONTRIBUTING defined it as merging without independent human review, which a committer can no longer do. Redefining it as "the baseline alone" does not rescue it: the extra scrutiny in this section applies only to protected areas, and not touching a protected area was already a fast-path precondition, so the two scopes never overlap. A named fast path would exempt nothing while adding a comment obligation, and the maintainer sign-off it claimed to skip was never written down anywhere.

State the rule directly instead. The section gives the baseline every pull request clears, says what material changes need beyond it, and closes with "for everything else the baseline is enough" — which answers which changes take the light route without keeping a concept that no longer carries content. The merge-time comment goes with it: it existed to leave a trace for merges that had no approval, and every merge now has one.

Two corrections in the same section. The baseline says branch protection enforces the mechanics and that independent human judgment is policy GitHub cannot verify, because an approval from someone other than the author is not by itself proof of an independent human. The Chinese text is realigned so 重大 distributes across the whole protected list, matching the English, instead of modifying only the first item.

The public-decision rule moves from future to present tense. dev@maka.apache.org exists and carries active threads, so project-level decisions belong there now rather than "once an ASF development list is available".

.coderabbit.yaml and .github/skills/code-review/SKILL.md told automated reviewers not to make a fast-path determination. With the concept gone, both now say only that automated review is not authorization to merge. Their neighbouring lines about independent human review remain accurate and are left alone.

Generated-by: Claude Code
Astro-Han added a commit that referenced this pull request Aug 20, 2026
Branch protection landed in .asf.yaml (#3262) and now requires an approving review and a passing `test` check on every pull request to main, with stale approvals dismissed on each new commit. Every open pull request based on main reports reviewDecision REVIEW_REQUIRED; #3282, based on a feature branch, reports nothing.

That leaves the fast path with nothing to exempt. CONTRIBUTING defined it as merging without independent human review, which a committer can no longer do. Redefining it as "the baseline alone" does not rescue it: the extra scrutiny in this section applies only to protected areas, and not touching a protected area was already a fast-path precondition, so the two scopes never overlap. A named fast path would exempt nothing while adding a comment obligation, and the maintainer sign-off it claimed to skip was never written down anywhere.

State the rule directly instead. The section gives the baseline every pull request clears, names a maintainer as the one who decides whether a change is material and whether the review it received is enough, and closes with "for everything else the baseline is enough" — which answers which changes take the light route without keeping a concept that no longer carries content. Naming the classifier keeps what the old "a maintainer makes the final determination" actually did: settle whether a change needs more than the mechanics. The merge-time comment does not survive; it existed to leave a trace for merges that had no approval, and every merge now has one.

Two corrections in the same section. The baseline says branch protection enforces the mechanics and that independent human judgment is policy GitHub cannot verify, because an approval from someone other than the author is not by itself proof of an independent human. The Chinese text is realigned so 重大 distributes across the whole protected list, matching the English, instead of modifying only the first item.

The public-decision rule moves from future to present tense. dev@maka.apache.org exists and carries active threads, so project-level decisions belong there now rather than "once an ASF development list is available".

.coderabbit.yaml and .github/skills/code-review/SKILL.md told automated reviewers not to make a fast-path determination. With the concept gone, both now say only that automated review is not authorization to merge. Their neighbouring lines about independent human review remain accurate and are left alone.

Generated-by: Claude Code
M4n5ter pushed a commit that referenced this pull request Aug 20, 2026
Branch protection landed in .asf.yaml (#3262) and now requires an approving review and a passing `test` check on every pull request to main, with stale approvals dismissed on each new commit. Every open pull request based on main reports reviewDecision REVIEW_REQUIRED; #3282, based on a feature branch, reports nothing.

That leaves the fast path with nothing to exempt. CONTRIBUTING defined it as merging without independent human review, which a committer can no longer do. Redefining it as "the baseline alone" does not rescue it: the extra scrutiny in this section applies only to protected areas, and not touching a protected area was already a fast-path precondition, so the two scopes never overlap. A named fast path would exempt nothing while adding a comment obligation, and the maintainer sign-off it claimed to skip was never written down anywhere.

State the rule directly instead. The section gives the baseline every pull request clears, names a maintainer as the one who decides whether a change is material and whether the review it received is enough, and closes with "for everything else the baseline is enough" — which answers which changes take the light route without keeping a concept that no longer carries content. Naming the classifier keeps what the old "a maintainer makes the final determination" actually did: settle whether a change needs more than the mechanics. The merge-time comment does not survive; it existed to leave a trace for merges that had no approval, and every merge now has one.

Two corrections in the same section. The baseline says branch protection enforces the mechanics and that independent human judgment is policy GitHub cannot verify, because an approval from someone other than the author is not by itself proof of an independent human. The Chinese text is realigned so 重大 distributes across the whole protected list, matching the English, instead of modifying only the first item.

The public-decision rule moves from future to present tense. dev@maka.apache.org exists and carries active threads, so project-level decisions belong there now rather than "once an ASF development list is available".

.coderabbit.yaml and .github/skills/code-review/SKILL.md told automated reviewers not to make a fast-path determination. With the concept gone, both now say only that automated review is not authorization to merge. Their neighbouring lines about independent human review remain accurate and are left alone.

Generated-by: Claude Code
@M4n5ter
M4n5ter force-pushed the feat/desktop-managed-remote-onboarding branch from 32fa336 to 3f403af Compare August 20, 2026 09:42
@M4n5ter
M4n5ter force-pushed the feat/desktop-managed-remote-onboarding branch 3 times, most recently from 6cc6cd1 to 25bea91 Compare August 21, 2026 02:23
Base automatically changed from feat/desktop-managed-remote-onboarding to main August 21, 2026 06:09
@M4n5ter
M4n5ter force-pushed the feat/desktop-runtime-host-management branch from 8c188ca to 50a4915 Compare August 21, 2026 08:06
@M4n5ter
M4n5ter marked this pull request as ready for review August 21, 2026 08:07
@M4n5ter

M4n5ter commented Aug 21, 2026

Copy link
Copy Markdown
Member Author

The failing Windows package check matches #3340: a Runtime Host candidate survived the update handoff, leaving the installed app at 0.1.11 instead of 0.1.12. This is being addressed by #3382 and is not caused by this PR; we can rebase and rerun the check after that fix lands.

Add an SSH-backed management surface for installed remote Runtime Host services so Desktop can inspect status and logs, recover or restart the service, and uninstall it without conflating service lifecycle with Profile or State Root ownership.

Keep direct connection Profiles usable without claiming a management channel, and use a bounded framed CLI result so machine output cannot expose launch configuration.

Generated-by: Codex
Bind repair and management to the exact service and State Root identity established during onboarding, and reject requests when that identity drifts.

Close SSH admission during shutdown and remove duplicate management state, IPC, and version derivation.

Generated-by: Codex
Route ongoing management through the installed Host operator, keep management metadata outside the shared connection profile schema, and make repair and uninstall recoverable across version and process boundaries.

Generated-by: Codex
Bind the installed operator to its original Client Data Root and give it a self-contained cleanup phase so interrupted uninstalls remain recoverable. Correlate management responses with requested actions and remove duplicate recovery and action representations.

Generated-by: Codex
Record the POSIX-only managed operator integration test added by the service hardening change so the checked Windows test inventory matches the suite.\n\nGenerated-by: Codex
Position the Runtime Host log view at its newest entry after every successful refresh so operators see the current service state immediately.\n\nGenerated-by: Codex
@M4n5ter
M4n5ter force-pushed the feat/desktop-runtime-host-management branch from 5b8652b to 1626713 Compare August 21, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(desktop): manage installed remote Runtime Host services

1 participant