fix(tools): default AGENT_WORK_ROOT to $HOME/mosaic/agent-work
pr-merge.sh and its regression test hardcoded /home/hermes/agent-work as
the AGENT_WORK_ROOT fallback, baking in one operator's home dir. Any other
user (e.g. jarvis) hit 'mkdir: cannot create directory /home/hermes:
Permission denied' on merge, and --skip-queue-guard did not avoid it (the
mkdir is in the API/tea-error path, not the guard).
Default to ${HOME:-/tmp}/mosaic/agent-work instead: per-user isolated,
kept separate from the framework's ~/.config/mosaic config tree, with a
/tmp last-ditch fallback for unset-HOME contexts (systemd/CI). An explicit
AGENT_WORK_ROOT still overrides. 5 occurrences across 2 files.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
WORK_ROOT="${AGENT_WORK_ROOT:-/home/hermes/agent-work}"
|
||||
WORK_ROOT="${AGENT_WORK_ROOT:-${HOME:-/tmp}/mosaic/agent-work}"
|
||||
SANDBOX="$WORK_ROOT/pr-merge-empty-uid-test-$$"
|
||||
MOCK_BIN="$SANDBOX/bin"
|
||||
REPO_DIR="$SANDBOX/repo"
|
||||
|
||||
Reference in New Issue
Block a user