Repository navigation
fix: shift ledger edit op; hold completion on a set-aside (M3.6d) - #663
Merged
Merged
Conversation
Shift 2026-11-16-pm: a worker's `write` edits to existing Mind drafts were set aside while its complete/ record committed, so Mind recorded the task shipped with the drafts unchanged; five workers' calibration rows could not be queued (table-append never set its heading or row). - _mind_writer: `edit` op (expected old text exactly once; MechanicalError when already applied); write of identical text and remove of a missing file are mechanical; ops carry `task`; closing ops (complete/ write, drop-section, active/ remove, queue/question retire) apply last and are `withheld` when a sibling op was set aside for a human, this run or earlier; queue_refusals checks write/edit/table-append against Mind origin/main and the queued ops (no fetch; fails open); a tagged table-append is not critical. - shift_ledger: --task (required for a shift worker), edit --old/--new(-file), table-append heading/row/--unique, Mind lookup --mind → $PYAUTO_MIND → sibling checkout; refused ops are not queued. - _events: mechanical set-asides are no NEEDS YOU; human ones are one event per task. _digest: withheld and mechanical wording. - Templates and docs: --task, write creates/edit changes, edits first and the complete record last, the `## Calibration runs` table-append. Refs #660 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… siblings Review of the M3.6d branch: - an edit to empty text no longer reads an absent base as already applied; - a task's closing ops apply as one group: a part-way failure rolls the group back and withholds the rest, so the record never lands alone; - an op on a path the group creates (edit of the complete/ record) is part of the group and keeps its order; - while a sibling op is held, the group stays pending beside it; - queue-time checks replay only pending ops over origin/main; - the NEEDS YOU line says "held" only when a record was withheld, and "already on main" when the task's record landed earlier (digest too); - shift_ledger names a missing Mind checkout instead of a traceback; - batch AGENTS.md states the two limits (earlier record, sticky block). Refs #660 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI checks out Mind main, which gains `## Calibration runs` only when PyAutoMind#581 merges. The fixture-log witness stays unconditional; the check against the sibling Mind log is its own test and skips while that log lacks the heading. Refs #660 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
M3.6d of the autonomous-orchestrators epic (PyAutoBrain#660). In shift 2026-11-16-pm a worker's
op: writeedits to existing Mind drafts were set aside while itscomplete/record committed, so Mind recorded the task shipped with the drafts unchanged (PyAutoMind#579). Five workers also hittable-appendfailing onautonomy_log.md.writestays create-only; a neweditop replaces an expected old text that must appear exactly once, so a concurrent change is never clobbered.--task. A task's closing ops (complete/record,drop-section, retire) apply as one group last: if a sibling op is set aside for a human the group is withheld and rolled back in either order; if a sibling is held for retry the group waits pending beside it.shift_ledgerrefuses at queue time awriteto a path on Mind origin/main, aneditwhose base is missing or ambiguous, and atable-appendwith no heading (it reads origin/main, no fetch, and replays only pending ops).table-appendnow works from the CLI.note:line, not NEEDS YOU; human set-asides give one NEEDS YOU per task, saying "held" only when a record was withheld and "already on main" when it had landed earlier.API Changes
CLI:
shift_ledgergains--task(required for shift workers),edit <path> --old/--new[-file], and a workingtable-append <path> "<## heading>" --text "<row>"; a missing--mindis a one-line error (exit 2). Mind writer: new opedit,MechanicalError,queue_refusals(); set-aside entries gaintaskandneeds.See full details below.
Test Plan
tests/test_orchestrator_mind_writer.py, 7 at first build + 9 review-round cases): queue-time refusal of a write; edit applies on a matching base, set aside on a moved one; held completion record (incl. across commit_ledger calls, both orders, held sibling, record-then-edit); table-append reaches the first autonomy_log table; mechanical set-aside is a digest line; one NEEDS YOU per tasktest_grouped_organ_consumersis environmental (fails on origin/main under activate.sh)_orchestrator.pyuntouchedFull API Changes (for automation & release notes)
Added
edit(path,old,new, optionaltask);_mind_writer.MechanicalError,queue_refusals(mind, op, ledger_dir)shift_ledger --task,shift_ledger edit,shift_ledger table-append <path> <heading> --text <row> [--unique]Changed Behaviour
commit_ledger: a task's closing ops land together or not at all; set-aside entries carrytask,needs(mechanical|human); new kindwithheldwriteof identical text andremoveof a missing path are mechanical set-asides_events._impaired: one NEEDS YOU per task; mechanical entries raise noneMind half: the PyAutoMind PR on the same branch adds
## Calibration runsabove the firstautonomy_log.mdtable; merge it first.Refs PyAutoBrain#660. Tier glance, merged by the human's
/prmthis time (human instruction 2026-11-17).Heart RED override (development only)
pyauto-heart readiness --dev --repos PyAutoBrain,PyAutoMind):PyAutoMind: Tenant Firewall Gate failure on main— pre-existing generated-hook drift from PyAutoMind#575 (run 43881901227, 2026-11-16); this branch does not touch those hooks and does not claim to fix Heart./prmwith every required check green. No release.🤖 Generated with Claude Code