fix(issue-57): the audit log follows the registry; the disk fallback reads the audit status #58

Merged
Godopu merged 16 commits from fix/issue-57 into main 2026-10-15 13:52:10 +00:00
2 changed files with 7 additions and 5 deletions
Showing only changes of commit 642a53b716 - Show all commits

No files matched your search

@@ -134,10 +134,11 @@ Which tree wins, by execution context:
`python -m`: for `-m` the current directory precedes `PYTHONPATH`, so a frozen
loop whose working directory happened to contain a `lib_py` package would have
silently executed live code. The working directory is left untouched; the
registry and audit-log paths resolve to `MAM_JOBS_DIR` / `DELEGATE_JOB_LOGS_DIR`
when set, otherwise to `$WORKSPACE_ROOT/.mam/jobs` and
`$WORKSPACE_ROOT/.mam/delegate_job_logs` (the workspace `lib.sh` exports), and
only without either to the cwd-relative `.mam/...` (Issue #15 — this is what
registry path resolves to `MAM_JOBS_DIR` when set, otherwise to
`$WORKSPACE_ROOT/.mam/jobs` (the workspace `lib.sh` exports), and only without
either to the cwd-relative `.mam/jobs`; the audit log is the
`delegate_job_logs` next to the registry in use unless `DELEGATE_JOB_LOGS_DIR`
names another root (Issue #57, Issue #15 — this is what
stops a caller whose cwd is not the workspace, such as the pytest suite, from
registering jobs into a foreign registry).
@@ -150,7 +150,8 @@ that session.
Separate from the registry, every job is also mirrored to a durable append-only
audit log at `.mam/delegate_job_logs/<job_id>/` (override with
`DELEGATE_JOB_LOGS_DIR`, default `<cwd>/.mam/delegate_job_logs`). The registry
`DELEGATE_JOB_LOGS_DIR`, an audit-log root that is **not** next to the
registry; default: the `delegate_job_logs` next to the registry in use). The registry
is **live state** mutated in place; the audit log is **history** that survives
even after the registry dir is cleaned up. It is git-ignored.