fix(env): restore USERNAME in Windows baseline env; real login env on Unix (4.6.1) - #655
Merged
Conversation
… Unix CreateEnvironmentBlock silently omits per-user dynamic variables (USERNAME, USERDOMAIN) when the token is opened with TOKEN_QUERY only; open it with TOKEN_QUERY | TOKEN_DUPLICATE | TOKEN_IMPERSONATE as the API documents. Root-caused live: soldr's daemon derived its pipe name from USERNAME and bound soldr-daemon-soldr-<hash> while clients dialed soldr-daemon-<user>-<hash>, forcing permanent uncached fallback. EnvironmentPolicy::UserBaseline on Unix now reconstructs a clean login environment from getpwuid_r (USER/LOGNAME/HOME/SHELL + default login PATH, carrying over LANG/LC_*/TZ/TMPDIR) instead of inheriting the parent environment wholesale. Release 4.6.1. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…follow-up) Rewrite ci-preflight.yml as ONE job per platform: workspace cargo build + dev wheel build happen exactly once, then lint, unit tests, integration tests, servicedef proof, and rustdoc run sequentially against that build. The warm-then-fan-out shape still re-ran uv sync and the maturin dev wheel build in every sub-worker and paid 4x runner spin-up + cache transfer per platform. Remove the 20 legacy per-platform per-task wrappers, the 3 shared _<task>.yml templates, preflight-macos.yml, and linux-x86-rustdoc.yml (all superseded by ci-preflight.yml since #513; soak period served). Keep the six *-build.yml wheel workflows for ci/publish.py's manual collection path but make them workflow_dispatch-only. Their reproducible-spot-check job moves to ci-linux.yml. Restrict the ci-{linux,macos,windows} dispatchers' push trigger to main so PR branches stop running the whole matrix twice (push + pull_request). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… profraw bisect Coverage has been red since 2026-06-21 (200+ runs): all tests pass, then rustup's llvm-profdata crashes with SIGILL merging the profraw set. The LD_PRELOAD interposer landed the same day — instrumented processes exiting through hooked file APIs are the prime suspect for corrupt .profraw output. On failure the job now: prints llvm-profdata identity, gdb-backtraces any core dump, validates each profraw individually (uploading the bad ones as artifacts), and retries the merge with only the valid files to confirm or refute the poison-file theory. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…SIGILL since #533 Instrumented daemons this suite kills at teardown (broker-v2 accept loop, #533 — 'production exit is via SIGTERM') never run the atexit __llvm_profile_write_file flush; a file caught mid-write is truncated and rustup's llvm-profdata crashes with SIGILL merging it. Coverage has been red on every run since the #533 merge (2026-06-21). Split cargo llvm-cov into nextest --no-report / report and validate each .profraw with llvm-profdata show in between, deleting the ones it cannot read (loses only the killed processes' counters). Crash-on-corrupt-input is a known llvm-profdata bug class upstream (llvm/llvm-project#92358, #63179); --failure-mode does not help when the parser itself crashes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
zackees
added a commit
to FastLED/fbuild
that referenced
this pull request
Jul 24, 2026
…nv USERNAME fix) (#1171) running-process ≤4.6.0 built detached daemons' baseline env via CreateEnvironmentBlock with a TOKEN_QUERY-only token, silently omitting the per-user dynamic variables (USERNAME, USERDOMAIN). 4.6.1 opens the token with the documented access mask and, on Unix, reconstructs a real login environment via getpwuid_r instead of inheriting the parent env. See zackees/running-process#655. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 24, 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
Root-caused live on a dev box where soldr's daemon became permanently unreachable (zackees/soldr — daemon pipe-name split).
Windows:
user_baseline_environment_block()opened the process token withTOKEN_QUERYonly.CreateEnvironmentBlockthen succeeds but silently omits the per-user dynamic variables (USERNAME,USERDOMAIN). soldr derives its daemon pipe name fromUSERNAME, so daemons spawned with the baseline env boundsoldr-daemon-soldr-<hash>while clients dialedsoldr-daemon-Zach_Vorhies-<hash>— permanent uncached-fallback loop plus a displacement kill war. Fixed by opening the token withTOKEN_QUERY | TOKEN_DUPLICATE | TOKEN_IMPERSONATEper the API docs. Verified empirically: QUERY-only → no USERNAME; QUERY|DUPLICATE →USERNAME=Zach Vorhies.Unix:
EnvironmentPolicy::UserBaselinepreviously fell back to inheriting the parent env wholesale. It now reconstructs a clean login environment from the user's identity viagetpwuid_r:USER/LOGNAME/HOME/SHELL, platform default loginPATH, withLANG/LC_*/TZ/TMPDIRcarried over. Falls back to inheritance only when no passwd entry resolves.Tests
live_user_baseline_contains_username(Windows): baseline must contain non-empty USERNAME matching the live login value — fails on TOKEN_QUERY-only.login_baseline_contains_identity_and_default_path(Unix)login_baseline_does_not_leak_arbitrary_process_vars(Unix): process-local canary var must not leak into the baseline.x86_64-apple-darwincross-check compiles.Release
Version bumped 4.6.0 → 4.6.1 in all manifests (
ci.version_checkgreen) — merging fires the Auto Release workflow.🤖 Generated with Claude Code