Skip to content

emrg: remove stop_all -I isolated mode (rants 2026-08-18T21:13:03/21:14:16) - #852

Merged
argszero merged 1 commit into
masterfrom
feature/remove-stop-all-isolated-mode
Aug 18, 2026
Merged

emrg: remove stop_all -I isolated mode (rants 2026-08-18T21:13:03/21:14:16)#852
argszero merged 1 commit into
masterfrom
feature/remove-stop-all-isolated-mode

Conversation

@argszero

Copy link
Copy Markdown
Owner

What

Remove the -I (isolated mode) flag from the stop_all.py invocation in the Windows installer's PrepareToInstall step, restoring the v0.2.49 form "{PythonExe}" "{StopScript}".

Why (host rants 2026-08-18T21:13:03 + 21:14:16, verbatim intent)

v0.2.50 Windows installs failed with the installer reporting:

Could not find platform independent libraries <prefix>
Fatal Python error: Failed to import encodings module
ModuleNotFoundError: No module named 'encodings'

and no stop_all.log was produced (stop_all.py crashed at startup, before log tee).

Root cause: -I was introduced in v0.2.50 (make-installer.sh) under the hypothesis that python-dist's site config loads install\lib modules (websockets → speedups pyd), self-locking the files to delete. Windows standalone python (python-build-standalone) locates stdlib via its directory structure / ._pth mechanism, which -I (isolated mode) ignores → stdlib not found → crash at startup.

Hypothesis falsified: v0.2.49 module-holder enumeration showed stop_all (a pure-stdlib single file) only loads python-dist DLLs, never websockets — the self-lock never happened. The real installer blocker was verify misjudging its own python-dist lock as residual, already fixed by #847 (self-held attribution). stop_all's excluded-chain already excludes self + ancestor processes (it never kills itself), and #847 handles self-held locks — self-exclusion + self-held is the complete solution, no replacement flag needed.

Changes

  1. packaging/make-installer.sh — remove -I from the Exec line; replace the stale -I rationale comment with the removal explanation (python-build-standalone stdlib discovery + falsified hypothesis).
  2. emrg/_stop_all.py — build stamp no longer claims "isolated -I" (now: module-holder enumeration + createfile-probe + taskkill RM + excluded-chain self-exclusion + self-lock guard).
  3. tests/test_installer_stop.py — assert the new -I-free invocation is present and the -I invocation is absent; updated the rationale comment.

Verification

  • uv run pytest tests/test_installer_stop.py tests/test_stop_all.py → 89 passed
  • Full suite: 960 passed + 1 skipped (961 collected, Agent.md unchanged)
  • Import + CLI checks pass

Note: -I was the only functional difference vs v0.2.49, which produced a full stop_all.log on Windows. Host acceptance: Windows install v0.2.51 → stop_all.log generated completely → external process killed → self-held python-dist lock marked non-blocking → exit 0 → installer succeeds.

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle 766. Diff verified: (1) make-installer.sh Exec now (v0.2.49 form, no -I) — python-build-standalone stdlib discovery via directory structure/._pth is not bypassed; comment updated with falsified-hypothesis reasoning (excluded-chain self-exclusion + #847 self-held = complete solution, no replacement flag); (2) _STOP_ALL_STAMP drops the -I claim; (3) test asserts the -I-free invocation is present AND the -I form is absent (triple-quoted literal matching the exact Pascal text — no NameError). CI test + test-windows PASS (run 32141624883). Local: pytest 960 passed + 1 skipped (961 collected), import + CLI OK.

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle 766. Diff verified: (1) make-installer.sh Exec now uses the v0.2.49 form (quoted PythonExe + quoted StopScript, no -I) — python-build-standalone stdlib discovery via directory structure / ._pth is not bypassed; comment updated with falsified-hypothesis reasoning (excluded-chain self-exclusion + #847 self-held = complete solution, no replacement flag); (2) _STOP_ALL_STAMP drops the -I claim; (3) test asserts the -I-free invocation is present AND the -I form is absent (triple-quoted literal matching the exact Pascal text — no NameError). CI test + test-windows PASS (run 32141624883). Local: pytest 960 passed + 1 skipped (961 collected), import + CLI OK.

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle 767. Independent re-review: head 22718b1 unchanged, CI test + test-windows PASS (run 32141624883), MERGEABLE. Diff: (1) make-installer.sh Exec restores v0.2.49 form (no -I) — python-build-standalone stdlib discovery preserved; (2) _STOP_ALL_STAMP updated; (3) test asserts -I-free invocation present + -I form absent via exact triple-quoted Pascal literals. Local: test_installer_stop + test_stop_all 89 passed on this head. (Note: cycle 766 accidentally left a duplicate review with a shell-mangled body — same verdict, informational only.)

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle 768. 3rd consecutive approval (cycles 766/767/768, no ❌ between). Head 22718b1 unchanged, CI test + test-windows PASS (run 32141624883), MERGEABLE. This implements step 1 of the superseding final rant 21:24:48 (remove -I); the verify-flow extensions (re-kill strategies, self-held relaxation, per-file logs) will follow in a separate PR. Proceeding to merge.

@argszero
argszero merged commit e434196 into master Aug 18, 2026
2 checks passed
@argszero
argszero deleted the feature/remove-stop-all-isolated-mode branch August 18, 2026 13:26
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