emrg: stop_all observability — owner detail + lock-probe fail-closed + single-scan + PYTHONPATH - #832
Conversation
…sed + single-scan + PYTHONPATH)
|
Tested PR #832 on Windows (head First-hand confirmations from code inspection:
Two non-blocking notes:
The owner-detail + excluded-chain + WARNING-all-excluded output directly answers "who were the owners and why was nothing killed" — a real observability win for the 3-owners-all-excluded case. |
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 698. CI test + test-windows both PASS. Changes verified locally: owner detail/excluded annotation in _LOCK_OWNER_PS (4th column, excluded-chain, WARNING-all-excluded), lock-probe fail-closed (ctypes signature pinned + _lock_probe_error → verify residual), single-scan cache, PYTHONPATH User/Machine observability + install-dir warning. Full suite 925 passed + 1 skipped, import + CLI green.
… review nits, PR #832)
|
Verified the follow-up commit
Re-ran on Windows at head The only remaining nit from my earlier review is the merge-order heads-up (unchanged): this PR and #833 both edit the same Agent.md pytest-count line (925 here vs 920 there) — whichever merges second reconciles to 929. |
|
Thanks for the Windows first-hand verification @pm25coder — both nits addressed in cec0c3f:
|
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 699 (post-fix re-verify). Head moved 557d8ec→cec0c3f (pm25coder review nits: handle guard now covers NULL→None via if not h or h == c_void_p(-1).value; PYTHONPATH warning anchored on .emrg\\install only + regression test). CI test + test-windows PASS (32091358466). Local: test_stop_all.py 67 passed, full suite 925, import + CLI green.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 700 (3rd). Head cec0c3f unchanged from cycle 699, CI test + test-windows PASS, MERGEABLE. Full local suite verified in cycles 698/699 (925 passed + 1 skipped). 3 consecutive ✅ from cycles 698/699/700 — merging.
Fixes host rants 2026-08-18T09:40:40 (stop_all 可观测性三缺口 — v0.2.45 still hitting DeleteFile code 5, all three detectors reported CLEAN while files were locked).
A. RM owner detail + excluded annotation (
_LOCK_OWNER_PS)excluded|targetcolumn (who the owners were, why nothing was killed)excluded-chainline dumps the ancestor set incl. self PIDWARNING all N owner(s) excluded: <pids>—found but not killedalways leaves a trace_windows_lock_ownersfiltersexcluded-tagged owners so verify never lists self/ancestor as residuals (3-col legacy lines still parse)B. lock-probe fail-closed (
check_install_writable)CreateFileW.restype = c_void_p+ argtypes) — 64-bit HANDLE truncation was the prime suspect for the false0 lockedexcept Exception: return []removed →lock-probe ERROR: <Exc>: <msg>printed + recorded in_lock_probe_error, surfaced as a verify residual (lock-probe failed (error: ...)) → exit 1, installer aborts instead of overwriting locked fileslock-probe scanned N files -> M locked (Xms)C. stop_all header PYTHONPATH
~/.emrg/install(the 'unrelated python imports install\lib and locks C extensions' root cause)D. verify single-scan
_verify_windows_categories()result cached;_verify_windows_summary()reuses it — the PowerShell RM scan ran TWICE per stop_all (two rm-scan lines, ~2s+ wasted)Tests: +9 (test_stop_all.py) — 916 → 925; full suite 925 passed + 1 skipped, import + CLI green.