Repository navigation
fix: M3.1 live-shift findings + backlog-reach ruling (#637) - #638
Merged
Merged
Conversation
…sks, repo claims, backlog reach (#637) Eleven fixes from the 2026-11-14 pm2/pm3 shifts, one offline test each (tests/test_m31_live_shift_findings.py, all failing on 421ef0f): 1. A re-dispatch goes first and may pass max-sessions by one. 2. Killed and never re-dispatched reads "Crashed — not re-dispatched" with the last refusal, never "Not started"; a gated task names its gate. 3. A task an earlier shift parked on a question is not startable until a later shift finishes it or a brief names it (local counters, no network). 4. A task whose declared repo a claim in active.md on Mind origin/main holds is skipped, unless the claim records coordination/conflict-override. 5. The calibration gate also reads the previous record on Mind's local origin/main ref (no fetch): a check-in pushed from a linked worktree counts on the next tick even if the canonical tree is not fast-forwarded. 6. backlog: scoped dips beyond queue.md take only small single-repo tasks; one dated AUTONOMY.md sentence records the 2026-11-16 ruling. 7. A shift never dips a Brain, Mind or Hands target (by rule). 8. The token reservation is max(even share, mean spend of finished workers in this and the last three shifts), so the cap can bind first. 9. The writer refuses an active.md row with a non-schema PR key (bare pr:); the worker template states the keys. 10. worktree_remove's stale-claim guard counts a release queued in the shift ledger; the close-out removes the worktree and branch or says why in a `cleanup` field the digest shows. 11. An in-turn merge queues its queue.md retirement. Test fixtures that dipped a PyAutoBrain target now use PyAutoHeart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on bad reads (#637) 1. The reservation estimate is the median spend of finished workers in shifts whose token-budget is within 2x of this one (recorded as `token_budget` in counters.json, else read from the brief record), and it is clamped to budget//2, never below the even share: one past 450k worker in a 400k shift no longer refuses the first spawn. 2. A counters.json with the wrong shape (e.g. {"outcomes": {"t": null}}) reads as no hold and no measure, with a note on stderr, never a planner crash. 3. An active.md on Mind origin/main that cannot be read fails closed, as an unreadable draft/ tree does; a ref with no active.md still claims nothing. Tests: an outlier/median case, a malformed-counters case and a lost-blob active.md case, each failing on 1ae5d5f. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #637. These are fixes from the M3.1 live shifts (PyAutoLabs/PyAutoMind#570 and #571), made before the M3.2 shifts.
max-sessionsby 1, once per shift (REDISPATCH_LIMIT=1).counters.jsonreads as no hold, with a note.coordination:/conflict-override:. An unreadableactive.mdfails closed.origin/mainref, so a check-in pushed from a linked worktree counts within one tick. The 16-minute gap on 2026-11-14 was in the lead, not the gate. That was the latent fault.pr:key is refused, and the worker template stateslibrary-pr:/workspace-pr:.queue.mdentry.Witness
test_grouped_organ_consumers, which also fails on the base).Science/scratch/m3_1_prep/findings_637/dryrun.md):Review
An independent Opus review returned FINDINGS (an uncapped token reserve could freeze a shift; a crash on a malformed counters file; fail-open on an unreadable
active.md). All three were fixed in c0e4d72. Follow-ups: answering a question on the issue does not clear the hold by itself, and M3.5 (the questions inbox) owns that. Acoordination:claim opens its repos to every dip.🤖 Generated with Claude Code