Repository navigation
feat: autonomous orchestrators p3a — shift watcher core (fake workers, leases, kill switch) - #556
Merged
Merged
Conversation
…e leases, crash re-dispatch once, usage caps, fake workers; AUTONOMY watcher network surface (2026-11-03) Autonomous orchestrators phase 3a (#555). 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.
Closes #555. Phase 3a of the autonomous-orchestrators epic — the shift watcher's core, fake workers only. Read with PyAutoLabs/PyAutoMind/pull/524 (merge that one first).
What changes
agents/conductors/batch/_orchestrator.py(new, stdlib) —tick(brief, mind), in order: (1)STOPin the slot dir → no-op before any other read; (2)brief --checkmust pass andreview-at:must not have passed; (3) tick lock by exclusive create (stale after 10 min or a dead holder); (4) reap leases —.donemarker → released, exited without it → dead after a grace, counted, task re-dispatched at most once per shift then abandoned; (5) candidates fromplan(..., brief=...); (6)max-workers/max-sessionscaps → exclusive-create lease → spawn. State home$PYAUTO_ORCHESTRATOR_HOMEorpyauto_wt_root()/.orchestrator(no path in organ code); per brief:STOP,leases/,counters.json,tick.log.FakeSpawnerstub workers;RealSpawnerrefuses ("phase 3b"), and a refused spawn leaves no lease behind.bin/orchestrator_watch.py— one tick per call;bin/systemd/pyauto-orchestrator.{service,timer}templates (%h+EnvironmentFile, no workspace path). Installing them is documented as the human's act; nothing here installs or arms anything._brief.py— optionalmax-workers/max-sessions(defaults 2 / 6), validated.AUTONOMY.md— newThe watcher's network surface — 2026-11-03: read-onlygh pr checksandclaude agents --json, one issue comment per shift (3d); opt-in via a human-installed timer, laptop-only, never a write/merge/push/label; revert condition. The hard-invariant network bullet gains it as the third named exception; Consumers entry added. Revert-condition count 11 → 12.agents/conductors/batch/AGENTS.md"The watcher" (the batch skill keeps a two-line pointer: it is a known over-budget skill, 268 vs main 263).tests/test_orchestrator_watcher.py(16; clause (a) races four real tick processes), 3 doctrine tests.Next slices: 3b real
claude --bgdispatch + permission mode (decided with the human at plan time), 3c one Mind writer, 3d digest + the one comment.Tier: judge — merge mode: human
/prm. Heart YELLOW reason set acknowledged by the human at ship.Witness
🤖 Generated with Claude Code