feat(runtime-host): coordinate local owner transfer - #3769
Conversation
5928dc7 to
9323f81
Compare
0cfab38 to
61b61a8
Compare
4e78816 to
dd4756a
Compare
Astro-Han
left a comment
There was a problem hiding this comment.
Update on dd4756a89d:
No blocking issues. The delta since 9323f816 limits to account-local authority resolution, descriptor-safe record reads, temp cleanup, and fsynced private directories; transfer state machine unchanged.
Checks on dd4756a89d — code GO.
简体中文
该头未发现阻断。4ca6b0f to
ba6944d
Compare
|
Rebased this dependent change onto #3767 head The durability review on #3767 also exposed a dependent recovery issue here. Recovery now replays the exact A fault-injection regression covers commit-directory-sync failure followed by a failed confirmation barrier and a later successful recovery. Combined owner/transfer focused tests pass 27/27 locally. The native focused jobs are green on Windows and macOS. The Linux 简体中文已重基到 #3767 最新 head。恢复流程不再用 Generated-by: Codex |
ba6944d to
caf8c56
Compare
Stage an exact target before persisting transfer intent, then hold the single deployment-authority lock through exact Host retirement, writer release, activation, Ready verification, and owner commit. Preserve transferring state for crash recovery and safely restore the previous owner only when active work refused retirement before cutover. Generated-by: Codex
caf8c56 to
45b27f9
Compare
Astro-Han
left a comment
There was a problem hiding this comment.
I reviewed this head and found no blocking issues.
Transfer correctly holds deployment-authority lock across begin/CAS, cutover, writer release, activation, Ready verification and commit; commit-unknown paths replay via re-observation and keep transferring on any phase failure; rollback only for active_work when adapter guarantees retirement has not started.
No P0-P3 actionable; hosted test and owner checks are SUCCESS on this head.
Summary
Add the local-process owner-transfer transaction on top of #3767.
The transaction stages and verifies the exact target before durable intent, then holds the one deployment-authority lock across revision CAS, exact observed-Host cutover, State Root writer release, target activation, Ready verification, and owner commit. A retry re-observes reality: it can recognize the same transaction-scoped target after a caller crash, while post-retirement failures remain truthfully
transferringinstead of claiming rollback.An
active_workrefusal is the only automatic rollback path, and its adapter contract guarantees retirement never began and the previous owner remains runnable. Target staging failures and stale owner confirmations do not retire a Host.This PR deliberately adds no second deployment journal or lock, no PID/HostEpoch/version authority, no ordinary
connectOrSpawnreplacement policy, and no remote Client mutation path. Source-specific Desktop, installed CLI, and managed-service adapters remain separate follow-up slices because their launch and supervisor evidence genuinely differ.Refs #3231
Refs #3709
简体中文摘要
在 #3767 的 durable owner record 之上增加本地进程 owner transfer transaction。
Transaction 先 stage 并验证精确 target,再用唯一的 deployment-authority lock 串行完成 revision CAS、精确 observed Host cutover、State Root writer 释放、target 启动、Ready 验证和 owner commit。Crash 后不会从 PID 或 HostEpoch 续跑,而是重新观察现实;如果本次 transaction 的精确 target 已经在运行,则只重验 Ready 并 commit,不会重复 retirement 或 launch。
只有 Host 因 active work 拒绝、且 adapter 保证 retirement 尚未开始时,才自动恢复旧 owner。Staging 失败或 stale confirmation 都不会 retirement Host。
本 PR 不增加第二份 deployment journal 或第二把 authority lock,不把 version/epoch 当 owner,不把 replacement policy 塞回普通
connectOrSpawn,也不允许 remote Client 修改 Host。Desktop、installed CLI 与 managed service 的 adapter 因 launch/supervisor 证据不同,留作独立后续切片。Review focus
daa5c69a6; the diff againstmainnow contains only the transfer transaction.target_presentwith a transaction-scoped launch fence or managed deployment evidence, never version alone.Verification
@maka/coreand@maka/storagebuilds — passed.git diff --check— passed.AI use
Select exactly one:
Tool(s) and scope: Codex designed and implemented the transaction seam, recovery semantics, and tests under user direction. The commit includes a
Generated-by: Codextrailer.Checklist
Does this PR entail a change in behavior?