You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(deploy): give shell stages HOME under systemd (#24) - #25
deploy/stagehand.service: Environment=HOME=/root. The live stagehand serve environment (from /proc) is LANG, PATH and USER only, and baseEnv (internal/cli/cli.go:257) passes HOME only when the runner has it.
README: the systemd example sets HOME; there is a note on why; the stage-environment line now matches baseEnv (LANG is always C.UTF-8).
Deploy: install the unit, daemon-reload, restart once no run is active, check /proc/<pid>/environ and that a stage sees HOME. Roll back: the previous unit is in backup/stagehand.service.pre-events (plus the trigger flag).
Decision:approved Summary: Reviewed the complete two-file diff from base dceb0a8 to exact head afdde93. No P0-P2 findings. The deployment unit is otherwise unchanged apart from explanatory comments. Production-binary smoke checks confirmed shell HOME propagation and sandboxd guest HOME=/home/user without host-environment leakage. Nonblocking documentation caveat: README.md:190 incorrectly makes PATH conditional; baseEnv supplies a fallback when PATH is unset or empty. The frozen prior-verdict file contains no findings for PR #25. Sandbox restrictions prevented local CGO/race checks and offline systemd verification; exact-head CI independently verified vet and race tests, but not unit verification. No repository files were modified or live services accessed.
Tests Run
CGO_ENABLED=0 go build -trimpath -o /root/.gitmoot/cache/tools/read-only/d5775d8ea96bb1e3/runtime-state/stagehand-pr25-afdde930-review ./cmd/stagehand && /root/.gitmoot/cache/tools/read-only/d5775d8ea96bb1e3/runtime-state/stagehand-pr25-afdde930-review version -> passed; output: stagehand dev.
go vet ./... -> sandbox-blocked: runtime/cgo could not read /usr/include/stdc-predef.h (Permission denied).
go test -race -count=1 ./... -> sandbox-blocked during runtime/cgo compilation: /usr/include/stdc-predef.h (Permission denied).
CGO_ENABLED=0 go vet ./... -> passed.
CGO_ENABLED=0 go test -count=1 ./... -> passed across all packages, including internal/cli, internal/engine, internal/shellexec, and internal/agentexec.
Python subprocess smoke invoking the built stagehand binary with --home add <fixture.yaml>, then --home run -> four cases passed: HOME=/root propagation; absent HOME/TZ omission; absent PATH fallback; empty HOME/PATH/TZ handling. LANG was C.UTF-8 despite a different runner locale; an unlisted secret canary was omitted.
Python subprocess smoke invoking the production CLI with an isolated sandboxd configuration and local HTTP fixture -> passed: successful agent attempt sent HOME=/home/user, guest PATH, and LANG=C.UTF-8; host /root, TZ, and secret canary were absent; VM fixture was destroyed.
systemd-analyze verify --man=no /tmp/gmr-df6aede3/stagehand-pr25-review-l6029bnp/stagehand.service -> sandbox-blocked: Failed to setup working directory: Permission denied. Scratch unit differed only in its ExecStart executable path; no service was started.
CI-verified: go vet ./... -> success; run 42274388777 job 128086834279
CI-verified: go test -race -count=1 ./... -> success; run 42274388777 job 128086834279
Raw runtime output was retained in local Gitmoot state and is not posted here.
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
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.
Closes #24. Gap reported by jarvis (gitmoot msg 409366, gitmoot/gitmoot#2542).
deploy/stagehand.service:Environment=HOME=/root. The livestagehand serveenvironment (from /proc) is LANG, PATH and USER only, andbaseEnv(internal/cli/cli.go:257) passes HOME only when the runner has it.baseEnv(LANG is always C.UTF-8).Deploy: install the unit, daemon-reload, restart once no run is active, check
/proc/<pid>/environand that a stage sees HOME. Roll back: the previous unit is in backup/stagehand.service.pre-events (plus the trigger flag).