fix(control-plane): derive the audit-log root from the registry in the binding and the shell defaults
from_env() fills delegate_job_logs_dir with the delegate_job_logs next to the resolved mam_jobs_dir unless DELEGATE_JOB_LOGS_DIR is set, so a session created with only MAM_JOBS_DIR moved no longer records the workspace's old log root. worktree_prepare.sh passes DELEGATE_JOB_LOGS_DIR on only when the caller set it. lib.sh and the delegate-job wrapper no longer carry a bash copy of the default: delegate_publish_cmd, delegate_started_recorded and _logs_dir_abs resolve it with get_logs_dir(<registry>), the wrapper fails closed when it cannot, exports the resolved root to its children, prints it as submit's last line, and logs takes --registry-dir. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
b8bed8124e
commit
b7a857d12f
4 files changed
+63
-50
No files matched your search
@@ -234,8 +234,10 @@ if [ -n "$CREATOR_AGENT" ]; then
|
||||
env_add=(WORKSPACE_ROOT="$MAIN"
|
||||
AGENT_SESSIONS_YAML="${AGENT_SESSIONS_YAML:-$MAIN/.mam/agent-sessions.yaml}"
|
||||
MAM_JOBS_DIR="${MAM_JOBS_DIR:-$MAIN/.mam/jobs}"
|
||||
DELEGATE_JOB_LOGS_DIR="${DELEGATE_JOB_LOGS_DIR:-$MAIN/.mam/delegate_job_logs}"
|
||||
MAM_NO_SUBSCRIBER_DAEMON=1)
|
||||
# Issue #57: an explicit audit-log root is passed on; otherwise create's
|
||||
# binding derives it from MAM_JOBS_DIR (the delegate_job_logs next to it).
|
||||
if [ -n "${DELEGATE_JOB_LOGS_DIR:-}" ]; then env_add+=(DELEGATE_JOB_LOGS_DIR="$DELEGATE_JOB_LOGS_DIR"); fi
|
||||
if [ -z "${MAM_ENV_FILE:-}" ] && [ -f "$MAIN/.mam.env" ]; then env_add+=(MAM_ENV_FILE="$MAIN/.mam.env"); fi
|
||||
rc=0
|
||||
env "${env_add[@]}" bash "$SKILL_DIR/multi-agent-mux-create/scripts/create_session.sh" "${args[@]}" || rc=$?
|
||||
|
||||
Reference in new issue
Block a user