Skip to content

fix(setup): scope service cleanup to owned processes - #333

Draft
KooshaPari wants to merge 1 commit into
mainfrom
codex/byteport-safe-service-lifecycle-20260805
Draft

fix(setup): scope service cleanup to owned processes#333
KooshaPari wants to merge 1 commit into
mainfrom
codex/byteport-safe-service-lifecycle-20260805

Conversation

@KooshaPari

Copy link
Copy Markdown
Owner

Summary

  • replace generated global taskkill /IM go.exe and taskkill /IM node.exe cleanup with an owned PID/start-time/command-marker manager
  • record and stop only the service process trees created by BytePort setup
  • fail closed when ownership metadata is malformed, a PID is reused, or a tracked tree contains a protected Codex/agent process
  • keep the Windows setup on the Podman/WSL Containers adapter path

Verification (static only)

  • PowerShell outer script parser: pass
  • embedded generated service-manager parser: pass
  • git diff --check: pass
  • bounded token audit: no taskkill, pkill, killall, WSL terminate, or global Docker/container stop tokens
  • no setup/service scripts were executed; no processes, runtimes, providers, or sessions were started/stopped/terminated

The generated stop path uses exact tracked handles and explicit protected-process exclusion; uncertain identity refuses to act.

@sonarqubecloud

sonarqubecloud Bot commented Aug 5, 2026

Copy link
Copy Markdown

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