Skip to content

Update claude's log instructions#4319

Open
fafk wants to merge 2 commits intomainfrom
update-claude-logs-instructions-2
Open

Update claude's log instructions#4319
fafk wants to merge 2 commits intomainfrom
update-claude-logs-instructions-2

Conversation

@fafk
Copy link
Copy Markdown
Contributor

@fafk fafk commented Apr 9, 2026

Description

Instruct Claude to use MPC to access logs instead of using helper script.

@fafk fafk requested a review from a team as a code owner April 9, 2026 05:57
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +215 to +232
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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

Suggested change
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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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.

Suggested change
**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).

@fafk fafk force-pushed the update-claude-logs-instructions-2 branch from a7b8094 to 3135496 Compare April 10, 2026 06:05
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