From 0cd8e7e659cd20503ffc36b087906ced6f104109 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 22 Nov 2026 12:05:37 +0000 Subject: [PATCH 1/4] intake: file the Heart-ack and RAL-ssh follow-ups from the 2026-11-22 orchestrator review Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_016nhQ8QZALxF5uDjEVDTqWX --- ...l_lane_granted_but_ssh_fails_unattended.md | 46 +++++++++++++++++ ...reason_acknowledged_by_hand_every_shift.md | 49 +++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 draft/bug/pyautobrain/ral_lane_granted_but_ssh_fails_unattended.md create mode 100644 draft/bug/pyautoheart/manifest_drift_reason_acknowledged_by_hand_every_shift.md diff --git a/draft/bug/pyautobrain/ral_lane_granted_but_ssh_fails_unattended.md b/draft/bug/pyautobrain/ral_lane_granted_but_ssh_fails_unattended.md new file mode 100644 index 000000000..ca96c8ecb --- /dev/null +++ b/draft/bug/pyautobrain/ral_lane_granted_but_ssh_fails_unattended.md @@ -0,0 +1,46 @@ +# A brief can grant the `ral` lane while unattended ssh to RAL does not work + +Type: bug +Target: PyAutoBrain +Repos: +- PyAutoBrain +Difficulty: small +Autonomy: supervised +Priority: medium +Status: draft +Consequence: glance +Witness: with a fake `ssh` that exits 255, `pyauto-brain batch brief --check` on a brief whose `lanes:` include `ral` prints one warning naming the host and the ssh error and still exits 0; with a fake `ssh` that exits 0, and on a brief without `ral`, it prints no such warning and runs no ssh. +Review-minutes: 5 +Unattended: ready +Lane: any + +## Finding + +Shift 2026-11-20-am ran with `lanes: any local-dev ral` and a `ral-allowance:`. Its worker on +`sed_chain_waveband_fit_can_spin_forever` could not do the task's "reproduce before fixing" step: + + ssh euclid_jump → Permission denied … Too many authentication failures + (unattended key auth through jump_finan) + +It parked on a question (euclid_strong_lens_modeling_pipeline#136) after spending a +session. Nothing at launch said the lane was unusable: the brief check validates the allowance's +numbers, not that a worker can reach the host without a prompt. + +## Ask + +reproduce before fixing: `ssh -o BatchMode=yes -o ConnectTimeout=10 euclid_jump true` from the laptop exits non-zero with "Too many authentication failures" (if it now exits 0 the ssh side is fixed; still do the check below). + +1. At `batch brief --check`, when the brief's `lanes:` include `ral`, probe the host once with + `ssh -o BatchMode=yes -o ConnectTimeout=10 true` and print one warning when it fails, + with ssh's own last line. A warning, never a refusal: the human may be about to fix it. It runs + in the launch chat, never in the watcher (PyAutoBrain `AUTONOMY.md` "The watcher's network + surface"), and only for a brief that grants `ral`. Take the host name from where the HPC + tooling already reads it; do not hard-code it in organ code (tenant firewall). +2. Out of scope for the PR, for the human on the laptop: "Too many authentication failures" + usually means the agent offers every loaded key before the right one. `IdentitiesOnly yes` + with a named `IdentityFile` on the jump host entries in `~/.ssh/config` is the usual fix. Say + so in the PR body; do not edit the human's ssh config. + +## Provenance + +[from: orchestrator review 2026-11-22 of shift 2026-11-20-am, proof packet of sed_chain_waveband_fit_can_spin_forever] diff --git a/draft/bug/pyautoheart/manifest_drift_reason_acknowledged_by_hand_every_shift.md b/draft/bug/pyautoheart/manifest_drift_reason_acknowledged_by_hand_every_shift.md new file mode 100644 index 000000000..a4673de18 --- /dev/null +++ b/draft/bug/pyautoheart/manifest_drift_reason_acknowledged_by_hand_every_shift.md @@ -0,0 +1,49 @@ +# The same manifest-drift reason is acknowledged by hand on every shift brief + +Type: bug +Target: PyAutoHeart +Repos: +- PyAutoHeart +- PyAutoMind +Difficulty: small +Autonomy: supervised +Priority: medium +Status: draft +Consequence: judge +Review-minutes: 10 +Unattended: never +Lane: local-dev + +## Finding + +Three shift briefs in a row carry the same `heart-ack:` line, each typed by the human at launch +(`batches/2026-11-19-pm.md`, `batches/2026-11-19-pm2.md`, `batches/2026-11-20-am.md`): + + manifest drift: end-at-deliverable blocks (generated) — 46 mismatch(es) vs PyAutoMind/repos.yaml + manifest drift: generated hooks (session-start + end-at-deliverable) — 2 mismatch(es) vs PyAutoMind/repos.yaml + +Both are local-checkout reasons under rule `manifest`, which the record itself calls "report only" +("the leg reads checkouts on disk, other sessions' worktrees included"). The counts have not moved +across the three shifts, so the acknowledgement no longer tells the human anything: it is the same +sentence accepted each time, and a new reason arriving beside it would be easy to wave through. + +## Ask + +reproduce before fixing: on the laptop, `python3 PyAutoMind/scripts/repos_sync.py --check` reports the two drift legs with 46 and 2 mismatches, and `pyauto-heart readiness` shows them as YELLOW local-checkout reasons. + +Two parts. The first is mechanical; the second needs the human's ruling and is why this is +`Unattended: never`. + +1. Find what the 46 + 2 mismatches are. If they are generated blocks that are stale in checkouts + or in other sessions' worktrees, regenerate them so the leg reads clean, and say in the PR + which checkouts were stale and why they went stale. +2. Ask the human whether a `report only` local-checkout reason should need a per-brief + acknowledgement at all. Options to put to them: (a) keep the ack as it is once part 1 has + cleared the drift; (b) a report-only reason is shown in the brief's Heart block but needs no + ack; (c) an ack of an identical reason list carries over to the next brief until the list + changes. Do not implement (b) or (c) without their answer: the YELLOW acknowledgement is bound + to the exact reason list at launch (PyAutoBrain `AUTONOMY.md`, autonomous-ship gate leg 4). + +## Provenance + +[from: orchestrator review 2026-11-22 of shifts 2026-11-19-pm, 2026-11-19-pm2 and 2026-11-20-am] From 44617b5d29238e02b67c713466b05959f1aec992 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 22 Nov 2026 13:14:34 +0000 Subject: [PATCH 2/4] intake: the deliverable-block drift has a cause; the RAL probe shipped The 46 "end-at-deliverable blocks" mismatches are stale copies on origin/main that no workflow delivers; the draft now says so and puts the choice to the human. The RAL ssh draft is removed: PyAutoBrain's brief --check does it. Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_016nhQ8QZALxF5uDjEVDTqWX --- ...l_lane_granted_but_ssh_fails_unattended.md | 46 --------------- ...reason_acknowledged_by_hand_every_shift.md | 49 ---------------- ...ble_block_never_reaches_the_other_repos.md | 57 +++++++++++++++++++ 3 files changed, 57 insertions(+), 95 deletions(-) delete mode 100644 draft/bug/pyautobrain/ral_lane_granted_but_ssh_fails_unattended.md delete mode 100644 draft/bug/pyautoheart/manifest_drift_reason_acknowledged_by_hand_every_shift.md create mode 100644 draft/bug/pyautomind/deliverable_block_never_reaches_the_other_repos.md diff --git a/draft/bug/pyautobrain/ral_lane_granted_but_ssh_fails_unattended.md b/draft/bug/pyautobrain/ral_lane_granted_but_ssh_fails_unattended.md deleted file mode 100644 index ca96c8ecb..000000000 --- a/draft/bug/pyautobrain/ral_lane_granted_but_ssh_fails_unattended.md +++ /dev/null @@ -1,46 +0,0 @@ -# A brief can grant the `ral` lane while unattended ssh to RAL does not work - -Type: bug -Target: PyAutoBrain -Repos: -- PyAutoBrain -Difficulty: small -Autonomy: supervised -Priority: medium -Status: draft -Consequence: glance -Witness: with a fake `ssh` that exits 255, `pyauto-brain batch brief --check` on a brief whose `lanes:` include `ral` prints one warning naming the host and the ssh error and still exits 0; with a fake `ssh` that exits 0, and on a brief without `ral`, it prints no such warning and runs no ssh. -Review-minutes: 5 -Unattended: ready -Lane: any - -## Finding - -Shift 2026-11-20-am ran with `lanes: any local-dev ral` and a `ral-allowance:`. Its worker on -`sed_chain_waveband_fit_can_spin_forever` could not do the task's "reproduce before fixing" step: - - ssh euclid_jump → Permission denied … Too many authentication failures - (unattended key auth through jump_finan) - -It parked on a question (euclid_strong_lens_modeling_pipeline#136) after spending a -session. Nothing at launch said the lane was unusable: the brief check validates the allowance's -numbers, not that a worker can reach the host without a prompt. - -## Ask - -reproduce before fixing: `ssh -o BatchMode=yes -o ConnectTimeout=10 euclid_jump true` from the laptop exits non-zero with "Too many authentication failures" (if it now exits 0 the ssh side is fixed; still do the check below). - -1. At `batch brief --check`, when the brief's `lanes:` include `ral`, probe the host once with - `ssh -o BatchMode=yes -o ConnectTimeout=10 true` and print one warning when it fails, - with ssh's own last line. A warning, never a refusal: the human may be about to fix it. It runs - in the launch chat, never in the watcher (PyAutoBrain `AUTONOMY.md` "The watcher's network - surface"), and only for a brief that grants `ral`. Take the host name from where the HPC - tooling already reads it; do not hard-code it in organ code (tenant firewall). -2. Out of scope for the PR, for the human on the laptop: "Too many authentication failures" - usually means the agent offers every loaded key before the right one. `IdentitiesOnly yes` - with a named `IdentityFile` on the jump host entries in `~/.ssh/config` is the usual fix. Say - so in the PR body; do not edit the human's ssh config. - -## Provenance - -[from: orchestrator review 2026-11-22 of shift 2026-11-20-am, proof packet of sed_chain_waveband_fit_can_spin_forever] diff --git a/draft/bug/pyautoheart/manifest_drift_reason_acknowledged_by_hand_every_shift.md b/draft/bug/pyautoheart/manifest_drift_reason_acknowledged_by_hand_every_shift.md deleted file mode 100644 index a4673de18..000000000 --- a/draft/bug/pyautoheart/manifest_drift_reason_acknowledged_by_hand_every_shift.md +++ /dev/null @@ -1,49 +0,0 @@ -# The same manifest-drift reason is acknowledged by hand on every shift brief - -Type: bug -Target: PyAutoHeart -Repos: -- PyAutoHeart -- PyAutoMind -Difficulty: small -Autonomy: supervised -Priority: medium -Status: draft -Consequence: judge -Review-minutes: 10 -Unattended: never -Lane: local-dev - -## Finding - -Three shift briefs in a row carry the same `heart-ack:` line, each typed by the human at launch -(`batches/2026-11-19-pm.md`, `batches/2026-11-19-pm2.md`, `batches/2026-11-20-am.md`): - - manifest drift: end-at-deliverable blocks (generated) — 46 mismatch(es) vs PyAutoMind/repos.yaml - manifest drift: generated hooks (session-start + end-at-deliverable) — 2 mismatch(es) vs PyAutoMind/repos.yaml - -Both are local-checkout reasons under rule `manifest`, which the record itself calls "report only" -("the leg reads checkouts on disk, other sessions' worktrees included"). The counts have not moved -across the three shifts, so the acknowledgement no longer tells the human anything: it is the same -sentence accepted each time, and a new reason arriving beside it would be easy to wave through. - -## Ask - -reproduce before fixing: on the laptop, `python3 PyAutoMind/scripts/repos_sync.py --check` reports the two drift legs with 46 and 2 mismatches, and `pyauto-heart readiness` shows them as YELLOW local-checkout reasons. - -Two parts. The first is mechanical; the second needs the human's ruling and is why this is -`Unattended: never`. - -1. Find what the 46 + 2 mismatches are. If they are generated blocks that are stale in checkouts - or in other sessions' worktrees, regenerate them so the leg reads clean, and say in the PR - which checkouts were stale and why they went stale. -2. Ask the human whether a `report only` local-checkout reason should need a per-brief - acknowledgement at all. Options to put to them: (a) keep the ack as it is once part 1 has - cleared the drift; (b) a report-only reason is shown in the brief's Heart block but needs no - ack; (c) an ack of an identical reason list carries over to the next brief until the list - changes. Do not implement (b) or (c) without their answer: the YELLOW acknowledgement is bound - to the exact reason list at launch (PyAutoBrain `AUTONOMY.md`, autonomous-ship gate leg 4). - -## Provenance - -[from: orchestrator review 2026-11-22 of shifts 2026-11-19-pm, 2026-11-19-pm2 and 2026-11-20-am] diff --git a/draft/bug/pyautomind/deliverable_block_never_reaches_the_other_repos.md b/draft/bug/pyautomind/deliverable_block_never_reaches_the_other_repos.md new file mode 100644 index 000000000..f2e87f6e7 --- /dev/null +++ b/draft/bug/pyautomind/deliverable_block_never_reaches_the_other_repos.md @@ -0,0 +1,57 @@ +# The end-at-deliverable block is stale in every repo but the organs, so Heart is YELLOW on every brief + +Type: bug +Target: PyAutoMind +Repos: +- PyAutoMind +Difficulty: small +Autonomy: human-required +Priority: medium +Status: draft +Consequence: judge +Review-minutes: 10 +Unattended: never +Lane: any + +## Finding + +Three shift briefs in a row carry the same `heart-ack:` line, typed by the human at launch +(`batches/2026-11-19-pm.md`, `batches/2026-11-19-pm2.md`, `batches/2026-11-20-am.md`): + + manifest drift: end-at-deliverable blocks (generated) — 46 mismatch(es) vs PyAutoMind/repos.yaml + manifest drift: generated hooks (session-start + end-at-deliverable) — 2 mismatch(es) vs PyAutoMind/repos.yaml + +The 46 are real and are on `origin/main`, not only on the laptop. `policy/end_at_deliverable.md` +gained the shift-cockpit exception (and `Monitor`), and the copies in the other repos' `AGENTS.md` +were never regenerated. A fresh clone of PyAutoMemory read stale on 2026-11-22 +(`repos_sync.py --check --only "end-at-deliverable blocks (generated)"`), and one `--write` fixed +it; PyAutoBrain, PyAutoHeart and PyAutoCortex were already current. + +Nothing delivers this block. `.github/workflows/session_hook_propagate.yml` pushes the hook +scripts and the where-to-file block to every repo, and its header says on purpose that "the +organism-map, history, remote-session and deliverable blocks stay out of this job and keep their +reviewed regeneration waves". No wave ran after the policy text changed, so every brief since has +launched YELLOW on a reason nobody can clear from an organ-only session. + +## Ask + +reproduce before fixing: with the full workspace checked out, `python3 PyAutoMind/scripts/repos_sync.py --check --only "end-at-deliverable blocks (generated)"` lists the stale repos (46 on 2026-11-20). + +The human decides which of these it is; do not pick for them. + +1. **The block rides the bot push** (as the where-to-file block does since PyAutoMind#442): add + `policy/end_at_deliverable.md` to the workflow's `paths:`, call the same function `--write` + uses for the deliverable block on the cloned tree, stage `AGENTS.md` as now, and rewrite the + header paragraph that keeps the block out. One dispatch then clears all 46, and a later edit + to the policy text can never strand them again. +2. **One hand wave now**, from the laptop: `repos_sync.py --write`, then a commit per repo. The + block stays out of the workflow, and the next edit to the policy text needs another wave. + +The 2 `generated hooks` mismatches are a different leg and were not found from an organ-only +session (5 of 50 repos checked out, all current). Read them on the laptop with +`repos_sync.py --check --only "generated hooks (session-start + end-at-deliverable)"`; the leg +reads other sessions' worktrees too, so a stale worktree is the likely cause. + +## Provenance + +[from: orchestrator review 2026-11-22 of shifts 2026-11-19-pm, 2026-11-19-pm2 and 2026-11-20-am] From 77d0619fd74996b00e988ad5539f363e5330b853 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 22 Nov 2026 13:44:35 +0000 Subject: [PATCH 3/4] ci: the end-at-deliverable block rides the hook propagation workflow policy/end_at_deliverable.md changed and nothing delivered it: the workflow left the block to a hand regeneration wave that never ran, so 46 stale AGENTS.md copies kept Heart YELLOW on three shift briefs in a row. The block now propagates as the where-to-file block does (human-approved 2026-11-22, bot push), through the new repos_sync.write_deliverable_blocks, which --write calls too. The workflow triggers on the policy file. The draft is replaced by the one residual: 2 generated-hook mismatches that only the laptop can read. Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_016nhQ8QZALxF5uDjEVDTqWX --- .github/workflows/firewall_gate.yml | 6 +- .github/workflows/session_hook_propagate.yml | 27 ++++++--- ...ble_block_never_reaches_the_other_repos.md | 57 ------------------- ...ated_hooks_two_mismatches_on_the_laptop.md | 42 ++++++++++++++ scripts/repos_sync.py | 26 ++++++--- tests/test_repos_sync_deliverable_block.py | 43 ++++++++++++++ 6 files changed, 125 insertions(+), 76 deletions(-) delete mode 100644 draft/bug/pyautomind/deliverable_block_never_reaches_the_other_repos.md create mode 100644 draft/bug/pyautomind/generated_hooks_two_mismatches_on_the_laptop.md diff --git a/.github/workflows/firewall_gate.yml b/.github/workflows/firewall_gate.yml index f89fa5cf4..27878bafc 100644 --- a/.github/workflows/firewall_gate.yml +++ b/.github/workflows/firewall_gate.yml @@ -364,11 +364,11 @@ jobs: echo "WHY: this PR changes policy/end_at_deliverable.md. Every repo's" echo " AGENTS.md carries the block; the sibling repos are checked out" echo " at their mains, so their copies are stale BY CONSTRUCTION until" - echo " the per-repo regeneration wave (repos_sync.py --write) lands" - echo " after this PR merges, and it cannot have run yet." + echo " .github/workflows/session_hook_propagate.yml runs after this PR" + echo " merges, and it cannot have run yet." echo "STILL ENFORCED: PyAutoMind's own end-at-deliverable block must be" echo " the canonical text (asserted in the step above). The copies are" - echo " the wave's job." + echo " the propagation workflow's job." echo "ON push TO main this leg is never skipped." echo "==============================================================" skip+=(--skip "end-at-deliverable blocks (generated)") diff --git a/.github/workflows/session_hook_propagate.yml b/.github/workflows/session_hook_propagate.yml index bb8cdb4b2..4fd50f6b1 100644 --- a/.github/workflows/session_hook_propagate.yml +++ b/.github/workflows/session_hook_propagate.yml @@ -28,14 +28,20 @@ name: Propagate the canonical hooks # already verified against Codex's PreToolUse payload. The same propagation # run writes `.codex/hooks.json` for those repos and nowhere else. # -# ONE AGENTS.md BLOCK RIDES ALONG: the where-to-file block -# (`policy/where_to_file.md`, PyAutoMind#442). Same justification — the commit is -# a byte copy of text already reviewed on the Mind PR that changed it, and ~48 +# TWO AGENTS.md BLOCKS RIDE ALONG: the where-to-file block +# (`policy/where_to_file.md`, PyAutoMind#442) and the end-at-deliverable block +# (`policy/end_at_deliverable.md`). Same justification — the commit is a byte +# copy of text already reviewed on the Mind PR that changed it, and ~48 # AGENTS.md copies are a PR wave nobody would read (human-approved: bot push). -# The job writes ONLY that block, through `repos_sync.write_filing_blocks` -# (insert the markers under the deliverable block, fill them, touch nothing -# else); the organism-map, history, remote-session and deliverable blocks stay -# out of this job and keep their reviewed regeneration waves. +# The job writes ONLY those blocks, through `repos_sync.write_deliverable_blocks` +# and `repos_sync.write_filing_blocks` (insert the markers, fill them, touch +# nothing else); the organism-map, history and remote-session blocks stay out +# of this job and keep their reviewed regeneration waves. +# +# The deliverable block joined on 2026-11-22 (human-approved: bot push). Left to +# a wave, it was stranded: its policy text changed, no wave ran, and 46 stale +# copies kept Heart YELLOW on three shift briefs in a row, each acknowledged by +# hand, from sessions that could reach only the organs. # # ONE DELETION RIDES ALONG, ON A HUMAN DISPATCH ONLY: the retired CLAUDE.md -> # AGENTS.md pointer (PyAutoMind#482). Claude Code loads AGENTS.md natively now, @@ -73,6 +79,7 @@ on: - "policy/session_start_hook.sh" - "policy/end_at_deliverable_hook.sh" - "policy/where_to_file.md" + - "policy/end_at_deliverable.md" - "repos.yaml" - "scripts/repos_sync.py" - ".github/workflows/session_hook_propagate.yml" @@ -210,7 +217,11 @@ jobs: repos_sync.load_deliverable_hook(mind_root), ) repos_sync.write_codex_hooks(Path("tree"), repos) - # The one AGENTS.md block this job propagates (see the header). + # The two AGENTS.md blocks this job propagates (see the header). The + # deliverable block first: the filing markers go in under it. + repos_sync.write_deliverable_blocks( + Path("tree"), repos, repos_sync.load_deliverable_policy(mind_root), + ) repos_sync.write_filing_blocks( Path("tree"), repos, repos_sync.load_filing_policy(mind_root), ) diff --git a/draft/bug/pyautomind/deliverable_block_never_reaches_the_other_repos.md b/draft/bug/pyautomind/deliverable_block_never_reaches_the_other_repos.md deleted file mode 100644 index f2e87f6e7..000000000 --- a/draft/bug/pyautomind/deliverable_block_never_reaches_the_other_repos.md +++ /dev/null @@ -1,57 +0,0 @@ -# The end-at-deliverable block is stale in every repo but the organs, so Heart is YELLOW on every brief - -Type: bug -Target: PyAutoMind -Repos: -- PyAutoMind -Difficulty: small -Autonomy: human-required -Priority: medium -Status: draft -Consequence: judge -Review-minutes: 10 -Unattended: never -Lane: any - -## Finding - -Three shift briefs in a row carry the same `heart-ack:` line, typed by the human at launch -(`batches/2026-11-19-pm.md`, `batches/2026-11-19-pm2.md`, `batches/2026-11-20-am.md`): - - manifest drift: end-at-deliverable blocks (generated) — 46 mismatch(es) vs PyAutoMind/repos.yaml - manifest drift: generated hooks (session-start + end-at-deliverable) — 2 mismatch(es) vs PyAutoMind/repos.yaml - -The 46 are real and are on `origin/main`, not only on the laptop. `policy/end_at_deliverable.md` -gained the shift-cockpit exception (and `Monitor`), and the copies in the other repos' `AGENTS.md` -were never regenerated. A fresh clone of PyAutoMemory read stale on 2026-11-22 -(`repos_sync.py --check --only "end-at-deliverable blocks (generated)"`), and one `--write` fixed -it; PyAutoBrain, PyAutoHeart and PyAutoCortex were already current. - -Nothing delivers this block. `.github/workflows/session_hook_propagate.yml` pushes the hook -scripts and the where-to-file block to every repo, and its header says on purpose that "the -organism-map, history, remote-session and deliverable blocks stay out of this job and keep their -reviewed regeneration waves". No wave ran after the policy text changed, so every brief since has -launched YELLOW on a reason nobody can clear from an organ-only session. - -## Ask - -reproduce before fixing: with the full workspace checked out, `python3 PyAutoMind/scripts/repos_sync.py --check --only "end-at-deliverable blocks (generated)"` lists the stale repos (46 on 2026-11-20). - -The human decides which of these it is; do not pick for them. - -1. **The block rides the bot push** (as the where-to-file block does since PyAutoMind#442): add - `policy/end_at_deliverable.md` to the workflow's `paths:`, call the same function `--write` - uses for the deliverable block on the cloned tree, stage `AGENTS.md` as now, and rewrite the - header paragraph that keeps the block out. One dispatch then clears all 46, and a later edit - to the policy text can never strand them again. -2. **One hand wave now**, from the laptop: `repos_sync.py --write`, then a commit per repo. The - block stays out of the workflow, and the next edit to the policy text needs another wave. - -The 2 `generated hooks` mismatches are a different leg and were not found from an organ-only -session (5 of 50 repos checked out, all current). Read them on the laptop with -`repos_sync.py --check --only "generated hooks (session-start + end-at-deliverable)"`; the leg -reads other sessions' worktrees too, so a stale worktree is the likely cause. - -## Provenance - -[from: orchestrator review 2026-11-22 of shifts 2026-11-19-pm, 2026-11-19-pm2 and 2026-11-20-am] diff --git a/draft/bug/pyautomind/generated_hooks_two_mismatches_on_the_laptop.md b/draft/bug/pyautomind/generated_hooks_two_mismatches_on_the_laptop.md new file mode 100644 index 000000000..75f2f8b02 --- /dev/null +++ b/draft/bug/pyautomind/generated_hooks_two_mismatches_on_the_laptop.md @@ -0,0 +1,42 @@ +# Heart reports 2 generated-hook mismatches on the laptop that no organ-only session can see + +Type: bug +Target: PyAutoMind +Repos: +- PyAutoMind +Difficulty: small +Autonomy: supervised +Priority: low +Status: draft +Consequence: judge +Review-minutes: 5 +Unattended: never +Lane: local-dev + +## Finding + +Shift briefs 2026-11-19-pm, 2026-11-19-pm2 and 2026-11-20-am were each acknowledged YELLOW on two +reasons. The first, 46 stale end-at-deliverable blocks, is fixed at its cause: the block now rides +`session_hook_propagate.yml` (2026-11-22). The second is still open: + + manifest drift: generated hooks (session-start + end-at-deliverable) — 2 mismatch(es) vs PyAutoMind/repos.yaml + +A cloud session with the five organs checked out reads that leg OK (5 of 50 repos), and the +propagation workflow already pushes the hooks to every repo, so the two are most likely on the +laptop only: a checkout behind its origin, or another session's worktree (the leg reads those +too). + +## Ask + +reproduce before fixing: on the laptop, `python3 PyAutoMind/scripts/repos_sync.py --check --only "generated hooks (session-start + end-at-deliverable)"` names the two. + +1. Name the two and say which case each is. +2. A checkout behind origin: pull it. A stale worktree of a finished task: remove it through the + usual close-out. Anything else (a repo the workflow cannot push to, a hook edited by hand) is + a finding for the human, not a fix to guess at. +3. First check that the first propagation run after 2026-11-22 cleared the 46 deliverable + blocks: the same command with `--only "end-at-deliverable blocks (generated)"` reads OK. + +## Provenance + +[from: orchestrator review 2026-11-22 of shifts 2026-11-19-pm, 2026-11-19-pm2 and 2026-11-20-am] diff --git a/scripts/repos_sync.py b/scripts/repos_sync.py index 38611e62f..cd5f60c14 100644 --- a/scripts/repos_sync.py +++ b/scripts/repos_sync.py @@ -1189,6 +1189,23 @@ def insert_deliverable_markers(root, repos): print(f"inserted deliverable markers: {agents}") +def write_deliverable_blocks(root, repos, policy): + """Insert the deliverable markers and fill the block in every checked-out + repo — and write nothing else. The narrow entry point the propagation + workflow calls (human-approved 2026-11-22: the block rides the bot push). + Until then nothing delivered it: the policy text changed, no regeneration + wave ran, and 46 stale copies kept every shift brief YELLOW.""" + insert_deliverable_markers(root, repos) + for name in repos: + write_block( + repo_checkout(root, name) / "AGENTS.md", + policy, + DELIVERABLE_BEGIN, + DELIVERABLE_END, + required=False, + ) + + def filing_block_excluded(repo_spec): """A manifest entry carrying `filing_block: false` is out of scope for the where-to-file block: neither written nor reported. A recorded exclusion, @@ -3132,18 +3149,11 @@ def main(): # here, so the block lands without thirty hand-edits. (The rule it # carries was broken twice by sessions reasoning past prose; waiting for # each repo to opt in is how the long tail stays unprotected.) - insert_deliverable_markers(root, repos) for name in repos: agents = repo_checkout(root, name) / "AGENTS.md" HISTORY_BLOCK.write(agents, hpol) REMOTE_BLOCK.write(agents, remote) - write_block( - agents, - deliverable, - DELIVERABLE_BEGIN, - DELIVERABLE_END, - required=False, - ) + write_deliverable_blocks(root, repos, deliverable) # The where-to-file block self-installs the same way, one step further # down: under the deliverable block that the loop above just filled. write_filing_blocks(root, repos, filing) diff --git a/tests/test_repos_sync_deliverable_block.py b/tests/test_repos_sync_deliverable_block.py index 3e4c9dece..adf5e24cf 100644 --- a/tests/test_repos_sync_deliverable_block.py +++ b/tests/test_repos_sync_deliverable_block.py @@ -195,3 +195,46 @@ def test_the_canonical_hook_ships_beside_the_prose(): hook = MIND / repos_sync.DELIVERABLE_HOOK_FILE assert hook.exists() assert os.access(hook, os.X_OK) + + +# -------------------------------------------------------------------------- +# The rollout: the propagation workflow carries this block (2026-11-22) +# -------------------------------------------------------------------------- +# Left to a hand regeneration wave, the block was stranded: its policy text +# changed, no wave ran, and 46 stale copies kept every shift brief YELLOW. + +def _workflow(): + return (MIND / ".github/workflows/session_hook_propagate.yml").read_text() + + +def test_write_deliverable_blocks_fills_a_stale_copy_and_touches_nothing_else(tmp_path): + stale = (f"# LibAlpha\n\nkeep me\n\n{_history_block()}\n\n" + f"{repos_sync.DELIVERABLE_BEGIN}\nan old rule\n{repos_sync.DELIVERABLE_END}\n\ntail\n") + _repo(tmp_path, "LibAlpha", stale) + _repo(tmp_path, "OrganCore", f"# OrganCore\n\n{_history_block()}\n") # no markers yet + assert len(repos_sync.check_deliverable_blocks(tmp_path, REPOS, CANON)) == 2 + repos_sync.write_deliverable_blocks(tmp_path, REPOS, CANON) + assert repos_sync.check_deliverable_blocks(tmp_path, REPOS, CANON) == [] + text = (tmp_path / "LibAlpha" / "AGENTS.md").read_text() + assert "an old rule" not in text and "keep me" in text and text.endswith("tail\n") + assert _history_block() in text + before = {n: (tmp_path / n / "AGENTS.md").read_text() for n in REPOS} + repos_sync.write_deliverable_blocks(tmp_path, REPOS, CANON) # idempotent + assert before == {n: (tmp_path / n / "AGENTS.md").read_text() for n in REPOS} + + +def test_the_propagation_workflow_triggers_on_the_deliverable_policy(): + import yaml + triggers = yaml.safe_load(_workflow())[True] + assert repos_sync.DELIVERABLE_POLICY_FILE in triggers["push"]["paths"] + + +def test_the_propagation_workflow_writes_the_block_before_the_filing_block(): + """The filing markers are inserted under the deliverable block, so the + deliverable block is written first; `AGENTS.md` is staged in both loops.""" + text = _workflow() + assert "load_deliverable_policy(mind_root)" in text + assert text.index("repos_sync.write_deliverable_blocks(") \ + < text.index("repos_sync.write_filing_blocks(") + staged = [line for line in text.splitlines() if line.strip().startswith("for rel in ")] + assert len(staged) == 2 and all("AGENTS.md" in line for line in staged) From d187ac106cacba05029bfef9cbc88f7be358c899 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 22 Nov 2026 13:45:43 +0000 Subject: [PATCH 4/4] dashboard: re-render for the new draft Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_016nhQ8QZALxF5uDjEVDTqWX --- dashboard.html | 23 ++++++++++++----------- dashboard.md | 32 ++++++++++++++++++++------------ state.json | 2 +- 3 files changed, 33 insertions(+), 24 deletions(-) diff --git a/dashboard.html b/dashboard.html index 3c11b0d1a..13b8ff83e 100644 --- a/dashboard.html +++ b/dashboard.html @@ -6,7 +6,7 @@ PyAutoMind Dashboard - +