Repository navigation
Merged
Conversation
…detour install diagnostics (#551) The slice 7c test was hanging because of a self-inflicted assertion bug, not a retour or detour issue. The interposer formats paths via `{:?}` (debug-escaped, doubled backslashes), so `contains(probe_path)` against the raw path never matched and the 10-second deadline ran to completion. The retour install actually completed on all 5 detours, and the CreateFileW detour fired correctly on testbin-createfilew-probe's call. Fixes: - `crates/.../interposer-windows/src/lib.rs`: install_detours now emits `RPO_HOOK install begin=<name>` / `install end=<name>` sentinels around each install_one call. Lets the `interposer_diagnostic_windows.rs` test (also added) report which retour install hung or errored if a regression ever reintroduces the hang. Verified clean against cmd.exe — all 5 detours install in <100 ms each. - `crates/.../observer/tests/interposer_integration_windows.rs`: un-ignore `interposer_dll_fires_rpo_hook_after_inject`. Replace `contains(probe_path.display())` with `contains("RPO_HOOK file-open") && contains("probe.txt")` for both the deadline- poll exit condition and the final assertion. The basename alone is unambiguous since the fixture only ever opens that file. - `crates/.../observer/tests/interposer_diagnostic_windows.rs`: new diagnostic test that injects into cmd.exe and reports per-detour begin/end pair coverage to eprintln. Always passes (observational test) — its eprintln output lands in cargo nextest logs for CI / debugging visibility. Verified locally: test interposer_dll_fires_rpo_hook_after_inject ... ok (7.10s) test diagnose_install_progress ... ok (13.22s) Closes the slice 7c gap in #551's slice 7 acceptance criterion: Windows test now asserts the detour fires on a real (non- diagnostic) file API call, matching the assertion strength of Linux (7d) and macOS (7e). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This was referenced Jun 22, 2026
Closed
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 free
to 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
The slice 7c `#[ignore]`'d Windows path-specific test was hanging because of a self-inflicted assertion bug, not a retour or detour issue. The interposer formats paths via `{:?}` (debug-escaped, doubled backslashes), so `contains(probe_path)` against the raw path never matched and the 10-second deadline ran to completion. The retour install actually completed on all 5 detours, and the CreateFileW detour fires correctly on testbin-createfilew-probe's call.
Captured stderr from a successful run:
```
RPO_HOOK install-thread-start
RPO_HOOK install begin=CreateFileW
RPO_HOOK install end=CreateFileW
... (4 more begin/end pairs) ...
RPO_HOOK install-thread-done
RPO_HOOK file-open path="C:\Users\...\probe.txt" access=0x80000000 disposition=3 handle=0xbc
RPO_HOOK file-close path="C:\Users\...\probe.txt" handle=0xbc
```
Changes
Verification
```
$ soldr cargo test -p running-process-observer --features embed-helper
--test interposer_integration_windows
test interposer_dll_fires_rpo_hook_after_inject ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; finished in 7.10s
$ soldr cargo test -p running-process-observer --features embed-helper
--test interposer_diagnostic_windows -- --nocapture
test diagnose_install_progress ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; finished in 13.22s
```
Where this leaves #551
All three tier-1 platforms now have integration tests asserting that the interposer detour fires on a real file API call with the expected path.
🤖 Generated with Claude Code