Skip to content

HyperDX's Search page, statement by statement, against real rows: the corpus is the test (T-495) - #355

Merged
chasers merged 1 commit into
t-485-clickhouse-function-macrosfrom
t-495-hyperdx-search-corpus
Sep 20, 2026
Merged

chasers merged 1 commit into
t-485-clickhouse-function-macrosfrom
t-495-hyperdx-search-corpus

Conversation

@chasers

@chasers chasers commented Sep 20, 2026

Copy link
Copy Markdown
Owner

TL;DR: HyperDX's Search page, statement by statement, now runs against real ingested rows in an integration test. The corpus is the test.

Tracker: T-495. Plan PL-66. Stacked on #353 (T-485, T-494).

Why

  • No container runs on the dev box, so a real HyperDX cannot be pointed at the edge there.
  • What stands in for it is what it sends.

What changed

  • test/support/fixtures/clickstack/hyperdx_search.json: HyperDX's statements, verbatim from its source (hyperdxio/hyperdx @ c42dda8).
  • test/smolquery_clickhouse/hyperdx_search_test.exs: runs them against a production-wired node.
  • No lib/ change.

What the fixture holds

Step Statement
Before the first query system.settings, version(), DESCRIBE, system.tables, system.data_skipping_indices, the SharedMergeTree probe
Results table SELECT ... ORDER BY Timestamp DESC LIMIT {..:Int32} OFFSET {..:Int32} as JSONCompactEachRowWithNamesAndTypes
Histogram count() by severity and toStartOfInterval(...), the alias named three times
Search a hasToken term; field, existence and map-key filters
  • Each request carries HyperDX's URL settings and its param_HYPERDX_PARAM_<hash> values.
  • Each statement gets the \nFORMAT <name> that clickhouse-js appends.

How it works

  • 120 rows go into the buffer of a Smolquery.Test.FullNode.
  • Every step crosses the whole edge: parameters, quoting, the rewrite, the catalog, the macros, the formats.
  • Assertions are on what HyperDX reads: meta names and types, data, rows.

Watch out

  • ⚠️ Tagged :integration, so it runs in the Integration tests job, not the fast suite.
  • ⚠️ It reads the hot tier only. The sealed tier runs the same SQL through the same planner.
  • ✅ It passed as written. That is what the five layers under it were for.

Checks

  • mix precommit
  • mix ci
  • mix test --include integration test/smolquery_clickhouse/hyperdx_search_test.exs

🤖 Generated with Claude Code

… corpus is the test (T-495)

No container runs on the dev box, so what stands in for a real HyperDX is
what it sends. test/support/fixtures/clickstack/hyperdx_search.json holds
the statements verbatim from HyperDX's source (hyperdxio/hyperdx @ c42dda8),
with the settings it puts in every URL and its HYPERDX_PARAM_<hash> names:

  system.settings, version(), DESCRIBE with Identifier parameters,
  system.tables, system.data_skipping_indices, the SharedMergeTree probe,
  the results table, the histogram, a search term, and field, existence
  and map-key filters.

The integration test writes 120 rows into a production-wired node
(Smolquery.Test.FullNode), sends each statement through the router with the
FORMAT clause clickhouse-js appends, and asserts what HyperDX reads: meta
names and types, data, rows. Every step crosses the whole edge —
parameters, quoting, the rewrite, the emulated catalog, the macros, the
formats — and the planner's hot tier.

It passed as written, which is what the five layers under it were for.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@chasers
chasers force-pushed the t-495-hyperdx-search-corpus branch from 9300a83 to bc699f5 Compare September 20, 2026 03:11
@chasers
chasers merged commit aa427e5 into main Sep 20, 2026
17 of 18 checks passed
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