Repository navigation
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]>
…cket path in test (#488 follow-up) The slice 3c integration test reads broker stdout looking for the "bound at" line: running-process-broker-v2 bound at <path> (program=<…>, mode=<…>) It then `strip_prefix("running-process-broker-v2 bound at ")` and `trim_end()` — which leaves the entire trailing ` (program=<…>, mode=<…>)` glued onto what gets captured as `socket_path`. The "path" passed to `Stream::connect` is therefore ~25 bytes longer than the actual filesystem socket path. On Linux, where `sun_path` is exactly 108 bytes, that's enough to push every non-trivial XDG_RUNTIME_DIR / `/tmp/running-process-<uid>` path past the limit — and `Stream::connect` then panics with the now- infamous "exceeds capacity of sun_path of sockaddr_un" error. This was the bug that's been cascade-failing every CI unit-test run since slice 3c landed. It's purely a test-parser issue — production broker bind/connect were always correct because they share the same string and the broker's own `bound at` print happens *after* successful `create_sync`. Fix: `rsplit_once(" (")` on the trimmed remainder. Everything before ` (` is the path; the trailing parenthesized metadata is discarded. On Windows + macOS (where the path is short enough that the test was passing despite the bug) the fix is a no-op because the path either starts with `\.\pipe\` and contains no ` (` substring, or is the hash-shortened macOS leaf — both fall back to the full string via `unwrap_or(rest)`. Verified locally by inspection of test logs: - Pre-fix: panic at line 146 with "exceeds capacity" + a ~113-byte captured "path". - Post-fix: the captured path is the 88-byte filesystem socket the broker actually bound to. Closes the "broker-v2 cascade failure" item that's been documented as out-of-scope across the #539 and #551 loops. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…aemon_version regression Two independent CI regressions surfaced by the broker-v2 cascade unblock landing in PR #573: 1. **testbin-createfilew-probe fails to compile on Linux + macOS.** Slice 7c's #[cfg(target_os = "windows")] gate is at the file level — on non-Windows the entire crate compiles to nothing and rustc errors out with "main function not found". Cargo requires every `[[bin]]` target to have a main fn on every build target, regardless of which target ever runs the binary. Fix: add a stub main fn for non-Windows that prints a "Windows- only fixture" message and exits with code 2. The Windows path is unchanged. 2. **`broker_v2_scaffold_accepts_connection::...` now panics at the `daemon_version should be populated` assertion (line 196).** PR #573 fixed the path-capture parser; the test now successfully completes the Hello/HelloReply round-trip and reaches a later assertion that the daemon's reported version is non-empty. Root cause: PR #533 changed `daemon_version` from the broker binary's own CARGO_PKG_VERSION to `definition.min_version.clone()`. That's semantically wrong — `daemon_version` is the running broker's actual version (matches the proto comment); min_version is a per-service floor expressed by the servicedef. For any servicedef that doesn't explicitly opt in to a floor (e.g. the test's stub), min_version is empty and the contract breaks. Fix: restore `daemon_version: env!("CARGO_PKG_VERSION").into()` (the pre-#533 behavior the comment block on top of the diff already described). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This was referenced Jun 22, 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 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
Two independent CI regressions surfaced after PR #573 unblocked the broker-v2 cascade:
1.
testbin-createfilew-probewon't compile on Linux + macOSSlice 7c's `#[cfg(target_os = "windows")]` gate at the file level means the crate compiles to nothing on non-Windows, and rustc errors out with "main function not found". Cargo requires every `[[bin]]` target to have a `main` fn on every build target.
Fix: stub `main` fn for non-Windows that prints a "Windows-only fixture" message and exits with code 2. The Windows path is unchanged.
2. broker-v2 test now panics at line 196 (
daemon_version should be populated)PR #573 fixed the path-capture parser; the test now successfully completes the Hello/HelloReply round-trip and reaches a later assertion that the daemon's reported version is non-empty.
Root cause: PR #533 changed `daemon_version` from `env!("CARGO_PKG_VERSION")` to `definition.min_version.clone()`. That's semantically wrong — `daemon_version` is the running broker's actual version (matches the proto comment); `min_version` is a per-service floor. For any servicedef that doesn't explicitly opt in to a floor, `min_version` is empty and the contract breaks.
Fix: restore `daemon_version: env!("CARGO_PKG_VERSION").into()` (the pre-#533 behavior the comment block on top of the diff already described).
Verification
🤖 Generated with Claude Code