3.1 KiB
3.1 KiB
Case: leader-cancels-claimed-thread-through-bundled-cli
Test Type
This is a forward-test and a terminal-state intervention validation.
The goal is to verify that a leader and worker can both observe a thread transition to cancelled through the bundled inbox skill while the thread is actively claimed.
Purpose
Validate that all of the following can be true at the same time:
- the worker can fetch and claim a real thread through the skill
- the leader can cancel that thread through the same bundled CLI
- the final thread state is
cancelled - both parties can inspect the terminal state from inbox history
Preconditions
- skill path exists:
SKILL_PATH=skills/inbox - bundled CLI executable exists:
SKILL_PATH/assets/inbox - use an empty temporary directory
TMPDIR - test database path is
TMPDIR/coord.db
Agent Topology
leaderworker-a
Inputs
Leader Prompt
Use $inbox at SKILL_PATH to act as leader on SQLite DB TMPDIR/coord.db. Only coordinate through the bundled inbox CLI from the skill. Workflow: 1) initialize the DB, 2) send exactly one task to worker-a, 3) wait until worker-a has claimed the thread or reported in_progress, 4) cancel the thread with a clear reason, 5) inspect the final thread with show, 6) stop. Do not use ordinary chat to coordinate with the other agent.
Worker Prompt
Use $inbox at 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 pending work, 2) claim it, 3) send an in_progress update, 4) keep monitoring the thread until it reaches a terminal state, 5) stop after reporting the final status you observed. Do not use ordinary chat to coordinate with the other agent.
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
- Inject the same
skills/inbox/skill into both real agents - Point both agents at the same database path
TMPDIR/coord.db - Launch
leaderandworker-ain parallel - Wait for both agents to finish
- Resolve
THREAD_IDfrom the agent outputs or inbox history - Independently run the validation commands from the main thread
Validation Commands
SKILL_PATH/assets/inbox --db TMPDIR/coord.db --json show --thread THREAD_ID
SKILL_PATH/assets/inbox --db TMPDIR/coord.db --json list --status cancelled
Expected Outcomes
worker-asuccessfully claims the threadworker-aemits oneprogressmessageleadersuccessfully emitscancelwith a reason- the final thread status is
cancelled - the worker reports that it observed the cancelled terminal state
Assertions
showcontains at leasttask -> event -> progress -> control- the final thread status is
cancelled - the terminal message or thread history captures the cancel reason
list --status cancelledreturns the thread
Cleanup
- use the default cleanup policy from README.md
- if the run fails, retain
TMPDIRandcoord.dbfor replay and manual inspection