Repository navigation
feat: autonomous orchestrators p3c — one Mind writer (ledger ops, temp-worktree commits, worker hook) - #560
Merged
Conversation
…ith replay, worker pre-commit hook; lift the sandbox fence Autonomous orchestrators phase 3c (#559). Fence lift: human decision 2026-11-03. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…kout gains no __pycache__ CI (bytecode on) caught commit_ledger leaving scripts/__pycache__/ in the canonical Mind checkout; the test now forces bytecode writing on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
First CI run (41688956065) was red on both legs at Run tests, one test: Fixed in 726090b: the module is compiled from source and exec'd (no cache written); the test now forces |
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.
Closes #559. Phase 3c of the autonomous-orchestrators epic — AUTONOMY.md "One Mind writer per shift — 2026-11-03", implemented and enforced. Read with PyAutoLabs/PyAutoMind#526 (merge that one first).
What changes
_mind_writer.py(new) — workers' Mind changes arrive as op files in<slot>/ledger/(append | write | move | remove | drop-section); every path must be ledger by PyAutoMind's ownscripts/ledger_merge.py(loaded from the checkout being written; default deny —scripts/,.github/refused).commit_ledgerapplies all pending ops in a temporary detached worktree onorigin/main, commits once, pushes; ifmainmoved, the ops are replayed on the neworigin/main(a rebase of operations), at most 3 tries. No reset, no force flag anywhere in the module (a test pins it); the canonical checkout's working tree is never read or written; committed ops move toledger/committed/; an op that cannot apply stays pending.bin/shift_ledger.py(new) — the worker-side CLI that queues one op (validated against Mind at write time).bin/worker_git_hooks/pre-commit(new) — refuses a commit in a PyAutoMind repo whenPYAUTO_SHIFT_WORKER=1, namingshift_ledger.py; otherwise chains to the repo's own hook (read from--git-common-dir, since--git-pathwould resolve to the override and loop)._orchestrator.py—worker_env(): real workers run withPYAUTO_SHIFT_WORKER=1,PYAUTO_SHIFT_LEDGER_DIR, andcore.hooksPathviaGIT_CONFIG_COUNT/KEY/VALUE(appended to any existingGIT_CONFIG_*), so the refusal coversprompt_sync_push,lifecycle closeand a rawgit commitalike. Each tick commits pending ledger ops after the reap (result gainsledger). The 3b sandbox fence is removed (human decision 2026-11-03).worker_template.md— tells the worker to queue its claim, itsdraft/ → active/move and its close-out withshift_ledger.py.AGENTS.md"The watcher" — one Mind writer, the ops, the hook.tests/test_orchestrator_mind_writer.py(9, real git); the two 3b fence tests flipped (a non-sandbox brief now dispatches; with the fake flag unset the default spawner is real — no tick is run there, since it would start a session).Note on wording: AUTONOMY.md's sub-rule says workers write ledger lines "into the lease directory"; the implementation uses
<slot>/ledger/, the lease directory's sibling, so ops outlive the lease that queued them. Same rule, one directory over.Tier: judge — merge mode: human
/prm. Heart YELLOW reason set acknowledged by the human at ship.Witness
🤖 Generated with Claude Code