emrg: stop_all lock escalation + advisory residuals + classify rel-path fix (rant 2026-08-18T21:24:48) - #853
Merged
Merged
Conversation
added 3 commits
August 18, 2026 22:39
…21:24:48) - _escalate_kill_windows: taskkill /F /T -> ancestor chain -> Stop-Process fallback - _escalate_locked_files: per-file disposition log (holder PID / source / action / result) - _classify_locked_files: python-dist self-held relaxation only when no external target holder; fix rel-path key bug that lost holder tags (external python-dist holder must stay residual) - stop_all: lock residuals advisory (exit 0, install continues) only when no process residuals; process residuals still abort (exit 1) - tests: advisory spec for retries test, new process-residual-abort + relaxation tests Fixes found by full-suite run: doc count sync, relaxation over-broad, advisory message shown when aborting.
argszero
commented
Aug 18, 2026
argszero
left a comment
OwnerAuthor
There was a problem hiding this comment.
✅ LGTM — cycle
Verified:
- Head dac593b, CI test + test-windows both PASS (run 32152273144).
- First CI round caught a Windows-only keying bug (os.path.relpath returns backslashes on Windows → external target misclassified as self-held); fixed by normalizing the relpath result (dac593b). test-windows now green.
- Import check + CLI check pass locally; local test-runner intentionally skipped per host temp ban (2026-08-18, until 2026-08-19) — CI is the verification path.
argszero
commented
Aug 18, 2026
argszero
left a comment
OwnerAuthor
There was a problem hiding this comment.
✅ LGTM — cycle (2nd)
Re-verified head dac593b: escalation ladder (taskkill /F /T → ancestor chain → Stop-Process fallback), advisory residuals exit-0 only when no process residual, per-file disposition logging, python-dist self-held relaxation keyed by rel-path with external-holder = residual, relpath key normalization for Windows. CI test + test-windows PASS. Agent.md 961→967 synced.
Uh oh!
There was an error while loading. Please reload this page.
argszero added a commit
that referenced
this pull request
Aug 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Final hardening of
emrg stop/stop_all()(Windows installer gate), covering host rant 2026-08-18T21:24:48 (final superseding rant for the stop_all lock handling chain) plus a follow-up classification fix found by the restored test suite.Changes
emrg/_stop_all.pytaskkill /F /Ton the holder → ancestor-chaintaskkill /F→Stop-Process -Forcefallback, so locked-file owners (incl. non-EMRG ones like the browser-harness daemon) are reliably terminated.python emrgcmdline scan all clean),stop_allreports them as advisory and exits 0 — the installer may continue. Process residuals still exit 1 (fail-closed).self-held/residual) and the holder that caused it.python-dist/(orbin/python-dist/) with no externaltargetmodule-holder is self-held — stop_all itself runs frominstall\python-dist\python.exe, and its lazily-loaded stdlib modules hold DLL locks the module-holder enumeration misses. External holder = residual (strict).os.path.relpath()even when already install-relative, producing garbage keys on POSIX and dropping holder tags;_to_rel()now only converts genuine absolute paths. This restores correctself_held/residualattribution in_classify_locked_files(bothtest_stop_all.pyandtest_installer_stop.pypass).tests/test_stop_all.py— restores the full 1099-line stop_all test suite (unit + integration coverage: escalation ladder, lock-probe independence, residual classification, advisory exit semantics, CLI delegation) and fixes thepython-dist\docstring SyntaxWarning.Agent.md— test count synced 961 → 967.Verification
from emrg.client.app import run_client) and CLI check (python -m emrg --help) pass.Rant
2026-08-18T21:24:48 — stop_all lock escalation + advisory residuals (final version of the stop_all lock-handling chain).