Repository navigation
Scan daemon child spawns structurally; extend the app's Linux and Windows variables - #4386
Conversation
|
Review round: is_test_only accepts only cfg(test) or cfg(all(test, ..)); aliases are collected across all files to a fixed point (pub use .. as, type =, chained renames); ::new and std::process::Command::new are found; macro $c::new fragments are flagged. Scope, stated plainly: this is a Command::new scan over packages/daemon/src only; posix_spawn, system, execve, openers (open::that, webbrowser), build.rs and tests/it are out of scope, and clap's Command is flagged too (loud over-flagging accepted). The GTK_/GDK_/WEBKIT_ prefixes are replaced by explicit harmless names (GDK_BACKEND, GDK_SCALE, GDK_DPI_SCALE, GTK_THEME, GTK_USE_PORTAL, WEBKIT_DISABLE_COMPOSITING_MODE, WEBKIT_DISABLE_DMABUF_RENDERER); the code-loading names (GTK_MODULES, GTK_PATH, GTK_IM_MODULE_FILE, GTK_EXE_PREFIX, GDK_PIXBUF_MODULE_FILE, GDK_PIXBUF_MODULEDIR, WEBKIT_EXEC_PATH, WEBKIT_INJECTED_BUNDLE_PATH, WEBKIT_INSPECTOR_SERVER) are in the withheld test. Mutation checks: any-cfg skipping, per-file aliases, qself, macro fragment, single-pass alias chain, GTK_ prefix re-added, a dropped name, and all/any confusion each fail a test. test:changed was not re-run after this round (disk below 20 GiB); targeted child_env tests (9) and quality:fix passed. |
…tend the app's Linux and Windows variables The scan parses each file instead of cutting it at the first cfg(test), and sees aliases, spacing and macro bodies. The app allow-list gains the GTK/GDK/ WebKit families and the Linux and Windows names the app needs. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…lified paths, macro fragments; name the webview variables the app gets Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
bd4ad54 to
b332530
Compare
Scan
The source scan in
child_env.rscut each file at its first#[cfg(test)]and matched text. It now parses each file withsyn(dev-dependency) and skips#[cfg(test)]items wherever they sit; it findsCommand::newthroughuse ... Command as C,type C = Command, spacing, use as a value, and inside macro arguments. The real daemon source has no hit, so no production spawn was hiding. Tests plant each hole.Allow-lists (owner decisions flagged)
The app's environment gains: GTK_/GDK_/WEBKIT_ families, LOGNAME, LANGUAGE, SSL_CERT_FILE/DIR, NO_PROXY (Linux); ProgramFiles (+x86/W6432), CommonProgramFiles*, ALLUSERSPROFILE, PUBLIC, SystemDrive, COMPUTERNAME, USERDOMAIN, SESSIONNAME, PROCESSOR_ARCHITECTURE/ARCHITEW6432, NUMBER_OF_PROCESSORS, OS (Windows).
Owner decision: LD_LIBRARY_PATH and HTTP_PROXY/HTTPS_PROXY/ALL_PROXY are deliberately NOT passed: the first redirects library loading, the proxy URLs can embed credentials. Add them if the app must work behind a proxy.
Tests and mutation checks
New: three scan tests and
the_app_gets_the_linux_and_windows_variables_it_needs. Each mutation reverted and verified failing: truncate-at-cfg(test), ignoring cfg(test), alias handling, macro scan,newpath match, removing the three prefixes, removing a Windows name, swapping NO_PROXY for HTTPS_PROXY, removing OS.quality:fixandtest:changedgreen.Not exercised
Not run on Windows or Linux: the lists are made correct from the code and docs, and the test shows their effect on any host, but the app was not launched from the tray on either OS. Please check that before relying on it.
Closes #4359
🤖 Generated with Claude Code