feat(cli): reconcile local Runtime Host generations - #3254
Draft
me2seeks wants to merge 3 commits into
Draft
Conversation
me2seeks
force-pushed
the
feat/cli-runtime-host-generation-handoff
branch
from
August 23, 2026 10:19
f3c93a9 to
d59f548
Compare
Generated-by: Codex
Generated-by: Codex
Main retired the client surface identity; the replayed generation-rejection and election tests still passed it, breaking typecheck. Generated-by: maka
me2seeks
force-pushed
the
feat/cli-runtime-host-generation-handoff
branch
from
August 24, 2026 08:16
d59f548 to
8a197b0
Compare
This was referenced Aug 24, 2026
34 tasks
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.
Current status
This Draft is paused as implementation and qualification evidence while #3709 and the #3228 reconciliation gates stabilize. It is not the target owner architecture and should not be marked Ready in its current form. The retained value is its generation/epoch diagnostics, Restart/Wait/Cancel UX, exact-epoch fencing, released-Host takeover adapter, and real PTY evidence. After the gates close, the implementation should be split or rewritten so replacement policy no longer lives in ordinary
connectOrSpawnelection.简体中文
本 Draft 暂停实现,用作 #3709 与 #3228 reconciliation gate 稳定前的实现和 qualification 证据。它不是目标 owner 架构,当前形态不应转为 Ready。需要保留的是 generation/epoch 诊断、Restart/Wait/Cancel UX、exact-epoch fencing、已发布 Host takeover adapter 与真实 PTY 证据。Gate 闭合后应拆分或重写实现,使 replacement policy 不再位于普通
connectOrSpawnelection 中。Convergence disposition
The branch has now been audited against the owner/transfer rules in #3709. When work resumes, it should be split or rewritten according to this inventory; the current Draft must not be merged as one lifecycle implementation.
Retain as evidence
HostEpochfencing and stale-takeover rejection;npxcontract.Migrate behind the owner/reconciler seam
connect | owner_transfer_required | wait | cancel | operator_requiredoutcomes;DeploymentIdentity; it does not decide authority;_npxdetection remains a negative provenance guard shared with managed setup, never positive owner proof.Delete or rewrite
connectOrSpawn;installationScope === 'persistent'as replacement authority;Simplification result
localGenerationRequest,candidateGeneration, and the TUI-owned retry loop currently form a parallel replacement path. Migrating the released-Host takeover mechanism behind one owner transaction lets these connection-level policy representations and the Surface state machine disappear while preserving compatibility admission and exact-epoch fencing.installationScope === 'persistent'and version/development-UUID generation are maintained only to approximate facts now owned by the durable owner record and verifiedDeploymentIdentity. The shared_npxdetector remains because managed setup and invocation policy still consume its negative provenance fact.Audit coverage
_npxguard; replace authority and identity inference简体中文
收敛处置清单
该分支已经按 #3709 的 owner/transfer 规则完成审计。恢复工作后,应依据以下清单拆分或重写;当前 Draft 不能作为一整套 lifecycle implementation 合并。
作为证据保留
HostEpoch的精确 fencing 与 stale takeover rejection;npxcontract 重写。迁移到 owner/reconciler seam 后面
connect | owner_transfer_required | wait | cancel | operator_requiredoutcome 的薄 presentation adapter;DeploymentIdentity的 input adapter,不再决定 authority;_npxdetection 保留为与 managed setup 共享的负向 provenance guard,永远不是正向 owner proof。删除或重写
connectOrSpawn中携带的 replacement-policy 字段与额外 exact-generation probe;installationScope === 'persistent'当作 replacement authority;简化审计结果
localGenerationRequest、candidateGeneration与 TUI-owned retry loop 当前形成一条平行 replacement path。把 released-Host takeover mechanism 迁移到唯一 owner transaction 后,可以删除这些 connection-level policy representation 与 Surface state machine,同时保留 compatibility admission 和 exact-epoch fencing。installationScope === 'persistent'和 version/development-UUID generation 只是近似 durable owner record 与 verifiedDeploymentIdentity应拥有的事实。共享_npxdetector 仍保留,因为 managed setup 与 invocation policy 真实消费它提供的负向 provenance fact。审计覆盖
_npxguard;替换 authority/identity inferenceSummary
Teach the local CLI/TUI to identify the installation that supplied its Runtime Host candidate and negotiate that candidate generation explicitly.
Compatible same-epoch Clients continue using the active Host even when builds differ. For a local cross-epoch conflict, TUI presents Restart, Wait, or Cancel using authoritative Host activity; Restart is fenced to the observed Host epoch. Remote profiles never receive local replacement authority, and transient
npxlaunches cannot request takeover.This is the first bounded slice of the installation lifecycle design. Artifact staging/switching, a public update command, same-epoch replacement, managed remote updates, and durable
npxownership remain out of scope.Refs #3231
Refs #3243
Refs #3244
Refs #3245
Refs #3709
Verification
@maka/core,@maka/storage,@maka/mcp,@maka/runtime,@maka/runtime-host, andmaka-agentbuilds passed.git diff --checkpassed.Not run: full repository test suite or Desktop UI tests.
Draft scope
npxcallers outside local replacement authorityAI use
Select exactly one:
Tool(s) and scope: Codex assisted with architecture analysis, implementation, documentation, tests, and local review. The human contributor will review the Draft before it is submitted for merge.
Checklist
Does this PR entail a change in behavior?