mattrguerra/better-memory-pipelinemainPrivate on GitHub, published here in full

run-nightly.sh

Language Shell886 B20 lines

scheduling/run-nightly.sh

  1. #!/bin/bash
  2. # Nightly better-memory run: the path gate, then the optional content gate.
  3. # set -e matters: if gate.py fails (including its self-check refusing to run
  4. # because a wall is not blocking), the content gate never runs on a half-built
  5. # staging directory, and the log shows why.
  6. set -euo pipefail
  7. HERE="$(cd "$(dirname "$0")" && pwd)"
  8. # Colon-separated LIVE vault roots (never a mirror or a swept copy).
  9. export VAULT_ROOTS="${VAULT_ROOTS:-$HOME/Documents/vaults/workbench:$HOME/Documents/vaults/identity}"
  10. # The staging ROOT: gate.py writes staging/ and .manifest.json under it.
  11. export STAGING_DIR="${STAGING_DIR:-$HOME/cowork-staging}"
  12. /usr/bin/python3 "$HERE/gate.py"
  13. # Optional second wall. Delete these lines to run the path gate alone.
  14. export BM_STAGING_DIR="$STAGING_DIR/staging"
  15. export BM_GATE_MODE="${BM_GATE_MODE:-remove}"
  16. /usr/bin/python3 "$HERE/content_gate.py"