Skip to content

fix: lower_metricsql and lower_metricsql_query stay public (CI external-consumer check) - #1114

Merged
zzylol merged 1 commit into
refactor/stage-boundariesfrom
fix/metricsql-stable-api
Oct 30, 2026
Merged

zzylol merged 1 commit into
refactor/stage-boundariesfrom
fix/metricsql-stable-api

Conversation

@zzylol

@zzylol zzylol commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Part of #1108's CI fix. Merges into refactor/stage-boundaries.

Why

#1108's test job failed at "Verify MetricsQL frontend as a stable external dependency" (tools/verify_metricsql_external_consumer.sh). That step builds an outside crate that calls asap_frontend_metricsql::lower_metricsql. #1099 (8b part 2) had moved lower_metricsql and lower_metricsql_query behind test-support, because no in-repo production code calls them. But CI declares them stable public API.

What

lower_metricsql and lower_metricsql_query are public at the crate root again. test_support re-exports them, so the existing test paths keep compiling. The private corpus's jane_street_corpus.rs uses lower_metricsql_query, so it no longer needs the test-support change that was planned for it.

How

The two functions move from test_support.rs into lib.rs unchanged.

Key code interfaces added / modified

pub fn asap_frontend_metricsql::{lower_metricsql, lower_metricsql_query} (restored).

Usage: asap_frontend_metricsql::lower_metricsql("sum(rate(requests_total[5m]))", AccuracyTarget::exact(), Duration::from_secs(15)) from a downstream crate.

Major algorithm changes

None.

Before / After

  • Before: the external-consumer check failed with "cannot find function lower_metricsql".
  • After: it passes.

Verification

  • bash tools/verify_metricsql_external_consumer.sh passes.
  • cargo test -p asap-frontend-metricsql: 15 passed.
  • fmt and clippy --workspace --all-targets -D warnings are clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01K1M6bqhAk7WA4MZcfbAoMw

…ay public API

tools/verify_metricsql_external_consumer.sh (CI) treats them as a stable
external dependency; #1099 had moved them behind test-support.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K1M6bqhAk7WA4MZcfbAoMw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant