test: cover transfer-helper scan/repair/CLI and agent terminal, reaper, fsevent paths - #68
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
Conversation
…r, fsevent paths Co-Authored-By: Augustus Otu <Augani7@gmail.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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
cargo llvm-cov --workspaceshowed the transfer-helper crate almost entirely untested (scan_linux.rs,repair_linux.rs,main.rsall at 0%) plus three thin spots in the agent. This adds unit tests only; workspace line coverage goes 76.27% → 87.83% (regions 76.06% → 87.61%).Per-module before → after (lines):
transfer-helper/src/scan_linux.rstransfer-helper/src/repair_linux.rstransfer-helper/src/main.rstransfer-helper/src/lib.rsagent/src/terminal.rsagent/src/vsock_server.rsagent/src/reaper.rsWhat the tests exercise:
scan→repairround trip through a manifest file, usage errors, manifest canonicality/size/hard-link rejection, and atomic.partialreplacement.serve_shell_streamover aUnixStreampair — output flows both ways, the session ends on shell exit and on client close — plus the injectedTERMand the raw fd helper error paths.start_pid1_reaper_if_neededis a no-op off PID 1 (an unrelated child stays waitable by its spawner).Two non-behavioral production touches were needed:
handle_fsevent_batchis now generic over the stream, so its framing/limit/deadline logic can be driven bytokio::io::duplexinstead of a real vsock connection (unavailable off a guest):transfer-helper/src/test_support.rs(test-only) builds throwaway volumes. It probes whetherTMPDIRsupportsuser.*xattrs and falls back totarget/dory-transfer-testswhen it doesn't, and keeps volume paths short (v<pid>-<n>) because the socket tests would otherwise exceedSUN_LEN.scripts/test.sh rust(fmt, clippy-D warnings, full workspace tests) passes. The remaining zero-coverage files are process entrypoints (agent/src/main.rs,runc-wrapper/src/main.rs); Swift/Xcode coverage was not measured since it needs macOS.Link to Devin session: https://app.devin.ai/sessions/7817d379e16e467594e0f0fca962cf82
Requested by: @Augani