feat: add supervisor dispatch-focus entrypoint - #62
Conversation
c015730 to
13506c4
Compare
13506c4 to
6c76d18
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c0157307d9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| _plan, envelope, parsed_manifest = cos_dispatch_orchestrator.build_focus_dispatch_plan( | ||
| manifest_path=manifest_path, | ||
| current_focus_path=paths["current_focus"], | ||
| decision_path=paths["decision"], |
There was a problem hiding this comment.
Reject a focus projection from a different decision
When run_tick is concurrently reconciling—or is interrupted after replacing decision-current.json but before replacing current-focus.md—this call can pair the previous focus with the newer decision. If that old task remains in the actionable feed, the planner successfully dispatches it even though the current focus has moved; validate the projection's decision_digest and controller_epoch against the loaded decision and verified epoch before dispatching.
Useful? React with 👍 / 👎.
| elif args.command == "dispatch-focus": | ||
| result = dispatch_current_focus( |
There was a problem hiding this comment.
Return a failure status when focused dispatch fails
When the dispatch completes normally but returns {"ok": false}—for example, the terminal edge reports unsuccessful delivery—this new branch falls through to the unconditional return 0 at the end of main. Consequently scripts/cosctl dispatch-focus signals success to shell automation despite reporting a failed dispatch; this command should derive its exit status from result["ok"].
Useful? React with 👍 / 👎.
Summary
dispatch-focusentrypoint that delegates to the durable focused-dispatch orchestratorTesting