Skip to content

Launcher fail-stop: remaining items after #65 (Windows process trees, WSL exit codes, cp932, UNKNOWN escalation, stop races) #66

Open

Description

@tmori

Remaining items from #64 after #65 (#65 is limited to propagating failures to the Launcher and keeping normal completion compatible, agreed with @tmori):

  • Windows: child processes survive a stop. hako_asset_runner.py (~291, ~330) returns early when the parent has already exited, so taskkill /T never runs. Since an exit-0 finish now ends TERMINATED with no failure_report, the leftover children are invisible. Kill the process tree even when the parent is gone (for example a Job Object, or recording child PIDs), and report survivors.
  • WSL: Windows .exe assets always report exit_code=None (hako_asset_runner.py ~394). Under the normal-completion rule (hako_launcher.py ~352) every normal finish of such an asset becomes FAILED.
  • Non-UTF-8 hako-cmd check output (cp932 on Windows). text=True (hako_cli.py ~118) raises UnicodeDecodeError, which reaches the watch loop and fail-stops with watch_exception. Decode with errors="replace" and treat the result as UNKNOWN.
  • A slow version probe disables supervision silently. The 1.0 s probe timeout is cached as "unsupported" for the whole session (hako_cli.py ~212-236). Retry it, or treat a timeout as unknown rather than unsupported.
  • Repeated UNKNOWN never escalates. Add a consecutive-UNKNOWN counter (and the last reason) to the session payload, and consider a configurable escalation threshold.
  • Stale health result in asset-exit reports. _fail_stop merges _last_health_report into the top level (hako_launcher.py ~199), so an unexpected_asset_exit report can show status: "OK".
  • Stop-time races. A user terminate can still end FAILED: an in-flight check returns ABORT, or a killed asset is reported as unexpected_asset_exit, because _stop_watch and TERMINATING are not checked. Live terminate returns ok: true even when the session ends FAILED (hako_launcher_control.py ~467).
  • activate() can be left in ACTIVATING when the startup check or _prepare_runtime raises.
  • A real-process test of the business-pack flow: a real child exits 0, then the background session reports TERMINATED and hako_launcher_ctl status returns ok.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions