Description
Overview
Phase 5c: the Cortex conductor reads the digest; AUTONOMY.md scheduler allowlist; a PreToolUse hook (Claude + Codex) blocking raw sbatch/scancel/scontrol over ssh outside hpc/sync act/submit. Branch feature/hpc-campaign-p5c-brain. Tier judge; merges after 5a and 5b.
Heart RED at the door (2026-10-30): release validation FAILED (stage integrate); PyAutoHeart/workflows/Release Integrate failure; PyAutoNerves test_fitsable.py::test__output_to_fits red; Unit-test timing 1 regression (>3× baseline), 14 slow; autogalaxy red; Release validation NOT release_ready (v2026.10.30.1.dev85101); autolens_profiling red; Worktree drift 1 dirty. Human override for Heart RED (development only) authorized live by the human for hpc-campaign phase 5 ("Override + approve"). Merge needs green CI and a separate /prm; no release.
Original Prompt
Click to expand
Issued: 2026-10-30
Epic: hpc-campaign
Phase: 5c
Blocked-by: phases 2–4 (COMPLETE 2026-10-30); ruling F3 (yes)
Consequence: judge
Autonomy: human-required
Merge-order: after 5a v2 and 5b (uses their verb/CLI names)
HPC campaign phase 5c — Brain cortex conductor digest + scheduler governance hook
Original request (human, 2026-10-30): "spread across grid bases, prm on those and then we do next phase 5"; plan
approved with "Override + approve" (5a assistant, 5b Cortex, 5c Brain in parallel; 5d pipeline adoption deferred
until DR1 v1.0 ships).
Lane prompt: Workspace/Science/scratch/pyautolens_ii_campaign_results_scoping_2026-10-28/PROMPT_hpc_campaign.md §Phase 5.
@PyAutoBrain: Cortex conductor pull reads the digest (hpc/sync status) instead of raw squeue; scheduler action allowlist in AUTONOMY.md and skills/cortex/cortex.md; PreToolUse hook for Claude and Codex (F12) blocking raw sbatch|scancel|scontrol over ssh outside hpc/sync act/submit; audit-log contract; hook tests.
Activity
Jammy2211 commentedon Oct 30, 2026
Status 2026-10-30 (session wrap-up)
The background lane stalled before producing anything (worktree ~/Code/PyAutoLabs-wt/hpc-campaign-p5c-brain clean, no commits). NEXT: restart the lane. Interfaces are now concrete: assistant#172 v2 (
hpc/sync act <hold|release|throttle|update-pending|resubmit|cancel>,submit|push-submitthe only mutating paths; actions.log JSON lines {utc,user,campaign,action,args,exit} at<project_root>/campaign/<name>/actions.log) and PyAutoCortex#82 (cortex sync-runs <project> --digest <path> [--dry-run], first linesync-runs: <project>: <n> changed; decision 64).Jammy2211 commentedon Oct 31, 2026
Status 2026-10-31: lane restarted and built (local, not pushed)
Commit
2c4b24fonfeature/hpc-campaign-p5c-brain, built against autolens_assistant 271f939 (the post-review 5a interface) and PyAutoCortex#83:cortex pullreads the digest instead of squeue. For a row withcampaign_file:, it runs<sync_cli> status <campaign_file>in place ofjobs. For a row withdigest:, it prints whatsync-runs <key> --dry-runwould change. Pull still writes nothing. You record the result withcortex.py sync-runs <key>(decision 64).skills/cortex/cortex.mdand the conductor AGENTS.md):hpc/sync act <submit|resubmit|hold|release|throttle|update-pending|cancel>is the only way a campaign's jobs start or change.submit/push-submitsbatch one hand-written script, outside any campaign. Read verbs, includingpilot, are free. The section also states the actions.log contract (writability checked before acting, then one JSON line{utc,user,campaign,action,args,exit}).bin/scheduler_action_guard.pyis a PreToolUse(Bash) hook for Claude and Codex, written to the same contract asmind_commit_guard.py. It refuses rawsbatch,scancel, any mutatingscontrol, andpython -m autofit.campaign submit(unless--dry-run). That covers commands typed directly, over ssh, inbash -c/eval, behind env or wrapper prefixes, in chains or substitutions, and in heredocs fed to a shell.scontrol showstays allowed, because recording a run as GPU needsgres/gpufrom it. A word that is only mentioned (a commit message, a grep) is not a call. It fails open on unparseable shell. The exception isPYAUTO_SKIP_SCHEDULER_GUARD=1.Tests: 77 guard tests and 3 new pull/digest tests. Full suite: 1370 passed, 16 failed. All 16 also fail on a clean main (
test_hygiene_conductorextras ×6,test_skill_install×10).Not yet done: the independent (different-model) review has not run. Run it before opening the PR.
Follow-ups:
.claude/settings.jsonor.codex/hooks.json. That belongs toPyAutoMind/scripts/repos_sync.py, and it should land only after the human approves.pull_campaignrsyncs only*.md/*.json/failed_*.txt/actions.log, which dropstasks.jsonl. Cortexsync-runsneeds that file besidedigest.json, so a laptop-pulled digest is unreadable. Pull reports "the digest could not be read" and carries on. The fix is in 5a: add--include='tasks.jsonl'.srun/sallocalso start jobs but are outside the F12 scope, so they are not blocked.Merge order: after 5a.
Jammy2211 commentedon Oct 31, 2026
Status 2026-10-31
PR #548 is open (
2c4b24f+ review fixes6b6c11f)..claude/settings.json+ Mindrepos_syncCodex list); the escape hatch stays;srun/sallocare blocked; pull stays write-nothing.Jammy2211 commentedon Oct 31, 2026
Shipped
Merged in PyAutoBrain#548 (
2c4b24f+6b6c11f+271ebc1).pullreads the digest (hpc/sync status) and previewssync-runs --dry-run; it writes nothing.bin/scheduler_action_guard.pyblocks raw sbatch, scancel, srun, salloc, mutating scontrol and raw autofit.campaign submit. The escape hatch works only as the clause prefix..claude/settings.json(local); a rawscancelwas denied in-session.session_hook_propagateregenerates Brain's.codex/hooks.json.271ebc1.