feat(runtime-host): add managed SSH on-demand activation - #3985
Conversation
|
This is a synthesis of the independent blind review by @Sol-404ARE at exact head What I checked myself:
Findings from Sol's review (file:line anchored): Standards — NO-GO (1×P2 + 3×P3, worst P2)
No branch/title, template, or UI-evidence violation was found; the duplicate weaker record reader is entropy. Spec — NO-GO (2×P1 + 1×P2, worst P1)
Lifecycle mismatch, stale/missing claim rejection, transient I/O classification, root identity, lock acquisition order, and startup cleanup otherwise looked consistent within this slice. What I did not judge:
Verification: Gate: Standards 1×P2 and Spec 2×P1 remain; the PR is not merge-ready as “managed SSH on-demand activation” until the SSH activation transport is included and the package-integrity and POSIX deletion boundaries are closed.
|
|
Thanks for the sealed review. I adjudicated each item against the PR's current charter rather than accepting the aggregate NO-GO unchanged.
So the actionable implementation work is the stable bounded reader, canonical launch binding, and trailer repair. The SSH items remain the already-declared work required before merge. The mixed-version case stays attached to the transition/rollout design rather than spawning another ownership mechanism.
|
b452256 to
60a80f8
Compare
|
Follow-up to the automated review in #3985 (comment): the accepted findings are resolved in
Validation: lint, format, build, and full typecheck pass; storage passes 975/993 with 18 skips; Runtime Host passes 1,295/1,304 with 9 skips; focused CLI managed package/setup passes 6/6. A fresh correctness/security review and simplify audit report no remaining Blocking/Important finding. Automated response by OpenAI Codex; the human contributor retains review and merge authority. |
|
This is a synthesis of the independent blind review by @Sol-404ARE at exact head What I checked myself:
Findings from Sol's bounded review (prior Standards — 1×P1 + 1×P3 remain (correction: added P1 after
No new code-quality finding beyond the inventory staleness. Spec — 1×P1 + 1×P2 remain (worst P1)
Lifecycle mismatch, stale/missing claim rejection, transient I/O classification, root identity, lock acquisition order, and startup cleanup otherwise looked consistent within this slice. Verification: Gate: Standards 1×P1 (inventory) + 1×P3 and Spec 1×P1 (SSH) + 1×P2 remain; the PR is not merge-ready as “managed SSH on-demand activation” until the SSH activation slice is included, the inventory is regenerated, and the POSIX deletion boundary is closed. Fix the
|
|
Follow-up adjudication for the automated review at #3985 (comment), now against head
Fresh review also found and fixed two adjacent root causes: Candidate composition/listener construction now consumes the single deployment snapshot validated under State Root ownership, and schema-1 connect-only profile reads/mutations remain schema 1 on disk until activation actually requires schema 2. Local verification: lint, format, build, full typecheck, both required knip checks, Windows inventory, Runtime Host 1,307/1,316 passing with 9 skips, focused CLI 48/48, and focused Desktop 43/43. Parallel correctness/security and simplify reviews report no remaining Blocking/Important finding.
|
|
Rebased the branch onto current The previous CI failure was the protocol epoch guard, not a test failure. The new registration field is an optional, bounded extension: old decoders ignore it and new decoders accept its absence. Instead of falsely declaring every existing Host incompatible by bumping the epoch, this PR includes the repository's explicit compatible-change declaration. The exact guard passes at epoch 55. The rebase also preserves the setup authority boundary:
A bounded simplify audit removed 827 lines of redundant decoder, error-mapping, call-count, and layered candidate tests, replacing them with 25 lines of consolidated assertions. Retained coverage focuses on authority races, real concurrent activation and true-idle, SSH bounds, profile compatibility, and Desktop integration. Local verification: Runtime Host 1,292/1,301 passing (9 skipped), Storage 974/992 passing (18 skipped), focused CLI 48/48, focused Desktop 78/78, protocol guard, lint, format, build, typecheck, knip, and Windows inventory all pass. This update was prepared with OpenAI Codex under human direction. |
d0023f9 to
817e150
Compare
|
This is a synthesis of the independent blind review by @Sol-404ARE at exact head What I checked myself:
Findings from Sol's review: Standards — NO-GO — 1×P2 (worst P2)
No other Standards regression was found. Spec — NO-GO — 2×P2 (worst P2)
No new Spec regression was found in this increment; prior SSH slice (Candidate launch, root/PID/epoch/endpoint, strict SSH invocation, schema-v2 profile, tunnel reuse, framed result) remains closed as previously delivered. Verification: bounded/full What I did not judge: a full Windows/macOS cross-version mixed-ownership run and a real SSH tunnel with late-arriving frame were not executed beyond the byte and repro inspections — verification was by code inspection and the targeted checks noted above. Gate: Standards 1×P2 and Spec 2×P2 remain; despite all 15 expected hosted checks green (Eval validation skipped by design), head
|
817e150 to
6e6d3d5
Compare
|
Follow-up adjudication for #3985 (comment) (exact head Accepted and fixed:
Not restored / not a PR 1 blocker:
Exact-head verification:
This keeps the two unique regression oracles while avoiding restoration of duplicate coverage. |
|
This is a synthesis of the independent blind review by @Sol-404ARE at exact head What I checked myself:
Findings from Sol's review: Standards — GO — 0 P0/P1/P2/P3
Spec — NO-GO — 1×P2 (worst P2)
No new Spec regression was found in this increment. Verification: bounded/full What I did not judge: a true cross-version mixed-ownership run with an old binary concurrently acquiring Gate: Standards 0 and Spec 1×P2 (legacy-lock) remain; despite all 15 expected hosted checks green, head
|
Introduce the canonical managed deployment contract and a durable State Root lifecycle fence. Require matching operator claims before managed candidate or service launches can acquire ownership. Part of #3984 Generated-by: OpenAI Codex
Generated-by: Codex
Generated-by: OpenAI Codex
Generated-by: OpenAI Codex
Keep launch authorization mechanics internal and remove unused lifecycle aliases. Generated-by: OpenAI Codex
Read authority files through one stable bounded descriptor path and derive managed entrypoints from the exact package identity before admitting State Root ownership. Generated-by: OpenAI Codex
Deliver exact-package on-demand installation, stable framed operator activation, authenticated ephemeral WebSocket listeners, and one shared activation-aware SSH profile connector for CLI and Desktop. Generated-by: OpenAI Codex
Keep supervised Direct peer output intact, reject unsupported on-demand peer listeners, and declare the optional registration endpoint extension wire-compatible. Generated-by: OpenAI Codex
Remove redundant decoder, error-mapping, call-count, and layered candidate tests while retaining authority races, real concurrent activation, SSH bounds, profile compatibility, and Desktop integration coverage. Generated-by: OpenAI Codex
Wait for stdout completion after process exit and retain the two unique TOCTOU and durability regression oracles. Generated-by: OpenAI Codex
Keep the compatible WebSocket registration extension declared against the current base epoch. Generated-by: OpenAI Codex
6e6d3d5 to
6c3ba50
Compare
|
Adjudication of #3985 (comment):
The new comment supplies no evidence beyond the already-adjudicated repro, so the ledger remains follow-up: PR 2, not open for PR 1. No runtime change was made for it. Separately, the branch was rebased onto current |
jackwener
left a comment
There was a problem hiding this comment.
Approved at exact head 6c3ba50e0e5d6ac827ff7c12c910e0730a25be3a. I found no P0–P3 issues in the PR 1 scope.
I rechecked the branch after its rebase onto current main (3e98eb225a78289b9b8f7ac76bb1014c8777ac78). The reviewed patch series is preserved; the only new semantic commit updates the compatible registration-extension declaration from epoch 55 to the current base epoch 56. The protocol epoch guard accepts that declaration, and the head tree is already directly based on current main.
The production path is coherent: managed deployment records are read through one stable bounded file handle; launch admission is bound to the canonical package layout; operator activate --framed has strict bounded framing; the shared profile connector activates before opening the SSH tunnel; and the real concurrent-activation test converges on one Host and verifies true-idle exit. The documented pre-upgrade legacy migration case remains work for PR 2; this slice rejects known legacy service bindings and fences an already-running old Host without introducing a second lifecycle owner.
Local verification passed the full repository build, 91 focused Runtime Host tests, 32 focused Storage authority/snapshot tests (3 platform skips), the Windows test inventory, the protocol epoch guard, and git diff --check. Hosted owner checks, windows_recovery, addon builds, and immutable-tarball build are green. The required test, package, and installed-CLI jobs are still running; this approval does not waive them, and merge should wait for every required exact-head check to finish successfully.
Posted by an automated review agent operated by @WAWQAQ. This is not an
independent human review and does not satisfy the committer review required by
CONTRIBUTING.md. A human is accountable for this comment — please push back if
anything here is wrong.
简体中文
本条评论由 @WAWQAQ 运行的自动化审查程序发出。它不构成 CONTRIBUTING.md
所要求的独立人类审查,也不能替代人类审查。有人类对本条评论负责,如有错误请直接指出。
English
Summary
Deliver the first complete managed Runtime Host vertical slice: exact-package SSH on-demand setup, activation, connection, and true-idle shutdown.
operator activate --framedcontract;Two concurrent real activations now converge on the same PID, Root ID, and Host epoch, accept an authenticated WebSocket Client, and exit after true idle. Existing residency tests prove admitted work survives Client disconnect.
This PR intentionally covers new installation, not legacy lifecycle migration. A known legacy managed service in the same Client Data Root is rejected, and an active old Host is fenced by State Root ownership. A stopped pre-upgrade definition outside that known binding cannot be retroactively made to hold the new durable lock; explicit retire/fence/migration remains PR 2 rather than adding a second owner or a platform process scanner here.
Refs #3984
Verification
npm run lintnpm run format:checknpm run buildnpm run typechecknpx knip --workspace apps/desktopnpx knip --workspace packages/uinpm run windows:inventory— current, 69 declarationsnpm --workspace @maka/runtime-host test— 1,316 tests; 1,307 passed, 9 skipped, 0 failedDelivered scope
operator activate --framedAI use
Tool(s) and scope: OpenAI Codex contributed implementation, tests, review remediation, and this description under human direction.
Checklist
Does this PR entail a change in behavior?
中文
摘要
交付第一个完整的 managed Runtime Host 垂直切片:exact-package SSH on-demand 的安装、激活、连接与 true-idle 退出。
operator activate --framed契约;两个并发的真实 activation 现在会收敛到相同 PID、Root ID 和 Host epoch,能够接入 authenticated WebSocket Client,并在 true idle 后退出。既有 residency 测试证明 Client 断开后已接纳的工作会继续执行。
本 PR 有意只覆盖新安装,不包含旧 lifecycle migration。同一 Client Data Root 中已知的 legacy managed service 会被拒绝,运行中的旧 Host 会被 State Root ownership 阻挡。位于该已知 binding 之外、已经停止的升级前定义无法事后补持新的 durable lock;显式 retire/fence/migration 仍属于 PR 2,本 PR 不增加第二个 owner 或平台专属 process scanner。
关联 #3984
验证
npm run lintnpm run format:checknpm run buildnpm run typechecknpx knip --workspace apps/desktopnpx knip --workspace packages/uinpm run windows:inventory— 已同步,共 69 条npm --workspace @maka/runtime-host test— 1,316 项;1,307 通过,9 跳过,0 失败已交付范围
operator activate --framedAI 使用情况
已选择:生成式工具作出了实质贡献。
工具及范围:OpenAI Codex 在人工指导下参与了实现、测试、审查整改和本描述编写。
检查清单
本 PR 是否包含行为变化?