From 2c4b24f43560927fd3f016325716ca8de2b3a9a0 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Sat, 31 Oct 2026 11:29:47 +0000 Subject: [PATCH 1/3] cortex pull reads campaign digests; scheduler allowlist + action guard (hpc-campaign p5c) - cortex pull: a row with campaign_file runs ` status ` in place of `jobs` (squeue), and a row with digest prints what Cortex `sync-runs --dry-run` would change from the pulled digest. Still writes nothing; recording is `cortex.py sync-runs ` (decision 64). - AUTONOMY.md "Scheduler actions": `hpc/sync act` is the only way a campaign's jobs start or change (submit, resubmit, hold, release, throttle, update-pending, cancel); submit/push-submit sbatch one hand-written script; read verbs free; actions.log audit contract. - bin/scheduler_action_guard.py: PreToolUse(Bash) hook source for Claude and Codex refusing raw sbatch, scancel, mutating scontrol and `autofit.campaign submit` (direct, over ssh, bash -c/eval, wrappers, chains, substitutions, heredocs fed to a shell). `scontrol show` stays allowed. Source and tests only; not registered. Interfaces: autolens_assistant 271f939 (hpc/sync act), PyAutoCortex#83 (sync-runs). Refs PyAutoLabs/PyAutoBrain#547 Co-Authored-By: Claude Opus 5.5 --- AUTONOMY.md | 48 +++++ agents/conductors/cortex/AGENTS.md | 22 +- agents/conductors/cortex/_cortex.py | 118 +++++++++-- bin/scheduler_action_guard.py | 287 +++++++++++++++++++++++++++ skills/cortex/cortex.md | 23 ++- tests/test_cortex_conductor.py | 60 ++++++ tests/test_scheduler_action_guard.py | 181 +++++++++++++++++ 7 files changed, 723 insertions(+), 16 deletions(-) create mode 100644 bin/scheduler_action_guard.py create mode 100644 tests/test_scheduler_action_guard.py diff --git a/AUTONOMY.md b/AUTONOMY.md index 1003e018..c4db2190 100644 --- a/AUTONOMY.md +++ b/AUTONOMY.md @@ -678,6 +678,54 @@ went out on an acked YELLOW. That is ack-fatigue risk, addressed by making Heart's verdict distinguish stale evidence from bad evidence (the freshness tier), never by weakening leg 4. +## Scheduler actions — 2026-10-31 + +A cluster queue is shared, and one CPU array on the wrong partition has idled +all eight RAL A100s (2026-09-30). So the queue changes in one place, the +project's own `hpc/sync`, and every change leaves a record (hpc-campaign phase +5, ruling F12). **`hpc/sync act` is the only way a campaign's jobs start or +change.** + +| Verb | Effect | Who may run it | +|------|--------|----------------| +| `hpc/sync act submit [--stage S] [--indices SPEC] [--dry-run]` | starts a campaign's jobs — a pilot is `--indices` with the pilot's slice — logged | an agent, only when the human asked for that run (a pilot, then the full campaign, each on its own go) | +| `hpc/sync act ` | changes a campaign's queued or running jobs, logged | an agent, only on the human's ask; never another campaign's jobs without their OK | +| `hpc/sync cancel ` | the older spelling of `act cancel`, logged the same way | as `act` | +| `hpc/sync submit \| push-submit [gpu\|cpu]