Skip to content

Wait for Tart and Vetu stop completion - #472

Open
yzhuang-oai wants to merge 1 commit into
mainfrom
dev/yzhuang/orchard-stop-completion
Open

Wait for Tart and Vetu stop completion#472
yzhuang-oai wants to merge 1 commit into
mainfrom
dev/yzhuang/orchard-stop-completion

Conversation

@yzhuang-oai

Copy link
Copy Markdown
Contributor

Repeated or concurrent Stop calls can report completion while the VM process or its cleanup is still running. Reconciliation can then acknowledge a new specification or restart the VM before shutdown finishes.

Share one completion channel per run in both Tart and Vetu, keep the Stopping condition visible until the stop command and VM cleanup finish, and defer specification changes while that transition is in progress.

Regression tests cover both command completion orders, concurrent callers, repeated stops, restarts, and generation acknowledgement. Runtime tests use controlled Tart and Vetu command fixtures.

Validation: go test -race -count=1 -timeout=120s ./internal/worker/vmmanager/... ./internal/worker.

@yzhuang-oai
yzhuang-oai marked this pull request as ready for review September 1, 2026 16:14
@yzhuang-oai
yzhuang-oai requested a review from edi-oai September 1, 2026 16:15
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-01T16:29:51.371590Z 603990e New commits
🔒 Security Review Completed 2026-09-01T16:30:00.319921Z 603990e New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Share one Stop completion per run and retain Stopping until both the stop command and VM cleanup finish. Expose transition conditions to reconciliation and return after requesting Stop so it cannot apply a generation or restart the VM early.

Cover both completion orders, repeated and concurrent calls, restart, and generation acknowledgement with bounded fake-command regressions. Allow process startup under parallel test load while preserving explicit shutdown ordering.
@yzhuang-oai
yzhuang-oai force-pushed the dev/yzhuang/orchard-stop-completion branch from 2714086 to 603990e Compare September 1, 2026 16:27
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