Repository navigation
fix(batch): a shift worker's update of its own claim is not a Mind-writer conflict - #682
Merged
Merged
Conversation
A drop-section paired with an append of the same task re-adding that ## slug to the same path is an update of the worker's claim, not a closing op: the drop applies directly before its append as one unit, guarded so main's section must be this shift's own (committed earlier this shift, or its session line names this slot's shift worker). A lone drop-section stays closing. 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
A shift worker that updates its own
active.mdclaim at PR-open queuesdrop-section active.md <slug>thenappendthe new## slugsection. The Mind writer classed everydrop-sectionas a closing op, applied after the task's other ops, so the append ran first against the still-present section, was set aside as "not this shift's own claim — conflict", and the drop was withheld with it — a NEEDS YOU on every PR-open claim update. Seen in shift 2026-11-18-pm2 (PyAutoGalaxy#726); repaired by hand in Mind d5fb06628.Now a task's
drop-sectionpaired with itsappendre-adding the same## slugto the same path is an update: applied drop-then-append as one unit, not a close — and only when main's section is this shift's own (a section this shift committed earlier, or a- session:namingshift worker <this slot> (<id>), short id or full UUID). Anything else is still a conflict, set aside. A lonedrop-sectionstays closing; re-dispatch repeat-skips are unchanged.Closes #681
API Changes
None — internal changes only.
SHIFT_WORKER_SESSION_REnow lives in_mind_writerand_orchestratorre-exports it (unchanged regex).See full details below.
Test Plan
tests/test_orchestrator_mind_writer.py: 5 new tests (6 cases) — PR-open update commits (fails on main, reproduces the 2026-11-18-pm2 set-aside); session-line route; foreign-slot and human-written sections stay conflicts; lone drop still withheld beside a failed sibling; re-dispatch repeat still skippedtests/test_orchestrator_*.py tests/test_batch_*.py: 670 passed, 1 skippedtest_questions_inbox.py::test_the_question_add_op_lands_through_minds_own_add_text, which fails identically on unmodified main locally (sys.path temp-path assertion; local-env), while main's CI is greenFull API Changes (for automation & release notes)
Added
_mind_writer._update_pairs(ops),_mind_writer._own_section(tree, op, lm, ctx);ctx["slot"]incommit_ledger.Changed Behaviour
commit_ledger: a paired drop-section + append of the same task's## slugapplies as one update unit (not closing), behind the own-section guard.Notes for review
Heart (dev-ship gate for PyAutoBrain; reasons shown, not blocking)
Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code