Skip to content

refactor: fix block number range estimation and migrate to ai.Engine#122

Merged
mattevans merged 3 commits intomasterfrom
refactor/ai-assertion-gen
Feb 27, 2026
Merged

refactor: fix block number range estimation and migrate to ai.Engine#122
mattevans merged 3 commits intomasterfrom
refactor/ai-assertion-gen

Conversation

@mattevans
Copy link
Member

  • Fix silent failure when querying ranges for block_number/slot/epoch columns. parseTimeValue can't parse UInt64 values, so ranges came back empty and Claude hallucinated block numbers
  • Add QueryModelRangeRaw that returns raw string min/max without time parsing, used for non-DateTime range columns
  • Update prompt to tell Claude to use actual range values instead of estimating
  • Migrate ClaudeDiscoveryClient and ClaudeAssertionClient from shelling out to claude --print to using ai.Engine
  • Remove findClaudeBinaryPath()

…on generation processes to improve accuracy and flexibility

refactor(claude): remove dependence on CLI binary for assertion and discovery processes, enhancing portability and maintainability

fix(discovery): ensure proper handling of min and max values for numeric columns without parsing errors

style(assertions): update logging to reflect usage of AI engine instead of CLI for clarity and consistency
@mattevans mattevans self-assigned this Feb 27, 2026
…L rules for better clarity and guidance

feat(assertions.go): add new assertions for validating row count and negative gas values in SQL queries
…ndling to improve readability and maintainability
@mattevans mattevans merged commit f9f0cce into master Feb 27, 2026
3 checks passed
@mattevans mattevans deleted the refactor/ai-assertion-gen branch February 27, 2026 02:03
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.

2 participants