5.7 KiB
5.7 KiB
Case: leader-dispatches-dependent-task-after-prerequisite-through-bundled-cli
Test Type
This is a forward-test and a dependency-gated ready-queue skill validation.
The goal is to verify that a leader using the packaged orch skill can create a dependency edge, observe the correct ready set before and after prerequisite completion, and dispatch the dependent task only after it becomes eligible.
Purpose
Validate that all of the following can be true at the same time:
- the leader can use
dep add,ready,dispatch,wait,reconcile, andstatusthrough the bundled orch skill worker-acan complete the prerequisite task on the bundled inbox skill- the dependent task stays out of the initial
readyqueue - the dependent task appears in
readyonly after the prerequisite reachesdone - the leader can dispatch that newly ready dependent task to
worker-band close the run
Preconditions
- orch skill path exists:
ORCH_SKILL_PATH=skills/orch - inbox skill path exists:
INBOX_SKILL_PATH=skills/inbox - bundled CLI executables exist at
ORCH_SKILL_PATH/assets/orchandINBOX_SKILL_PATH/assets/inbox - use an empty temporary directory
TMPDIR - initialize
TMPDIR/coord.dbbefore launching role agents throughINBOX_SKILL_PATH/assets/inbox --db TMPDIR/coord.db --json init
Agent Topology
leaderworker-aworker-b
Inputs
Leader Prompt
Use $orch at ORCH_SKILL_PATH to act as leader on the already initialized SQLite DB TMPDIR/coord.db. Only coordinate through the bundled orch CLI from the skill. Workflow: 1) create run run_blog_skill_deps_001, 2) add prerequisite task T1 for worker-a and dependent task T2 for worker-b, 3) make T2 depend on T1, 4) inspect ready work and confirm only T1 is dispatchable at first, 5) dispatch T1, 6) wait until T1 completes, 7) reconcile and inspect ready work again, 8) dispatch T2 only after it becomes ready, 9) wait until T2 completes, 10) reconcile and inspect final status, 11) stop after reporting THREAD_ID_1 and THREAD_ID_2. Do not use ordinary chat to coordinate with the workers.
Worker A Prompt
Use $inbox at INBOX_SKILL_PATH to act as worker-a on SQLite DB TMPDIR/coord.db. Only coordinate through the bundled inbox CLI from the skill. Workflow: 1) fetch and claim the prerequisite thread assigned to worker-a, 2) send one in_progress update, 3) finish it with done, 4) stop after reporting THREAD_ID_1. Do not use ordinary chat to coordinate with the leader or worker-b.
Worker B Prompt
Use $inbox at INBOX_SKILL_PATH to act as worker-b on SQLite DB TMPDIR/coord.db. Only coordinate through the bundled inbox CLI from the skill. Workflow: 1) wait until dependent work assigned to worker-b appears, 2) fetch and claim that thread, 3) finish it with done, 4) stop after reporting THREAD_ID_2. Do not use ordinary chat to coordinate with the leader or worker-a.
Execution Parameters
- use the shared execution contract from README.md
- use the shared timeout defaults from README.md
- do not override the default cleanup policy
Execution Steps
- Initialize
TMPDIR/coord.dbonce through the bundled inbox CLI before launching agents - Inject
skills/orch/intoleader - Inject
skills/inbox/intoworker-aandworker-b - Point all agents at the same database path
TMPDIR/coord.db - Launch
leader,worker-a, andworker-bin parallel - Wait for all agents to finish
- Resolve
THREAD_ID_1andTHREAD_ID_2from the agent outputs - Independently run the validation commands from the main thread
Validation Commands
ORCH_SKILL_PATH/assets/orch --db TMPDIR/coord.db --json status --run run_blog_skill_deps_001
INBOX_SKILL_PATH/assets/inbox --db TMPDIR/coord.db --json show --thread THREAD_ID_1
INBOX_SKILL_PATH/assets/inbox --db TMPDIR/coord.db --json show --thread THREAD_ID_2
Expected Outcomes
- the leader initially sees only
T1in thereadyoutput worker-acompletes the prerequisite thread forT1- after reconcile, the leader sees
T2become ready worker-breceives a distinct thread forT2and completes it- the final run reaches
done
Assertions
- the initial
readyoutput containsT1and does not containT2 - the post-reconcile
readyoutput containsT2 THREAD_ID_1 != THREAD_ID_2status.data.run.status == "done"status.data.taskscontainsT1andT2, both with statusdoneshow THREAD_ID_1reports a terminal done thread stateshow THREAD_ID_2reports a terminal done thread state
Cleanup
- use the default cleanup policy from README.md
- if the run fails, retain
TMPDIRandcoord.dbfor replay and manual inspection
Recorded Example Run
- recorded on:
2026-03-19 - execution mode:
direct_cli_replayviascripts/run_orch_skill_forward_tests.sh - result:
pass - observed run id:
run_blog_skill_deps_001 - observed first thread id:
thr_7f57b577e5ce4cc094341e7d2eae4570 - observed second thread id:
thr_5dbc81f2fe234b6dbf0c57a176e13acf - evidence summary:
- the initial
readyoutput returned onlyT1, confirming that dependent taskT2stayed gated before prerequisite completion - after
worker-acompletedT1and the leader ranreconcile, the nextreadyoutput returned onlyT2 - final
orch status --run run_blog_skill_deps_001 --jsonreturnedrun.status == "done"with both tasksT1andT2in statedone - final
inbox showon both thread ids returned terminal thread statedone - the replay also observed
orch wait --for task_donewake on the prerequisite completion before the dependent dispatch - note: this recorded run exercised the packaged binaries directly in a temporary DB and did not spawn separate Codex role agents