Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions .claude/commands/debug-order.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,21 @@ Read and follow the instructions in ./docs/COW_ORDER_DEBUG_SKILL.md to investiga

Key steps:
1. Parse the order UID and network from arguments (default: mainnet)
2. Fetch order data from API to get status and details
3. Check order_events in DB for lifecycle events
4. Search Victoria Logs for the order UID
2. **Start with the debug endpoint** — fetch the comprehensive debug report first:
```bash
source .env.claude && curl -s -H "X-API-Key: $COW_DEBUG_API_KEY" "https://partners.cow.fi/$NETWORK/api/v1/debug/order/$ORDER_UID" | jq .
```
This returns order details, lifecycle events, auction participation, proposed solutions, executions, trades, and settlement attempts — all in one call.
3. Analyze the debug report — key event meanings:
- `ready` = order made it into an auction (was sent to solvers)
- `considered` = a solver included this order in a solution but that solution didn't win
- `executing` = order is in the winning solution, being submitted on-chain
- `traded` = order was settled on-chain
- `filtered` / `invalid` = order was excluded (check the `reason` field)
4. Search Victoria Logs for additional context (filter reasons, error details, solver logs)
- For finding discarded solutions where the order UID appears in calldata, use regex: `.*ORDER_UID_WITHOUT_0X.*` plus `discarded`
5. Identify root cause and report findings with evidence
6. If you haven't found anything go wild and try all SQL / log searches / codebase searches you can think of
5. Use DB queries or API calls only if the debug report is missing info or you need deeper investigation
6. Identify root cause and report findings with evidence
7. If you haven't found anything go wild and try all SQL / log searches / codebase searches you can think of
Comment thread
fafk marked this conversation as resolved.

Always show your evidence (log lines, DB results, API responses) when presenting findings.
Loading