Conversation
There was a problem hiding this comment.
Code Review
This pull request replaces the scripts/vlogs wrapper with direct CoW-Prod MCP tools for querying Victoria Logs and updates the associated documentation. The changes include new instructions for RFC3339 timestamp formatting, metadata stripping, and updated example queries in CLAUDE.md and docs/COW_ORDER_DEBUG_SKILL.md. Feedback was provided to ensure consistency in the network filter across examples, replace hardcoded future dates with placeholders to prevent model hallucination, and clarify the exception for using the 0x prefix when searching raw calldata.
| query: "container:!controller AND all:0xabc... | fields _time, _msg, all" | ||
| start: "2026-04-08T00:00:00Z" | ||
| limit: 20 | ||
|
|
||
| # Search for order creation on mainnet | ||
| query: "container:!controller AND network:mainnet AND \"order created\" AND all:0xabc... | fields _time, _msg, all" | ||
| start: "2026-04-09T00:00:00Z" | ||
| limit: 10 | ||
|
|
||
| # Settlement failures with just error details | ||
| query: "container:!controller AND \"settlement failed\" | fields _time, _msg, parsed.fields.err, parsed.fields.driver, parsed.spans.auction.auction_id" | ||
| start: "2026-04-09T00:00:00Z" | ||
| limit: 10 | ||
|
|
||
| # Sort results by time | ||
| query: "container:!controller AND all:0xabc... | fields _time, _msg, all | sort by (_time) asc" | ||
| start: "2026-04-08T00:00:00Z" | ||
| limit: 20 |
There was a problem hiding this comment.
The example queries are inconsistent with the instruction to include the network filter (listed as a key field and required in the debug skill documentation). Additionally, using hardcoded future dates in examples can lead to the model hallucinating the current time or using invalid ranges. Use placeholders for timestamps and ensure all examples include the network filter for consistency.
| query: "container:!controller AND all:0xabc... | fields _time, _msg, all" | |
| start: "2026-04-08T00:00:00Z" | |
| limit: 20 | |
| # Search for order creation on mainnet | |
| query: "container:!controller AND network:mainnet AND \"order created\" AND all:0xabc... | fields _time, _msg, all" | |
| start: "2026-04-09T00:00:00Z" | |
| limit: 10 | |
| # Settlement failures with just error details | |
| query: "container:!controller AND \"settlement failed\" | fields _time, _msg, parsed.fields.err, parsed.fields.driver, parsed.spans.auction.auction_id" | |
| start: "2026-04-09T00:00:00Z" | |
| limit: 10 | |
| # Sort results by time | |
| query: "container:!controller AND all:0xabc... | fields _time, _msg, all | sort by (_time) asc" | |
| start: "2026-04-08T00:00:00Z" | |
| limit: 20 | |
| # Search for order logs (exclude nginx controller, strip metadata) | |
| query: "container:!controller AND network:mainnet AND all:0xabc... | fields _time, _msg, all" | |
| start: "<RFC3339_TIMESTAMP>" | |
| limit: 20 | |
| # Search for order creation on mainnet | |
| query: "container:!controller AND network:mainnet AND \"order created\" AND all:0xabc... | fields _time, _msg, all" | |
| start: "<RFC3339_TIMESTAMP>" | |
| limit: 10 | |
| # Settlement failures with just error details | |
| query: "container:!controller AND network:mainnet AND \"settlement failed\" | fields _time, _msg, parsed.fields.err, parsed.fields.driver, parsed.spans.auction.auction_id" | |
| start: "<RFC3339_TIMESTAMP>" | |
| limit: 10 | |
| # Sort results by time | |
| query: "container:!controller AND network:mainnet AND all:0xabc... | fields _time, _msg, all | sort by (_time) asc" | |
| start: "<RFC3339_TIMESTAMP>" | |
| limit: 20 |
| - `| fields _time, _msg, all` — **always append** to strip k8s metadata and protect context window | ||
|
|
||
| scripts/vlogs "NOT container:controller baseline all:22788649" | ||
| **Note:** Always use the **full order UID with 0x prefix** and the `all:` field prefix for reliable matching. |
There was a problem hiding this comment.
The instruction to always use the 0x prefix contradicts the specific instruction on line 131 to use the UID without the 0x prefix for calldata searches. Update this note to acknowledge the exception for calldata to avoid model confusion.
| **Note:** Always use the **full order UID with 0x prefix** and the `all:` field prefix for reliable matching. | |
| **Note:** Generally use the **full order UID with 0x prefix** and the `all:` field prefix for reliable matching (except when searching for UIDs in raw calldata). |
a7b8094 to
3135496
Compare
Description
Instruct Claude to use MPC to access logs instead of using helper script.