feat(resume): retain principal on tracked resume#93
Draft
zane668 wants to merge 9 commits into
Draft
Conversation
added 9 commits
July 15, 2026 06:38
Session: manual Producer: human
Session: 019f6534-6e28-7961-83d8-395d5a971897 Producer: ai-session Tool: codex
Session: 019f6534-6e28-7961-83d8-395d5a971897 Producer: ai-session Tool: codex
Session: 019f65af-bd6c-7492-8b8b-34e17c1822c0 Producer: ai-session Tool: codex
Session: 019f65af-bd6c-7492-8b8b-34e17c1822c0 Producer: ai-session Tool: codex
Session: 019f65af-bd6c-7492-8b8b-34e17c1822c0 Producer: ai-session Tool: codex
Session: 019f65af-bd6c-7492-8b8b-34e17c1822c0 Producer: ai-session Tool: codex
Session: 019f65af-bd6c-7492-8b8b-34e17c1822c0 Producer: ai-session Tool: codex
承接 RFC-P2 issue aannoo#87:只有按已登记名字执行的 tracked resume 会复用当前一致主体,或实例行消失后唯一最新且属于最近停止生命周期的持久绑定。adoption、fork、显式重名回收和普通启动继续生成新主体。 启动前以事务复核主体并占住名字;以本次 process_id 写入轻量 reservation token,认领时在同一事务内复核 name、principal、token 与持久绑定后才写 process binding,失败清理也只删除本次 token 所有的占位。旧启动因此不能认领或误删同主体的后续重试,也不能删除并发回收的新生命周期。 新停止快照记录 principal 并在恢复时精确匹配;旧快照没有 principal 时,只接受创建时间落在该生命周期起止区间内的绑定。缺失、裂态、最新时间并列、崩溃回收或竞态均明确失败,不猜历史主体。连续 resume 主体恒定且进程绑定重铸;启动失败保留原持久绑定。 验证:cargo test --locked 通过 1999 个单元测试和 22 个 CLI 测试,0 failed;原有实工具、PTY 与 relay 用例仍按标记 ignored。cargo clippy --all-targets --all-features --locked -- -D warnings、cargo fmt --all -- --check 与 git diff --check 均通过。 Session: 019f65e0-ae1d-7a02-9bc0-4be3dfea1ae0 Producer: ai-session Tool: codex
Contributor
Author
|
CI triage: the three failing jobs are the same upstream-main baseline failures isolated in #91, not P2 regressions. Both rust-tests and windows-build stop on the pre-existing redundant |
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.
Implements the tracked-resume portion of #87.
Depends on #92. Until #92 lands, this stacked draft intentionally includes the durable principal foundation commits; after #92 merges it will be rebased so only the tracked-resume delta remains.
Scope:
Validation:
Closes #87