Skip to content

fix(agents): use warehouse-backed query surfaces#181

Open
jonathanhaaswriter wants to merge 1 commit intosnowflake-direct-scan-warehouse-20260327from
snowflake-query-surfaces-warehouse-20260327
Open

fix(agents): use warehouse-backed query surfaces#181
jonathanhaaswriter wants to merge 1 commit intosnowflake-direct-scan-warehouse-20260327from
snowflake-query-surfaces-warehouse-20260327

Conversation

@jonathanhaaswriter
Copy link
Copy Markdown
Collaborator

Summary

  • switch agent query/get-asset tools and their CLI/job wiring from Snowflake clients to the generic warehouse read surface
  • add a lightweight app.OpenWarehouse helper so direct cerebro query uses the configured warehouse backend without booting the full app
  • add regression coverage for warehouse-backed agent queries and direct sqlite-backed CLI queries

Validation

  • go test ./...
  • GOTOOLCHAIN=go1.26.1 go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.8.0 run --timeout 5m ./...
  • go run ./scripts/check_agent_sdk_contract_compat/main.go --require-baseline --base-ref=writer/main
  • make agent-sdk-docs-check
  • make agent-sdk-packages-check
  • go run ./scripts/check_api_contract_compat/main.go --require-baseline --base-ref=writer/main
  • make api-contract-docs-check
  • make config-docs-check
  • make devex-codegen-check
  • go test ./internal/app -run "Test(PreCommitHookRunsFastLintOnStagedGoFiles|PrePushHookRunsChangedDevexPreflight|DockerBuildCommandsPassGoVersionBuildArg|DevelopmentGuideDocumentsDevexPreflight|DevexScriptPlansRelevantChecks|DevexScriptChangedModeIncludesWorkspaceDiffSources)"
  • make openapi-check
  • go run ./scripts/check_report_contract_compat/main.go --require-baseline --base-ref=writer/main
  • make report-contract-docs-check
  • make vendor-check

@jonathanhaaswriter
Copy link
Copy Markdown
Collaborator Author

I think get_asset_context regressed in two ways:

  • the warehouse GetAssetByID path is querying id, not the canonical _cq_id that the old Snowflake implementation used, so valid lookups can now miss rows
  • a miss now comes back as a marshalled null payload instead of a not-found error, because the warehouse implementations return (nil, nil)

Can we keep _cq_id semantics here and normalize misses back into the previous not-found behavior?

@jonathanhaaswriter jonathanhaaswriter force-pushed the snowflake-direct-scan-warehouse-20260327 branch from a3fb703 to 8567b47 Compare March 28, 2026 02:05
@jonathanhaaswriter jonathanhaaswriter force-pushed the snowflake-query-surfaces-warehouse-20260327 branch from 7663564 to 0d24034 Compare March 28, 2026 02:14
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