fix(executors): carry user-bus transport env into the systemd-run wrapper - #126
Merged
Conversation
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.
What
scoped-hostwraps host spawns insystemd-run --user --scope, and systemd-run resolves the user manager throughXDG_RUNTIME_DIR/DBUS_SESSION_BUS_ADDRESSin its own environment. A backend with a strict child-env allowlist (prime strips both by design) therefore broke the wrapper itself:systemd-runexited 1 withFailed to connect to bus: No medium found, and the exit was misattributed asprime exit 1. The availability probe passes ($XDG_RUNTIME_DIR/systemd/privateexists) so the fallback never fired.Fix: re-inject the two transport vars from the bridge's own env into the wrapper invocation. Transport plumbing, not credentials — the payload ignores them.
Proof (live, real model)
Found and fixed during the first live prime e2e. After the fix, on this host through the full path (bridge → scoped-host systemd-run → nix-built prime-agent 0.7.0 → IPython kernel → z.ai glm-5.2):
harness: "prime",appendSystemPrompt, inline skill): deliberately-wrong expected hash was refuted from real execution (VERIFIED-FALSE, recomputed value matches local), profile marker line present in output — profile materialization proven end-to-end.tsc --noEmitclean.Known follow-up (named, not smuggled)
A systemd-run that starts and exits non-zero is still attributed to the backend CLI (the documented per-invocation fallback only catches spawn errors). Distinguishing wrapper-failure stderr signatures and degrading to
hostSpawneris a separate, small change.