Skip to content

fix(runtime): refuse inventing Ready from attach without exec heartbeat - #413

Merged
ZhiXiao-Lin merged 3 commits into
mainfrom
honesty/attach-refuse-ready-without-exec-heartbeat
Sep 16, 2026
Merged

ZhiXiao-Lin merged 3 commits into
mainfrom
honesty/attach-refuse-ready-without-exec-heartbeat

Conversation

@ZhiXiao-Lin

Copy link
Copy Markdown

Summary

  • VmManager::attach_running_process no longer invents Ready from a live shim PID (or layout path) alone
  • Ready requires authenticated exec heartbeat (Unix connect+heartbeat; Windows guest-control.ready + named-pipe heartbeat); otherwise leave Created for observe/promote_if_ready
  • Does not flip B2, invent Live digests, or widen flaky timeouts

Test plan

  • cargo test -p a3s-box-runtime --lib test_attach_running_process (Windows: refuses Ready without heartbeat)
  • CI Format / Clippy / Test / SDK Local Sandbox

ZhiXiao-Lin and others added 3 commits September 16, 2026 07:48
attach_running_process reconstructed host manager state and projected Ready
from a live shim PID alone. Require authenticated exec heartbeat (Unix
connect+heartbeat; Windows guest-control.ready + named-pipe heartbeat) or
leave Created for observe/promote_if_ready. Does not flip B2 or invent Live.

EOF

Co-authored-by: Cursor <[email protected]>
attach_ready_test_vm now asserts authenticated Ready. PTY fixtures answer
exec.sock heartbeats; port-forward recover uses a live heartbeat server
instead of inventing Ready from a dead layout path.

EOF

Co-authored-by: Cursor <[email protected]>
@ZhiXiao-Lin
ZhiXiao-Lin merged commit 5f50a06 into main Sep 16, 2026
14 checks passed
@ZhiXiao-Lin
ZhiXiao-Lin deleted the honesty/attach-refuse-ready-without-exec-heartbeat branch September 16, 2026 00:48
ZhiXiao-Lin added a commit that referenced this pull request Sep 16, 2026
…hout heartbeat (#414)

Snapshot-restore boot completion now publishes Ready only when the one-shot
exec heartbeat authenticated; otherwise leave Created (no box.ready) for
observe/promote_if_ready (#414 / #413 parity). Does not flip B2 or invent
Live digests.

Co-authored-by: Cursor <[email protected]>
ZhiXiao-Lin added a commit that referenced this pull request Sep 16, 2026
…c heartbeat (#415)

Linux attach_sandbox now promotes Ready only via authenticated exec heartbeat
(promote_ready_if_exec_authenticated); otherwise leave Created for
observe/promote_if_ready (#415 / #413/#414 parity). Does not flip B2 or invent
Live digests.

Co-authored-by: Cursor <[email protected]>
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.

1 participant