Skip to content

feat(ato-cli): best-effort Windows root taskkill for import preview - #315

Merged
Koh0920 merged 2 commits into
devfrom
feat/import-preview-windows-process-tree
May 30, 2026
Merged

feat(ato-cli): best-effort Windows root taskkill for import preview#315
Koh0920 merged 2 commits into
devfrom
feat/import-preview-windows-process-tree

Conversation

@Koh0920

@Koh0920 Koh0920 commented May 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Part 6 of #306. This PR is intentionally narrow: it adds a best-effort Windows root taskkill path for import preview session stop.

What this PR does:

  • when the recorded import preview root ato_run_pid is alive and its start time still matches, Windows stop uses taskkill /PID <root> /T to terminate that root tree
  • keep-alive stop can use that Windows root-tree termination path
  • Unix behavior is unchanged

What this PR does not do yet:

  • it does not provide full Windows parity with the Unix orphan cleanup paths
  • it does not stop verified child trees after the root process is already gone
  • it does not sweep unrelated Windows processes based only on ATO_RUN_SESSION_ID

Validation note

This remains a draft until Windows runtime smoke is collected. Minimum validation still needed:

  1. ato import --run --keep-alive --emit-json starts a child server on Windows
  2. ato stop <run_session_id> removes the live root + child tree
  3. root-dead child-orphan cleanup is still out of scope for this PR and should not be implied by this title/body

Out of scope

  • full Windows process-tree parity for root-dead child cleanup
  • new Unix changes

Tests

  • macOS compile-path verification only
  • Windows runtime smoke still required before merge

Part of #306.

@Koh0920
Koh0920 force-pushed the feat/import-workspace-cleanup-guard branch from a59403c to 4567d73 Compare May 26, 2026 19:19
@Koh0920
Koh0920 force-pushed the feat/import-preview-windows-process-tree branch from cf2f0a9 to b6c3b88 Compare May 26, 2026 19:19
@Koh0920
Koh0920 force-pushed the feat/import-workspace-cleanup-guard branch from 4567d73 to 0ffa94c Compare May 26, 2026 19:25
@Koh0920
Koh0920 force-pushed the feat/import-preview-windows-process-tree branch from b6c3b88 to 5b90004 Compare May 26, 2026 19:25
@Koh0920
Koh0920 force-pushed the feat/import-workspace-cleanup-guard branch from 0ffa94c to c4428f5 Compare May 27, 2026 01:46
@Koh0920
Koh0920 force-pushed the feat/import-preview-windows-process-tree branch from 5b90004 to 7e51ba5 Compare May 27, 2026 02:02
@Koh0920
Koh0920 changed the base branch from feat/import-workspace-cleanup-guard to dev May 27, 2026 02:02
@Koh0920 Koh0920 changed the title feat(ato-cli): Windows process-tree stop for import preview sessions feat(ato-cli): best-effort Windows root taskkill for import preview May 27, 2026
@Koh0920

Koh0920 commented May 27, 2026

Copy link
Copy Markdown
Contributor Author

Narrowed the PR scope/title/body to match the current implementation: this is now explicitly a best-effort Windows root taskkill /T change, not full Windows parity. The PR stays draft pending real Windows smoke before merge.

@Koh0920

Koh0920 commented May 27, 2026

Copy link
Copy Markdown
Contributor Author

Keeping this PR in draft. The remaining gate is real Windows runtime smoke; the repository currently has no existing workflow that performs this runtime validation, and the available CI here is limited to Linux/macOS plus Windows packaging.

Remaining smoke on a Windows host:

  1. ato import --run --keep-alive --emit-json
  2. confirm the child server is running
  3. ato stop <run_session_id>
  4. confirm the live root + child tree are gone
  5. keep root-dead child cleanup explicitly out of scope for this PR

Once those steps pass, this PR can move from draft to ready for review.

@Koh0920
Koh0920 marked this pull request as ready for review May 30, 2026 07:28
@Koh0920
Koh0920 merged commit 7611013 into dev May 30, 2026
8 checks passed
@Koh0920
Koh0920 deleted the feat/import-preview-windows-process-tree branch May 30, 2026 07:28
Koh0920 added a commit that referenced this pull request Jul 1, 2026
…ess-tree

feat(ato-cli): best-effort Windows root taskkill for import preview
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