Skip to content

fix(runtime): retry signal_main once on ambiguous ACK loss - #323

Merged
ZhiXiao-Lin merged 2 commits into
mainfrom
feat/signal-main-ambiguous-retry
Sep 12, 2026
Merged

ZhiXiao-Lin merged 2 commits into
mainfrom
feat/signal-main-ambiguous-retry

Conversation

@ZhiXiao-Lin

Copy link
Copy Markdown

Summary

  • ExecClient::signal_main treats write/ACK timeout/closed/bad-frame as Ambiguous and retries once on a fresh stream; connect failures stay Ok(false) with no retry.
  • Signal delivery is naturally idempotent (same class as OCI kill/delete), so this avoids false-negative force-kills without inventing request ids.
  • Unit test signal_main_retries_once_after_lost_ack proves lost ACK recovers via one retry; fixture closes both stream halves so the client sees closed-without-ACK (not the 10s timeout).

Honesty

  • Does not retry spawn_main (not idempotent without observe-before-retry).
  • Does not flip b2_process_session_recovery_closed.
  • Does not claim fixture continuity or hosted-KVM Live.

Test plan

  • cargo test -p a3s-box-runtime --features vm --lib signal_main (WSL): 3 passed
  • cargo test -p a3s-box-runtime --features vm --lib keyed_exec (WSL): 3 passed
  • Hosted CI green (prefer rerun on R17 flake; do not weaken schemas)

EOF

Guest may have applied kill(main) before the ACK was lost; treat write/ACK
timeout/closed as ambiguous and retry once on a fresh stream. Connect
failures stay Ok(false) with no retry. Signal delivery is naturally
idempotent — avoids false-negative force-kills without request ids or B2 flips.
Holding only the reader open left the write half alive, so the client
waited the full ACK timeout instead of seeing a closed stream.
@ZhiXiao-Lin
ZhiXiao-Lin merged commit 3bc6384 into main Sep 12, 2026
14 checks passed
@ZhiXiao-Lin
ZhiXiao-Lin deleted the feat/signal-main-ambiguous-retry branch September 12, 2026 06:04
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