Skip to content

feat(orchestration): QoL bundle — preamble visibility, status enum, dispatch xref, inbox --full - #1392

Closed
Jinwoo-H wants to merge 1 commit into
mainfrom
Jinwoo-H/orca-improvements-qol
Closed

Jinwoo-H wants to merge 1 commit into
mainfrom
Jinwoo-H/orca-improvements-qol

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented May 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Small, independently reviewable bundle of orchestration QoL fixes spanning 4 items from ORCHESTRATOR_FEEDBACK.md:

  • Item 5 — preamble visibility: dispatch-show --preamble [--from <handle>] regenerates the preamble for any task; dispatch --inject --dry-run returns preamble text without mutating state; dispatch --return-preamble echoes injected preamble in JSON response
  • Item 6 — status enum validation: CLI rejects unknown --status with invalid status '<x>', expected one of: pending, ready, dispatched, completed, failed, blocked before hitting the RPC; task-update --help lists valid statuses
  • Item 13 — task-list dispatch xref: new OrchestrationDb.listTasksWithDispatch() with LEFT JOIN on dispatch_contexts (active dispatches only). taskList RPC surfaces assignee_handle + dispatch_id for tasks in status=dispatched; non-dispatched rows keep legacy shape
  • Item 14 — inbox --full: new --full flag prints body + payload verbatim; default output unchanged

Deliberately out of scope: items 8 (handle stability) and 10 (run scoping) — larger refactors that deserve their own design cycle.

Test plan

  • pnpm typecheck clean
  • 142 targeted orchestration+CLI tests pass (9 new)
  • pnpm lint clean
  • Manual smoke: create a task, dispatch it, run task-list --json — verify assignee_handle populated
  • Manual smoke: task-update --status invalid — verify clear error
  • Manual smoke: dispatch-show --preamble <id> — verify preamble returned
  • Manual smoke: inbox --full — verify no truncation on a long-body message

…ispatch cross-ref, inbox --full

Addresses four items from ORCHESTRATOR_FEEDBACK:

- #5 preamble visibility: `dispatch-show --preamble` regenerates the preamble
  text for a task; `dispatch --inject --dry-run` previews without mutating
  state; `dispatch --return-preamble` echoes the injected preamble in the JSON
  response so coordinators can audit what a worker received.
- #6 status enum validation: CLI rejects unknown `task-update --status` values
  with `invalid status '<x>', expected one of: pending, ready, dispatched,
  completed, failed, blocked` before the RPC's generic Zod message. Valid
  statuses are listed under Notes in `task-update --help`.
- #13 task-list dispatch cross-ref: `task-list --json` now includes
  `assignee_handle` and `dispatch_id` for tasks in status=dispatched via a
  read-only LEFT JOIN on dispatch_contexts. Non-dispatched rows keep their
  legacy shape so existing consumers are unaffected.
- #14 inbox body visibility: `inbox --full` prints body + payload verbatim;
  default output is unchanged (id/from/to/subject only).

No DB migrations; join-only change on dispatch_contexts so the sibling
preamble PR's `last_heartbeat_at` column addition will not conflict.

Co-authored-by: Orca <help@stably.ai>
@Jinwoo-H

Jinwoo-H commented May 4, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #1403, which bundles this PR with the other three orchestration improvement PRs and resolves the merge conflicts they shared. Branch preserved for diff comparison — not deleting.

@Jinwoo-H Jinwoo-H closed this May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant