Repository navigation
Sync with upstream @hyperdx/app@2.46.0 (rebased) - #9
Open
mfroembgen wants to merge 55 commits into
Open
mfroembgen wants to merge 55 commits into
mfroembgen wants to merge 55 commits into
Conversation
## Summary Upgrades ClickHouse from 26.8.36.3 to 26.10.3.7 and updates the tests that assumed the 26.8 TimeSeries layout. Needed for PromQL label lookups through ClickHouse's Prometheus HTTP API (26.9+). - Pins `26.10.3.7` in the four compose files (incl. e2e) and the all-in-one `Dockerfile`. - `metadata.int.test.ts`: pins the `getTimeSeriesTableColumns` tables to `version = 7` (26.10 defaults to version 8, which moves `min_time`/`max_time` out of the tags table), expects the renamed `metric_family` column, and adds `getTimeSeriesTableVersion` coverage. - `timeseriesEngine.int.test.ts`: the version 8 suite fails instead of silently skipping. - `seed-clickhouse.ts`: the e2e PromQL seed writes to `samples` (new tables have no `time_series` column). No production code changes were needed. On an existing volume, `system.metric_log` history moves to `system.metric_log_0`. Local otel smoke tests need `clickhouse-client` 26.9+. ### References - Linear Issue: part of HDX-5420
…ckHouse#3634) ## Summary `clickstack_service_health` no longer tells the agent whether a service is critical, degraded or healthy. A healthy service used to get "report this service as steady, no action needed". That verdict comes from service-wide totals, so a regression confined to one endpoint, pod or attribute segment can sit under every threshold while the tool tells the agent to stop looking. In the `deploy-regression` eval, main calls the service with the bug "Healthy". Each service now carries only evidence: | | Before | After | |---|---|---| | Per-service field | `status: critical / degraded / healthy` | removed; `flags` and `score` stay | | Summary, nothing crossed | `Healthy: … normal variance; report this service as steady, no action needed.` | `No metric crossed a threshold vs yesterday: error rate 0.50% vs 0.49%, p95 120ms vs 115ms, requests 3000 vs 2900.` | | Summary, threshold crossed | `CRITICAL: error rate 8.00% vs 0.50%.` | `Crossed thresholds: error rate 8.00% vs 0.50%.` | | Report summary | `statusCounts: {critical, degraded, healthy}` | `servicesFlagged` | | Ordering | status, then new errors, then score | threshold-flagged services, then the rest; within each, new or growing errors first, then score | | Span attributes | `mcp.service_health.critical_count`, `degraded_count` | `mcp.service_health.flagged_count` | The tool description and `usage` now say that thresholds apply to service-wide totals and point to `clickstack_table` breakdowns before a service is ruled out. "No flags is a valid result for a routine check" stays, so status reports are not pushed into escalating. `statusCounts` and per-service `status` are gone from the response. Both are MCP output read by agents; nothing else in the repo consumes them. ## Evals A/B with `packages/hdx-eval`: branch (slot 99) vs `main` (slot 98), both built from `02f6fd060`, identical seeded data, `claude-opus-4-6`. | Scenario | Runs/arm | Branch | Main | Δ | Tool calls (branch / main) | |---|---|---|---|---|---| | `service-health-check` | 3 | 76% | 75% | +1 | 7.7 / 5.7 | | `error-root-cause` | 3 | 99% | 98% | +1 | 10.3 / 9.0 | | `segmented-regression` | 8 | 75.5% | 71.6% | +3.9 | 14.9 / 17.1 | | `deploy-regression` | 8 | 70.3% | 74.6% | −4.3 | 15.6 / 13.9 | | `quiet-saturation` | 8 | 84.3% | 88.8% | −4.5 | 19.1 / 16.8 | | **Average** | | **81.0%** | **81.6%** | **−0.6** | | The change is neutral on scores. Per-run spread within an arm is 15–20 points, so no difference is significant (the largest has t ≈ 1); `segmented-regression` went from −11 after 3 runs to +13 over the next 5. Routine checks did not get more alarmist: the judge scored `service-health-check` 8 points higher on the branch. Its regex false-alarm checks scored it lower, but they mostly match negated phrases such as "not ongoing" and "not escalation-worthy". Agents make a few more tool calls in most scenarios once the tool stops saying "no action needed". ### How to reproduce **Starting point:** local full stack (`yarn dev`) with trace data, and an MCP client such as `npx @modelcontextprotocol/inspector` connected to the local MCP endpoint (see `MCP.md`). **On `main`:** 1. Call `clickstack_list_sources` and copy a `kind: "trace"` source ID. 2. Call `clickstack_service_health` with `{ "sourceId": "<id>" }`. 3. Each service has a `status`, and steady services read "Healthy: … no action needed." **On this branch:** 1. Repeat the call. 2. There is no `status` field. Summaries state the crossed thresholds or the current vs comparison values, and `summary.servicesFlagged` replaces `statusCounts`. ### How to test on Vercel preview N/A — non-UI change. ### References - Linear Issue: HDX-5877 - Related PRs: ClickHouse#3411 (added `clickstack_service_health`)
…3639) ## Summary `clickstack_save_webhook` and `clickstack_save_alert` now declare `openWorldHint: true`. Neither makes a network call during the tool call, but a saved webhook points at a third-party endpoint (Slack, incident.io, or any public URL with a templated body), and a saved alert sends requests to it on a schedule. Declaring them closed-world told MCP clients they could skip the extra review they give tools that reach outside the system. That review matters here: a prompt-injected agent could create a generic webhook to an attacker URL plus a frequently firing alert, and use them to exfiltrate telemetry. Every other tool stays closed-world. `clickstack_delete_webhook` stays closed-world too, since deleting only stops deliveries. A new test pins the open-world set to exactly these two tools. Flagged by an MCP tool-annotation compatibility check. ### How to reproduce **Starting point:** local `yarn dev` (needs the API). **On `main`:** 1. Call `tools/list` on the MCP server (`/api/mcp`). 2. `clickstack_save_webhook` and `clickstack_save_alert` report `annotations.openWorldHint: false`. **On this branch:** 1. Same call: both report `openWorldHint: true`, and all other tools still report `false`. 2. `cd packages/api && yarn ci:unit src/mcp/__tests__/toolAnnotations.test.ts` passes. ### Notes Committed with `--no-verify`. lint-staged passed. The hook's knip step fails on an issue already on `main`: `@opentelemetry/browser-sdk` is declared in `packages/app/package.json` (added in ClickHouse#3575) but never imported.
Bumps [hono](https://github.com/honojs/hono) from 4.13.13 to 4.13.16. e notes</summary> <p><em>Sourced from <a href="https://github.com/honojs/hono/releases">hono's releases</a>.</em></p> <blockquote> <h2>v4.13.16</h2> <h2>Security fixes</h2> <p>This release includes fixes for the following security issues:</p> <h3><code>mount()</code> and <code>app.mount()</code> can forward a path that bypasses middleware scoped inside the mount prefix</h3> <p>Affects: <code>mount()</code> in <code>hono/mount</code> and <code>app.mount()</code>. A dynamic prefix such as <code>/api/:tenant/*</code> was removed by the length of the route pattern. The forwarded path was also re-normalized by the URL parser, so a decoded <code>\</code> became <code>/</code> and <code>..</code> collapsed. Both let a crafted request skip middleware scoped inside the mount prefix. Routes such as <code>/assets*</code> and duplicate parameter names now throw. GHSA-4m76-xfj5-7975</p> <h3>RegExpRouter skips wildcard middleware for certain route patterns and for paths with an encoded line terminator</h3> <p>Affects: <code>RegExpRouter</code>, including the default <code>SmartRouter</code>. Wildcard middleware was not applied in three cases: a parameter written as <code>{[^/]+}</code> in the middleware path only, a <code>/prefix*</code> route next to <code>/prefix/*</code> middleware, and a path with an encoded line terminator. RegExpRouter now covers the same routes as the other routers. Custom patterns that can match the empty string, such as <code>{[0-9]*}</code>, throw <code>UnsupportedPathError</code>. Regenerate <code>PreparedRegExpRouter</code> data. GHSA-h7mg-cq63-vhpq</p> <h3><code>validator('form')</code> skips validation for <code>multipart/form-data</code> requests with extra parameters</h3> <p>Affects: <code>validator('form')</code> in <code>hono/validator</code>. A <code>multipart/form-data</code> request with an extra parameter such as <code>charset</code> was not recognized as a form. The validator then saw an empty object while the handler could read all fields. GHSA-4h7h-rv7c-7m2v</p> <h3><code>css</code> helper does not escape a closing tag assembled from template parts and values, allowing HTML injection</h3> <p>Affects: <code>css</code> in <code>hono/css</code>. A <code></style></code> split between the template and a value, or between two values, was not escaped. Closing tags are now escaped after minification. GHSA-3gg2-335m-rxc6</p> <h3><code>csrf()</code> does not check requests sent by hyperlink auditing (<code>text/ping</code>)</h3> <p>Affects: <code>csrf()</code> in <code>hono/csrf</code>. A POST sent by Chromium's <code><a ping></code> has the content type <code>text/ping</code> and was not checked against <code>Origin</code> and <code>Sec-Fetch-Site</code>. GHSA-46wx-v44x-9hh2</p> <hr /> <p>Users who rely on path-scoped middleware with <code>mount()</code>, wildcard middleware with the default router, <code>validator('form')</code>, the <code>css</code> helper with untrusted values, or <code>csrf()</code> are strongly encouraged to upgrade to this version.</p> <h2>What's Changed</h2> <ul> <li>fix(jwt): reject a signature segment outside the base64url alphabet and a header with <code>crit</code> in <a href="https://redirect.github.com/honojs/hono/pull/5597">honojs/hono#5597</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/honojs/hono/compare/v4.13.15...v4.13.16">https://github.com/honojs/hono/compare/v4.13.15...v4.13.16</a></p> <h2>v4.13.15</h2> <h2>What's Changed</h2> <ul> <li>fix(auth): escape backslashes in the WWW-Authenticate realm by <a href="https://github.com/yusukebe"><code>@yusukebe</code></a> in <a href="https://redirect.github.com/honojs/hono/pull/5590">honojs/hono#5590</a></li> <li>docs(contributing): drop the note about linking a fork branch by <a href="https://github.com/yusukebe"><code>@yusukebe</code></a> in <a href="https://redirect.github.com/honojs/hono/pull/5593">honojs/hono#5593</a></li> <li>fix(context): allow <code>c.header()</code> after the response body is consumed by <a href="https://github.com/yusukebe"><code>@yusukebe</code></a> in <a href="https://redirect.github.com/honojs/hono/pull/5587">honojs/hono#5587</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/honojs/hono/compare/v4.13.14...v4.13.15">https://github.com/honojs/hono/compare/v4.13.14...v4.13.15</a></p> <h2>v4.13.14</h2> <h2>What's Changed</h2> <ul> <li>docs(contributing): ask for issues instead of RPs <a href="https://redirect.github.com/honojs/hono/pull/5526">honojs/hono#5526</a></li> <li>docs(readme): sync the contributing list with CONTRIBUTING.md <a href="https://redirect.github.com/honojs/hono/pull/5527">honojs/hono#5527</a></li> <li>fix(adapters): accept Hono v5 prereleases in the <code>hono</code> peer range <a href="https://redirect.github.com/honojs/hono/pull/5537">honojs/hono#5537</a></li> <li>chore: unified oxfmt and oxlint config <a href="https://redirect.github.com/honojs/hono/pull/5518">honojs/hono#5518</a></li> <li>docs(readme): remove the deepwiki badge <a href="https://redirect.github.com/honojs/hono/pull/5548">honojs/hono#5548</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/honojs/hono/commit/c91b60a251186fb024557c6d55a11d8e388f179c"><code>c91b60a</code></a> 4.13.16</li> <li><a href="https://github.com/honojs/hono/commit/e1dd58856eea8c3e91494ca6a12578325b01cf46"><code>e1dd588</code></a> fix(jwt): reject a signature segment outside the base64url alphabet and a hea...</li> <li><a href="https://github.com/honojs/hono/commit/bf16471913b5199212dac33f5d170f94745dd26a"><code>bf16471</code></a> Merge commit from fork</li> <li><a href="https://github.com/honojs/hono/commit/d88fab372415277a9e540e895650943dd08eef4a"><code>d88fab3</code></a> Merge commit from fork</li> <li><a href="https://github.com/honojs/hono/commit/34f90432a1794b28e52802670efcd01963f716d6"><code>34f9043</code></a> Merge commit from fork</li> <li><a href="https://github.com/honojs/hono/commit/8a103aa59bcfbffd5396b1548a0dff3688777c36"><code>8a103aa</code></a> Merge commit from fork</li> <li><a href="https://github.com/honojs/hono/commit/15bbd96ad1b62a0b189db4fd8dc7bf8ef280c513"><code>15bbd96</code></a> Merge commit from fork</li> <li><a href="https://github.com/honojs/hono/commit/3cb29de8f110654c37aa9b4c7eccdeae5254f5f2"><code>3cb29de</code></a> 4.13.15</li> <li><a href="https://github.com/honojs/hono/commit/17ad0e21f5a91c939eeafa3df05793a8ea60f016"><code>17ad0e2</code></a> fix(context): allow <code>c.header()</code> after the response body is consumed (<a href="https://redirect.github.com/honojs/hono/issues/5587">#5587</a>)</li> <li><a href="https://github.com/honojs/hono/commit/ee88684625077a2cd0e2f4613e593e2635ffe4c7"><code>ee88684</code></a> docs(contributing): drop the note about linking a fork branch (<a href="https://redirect.github.com/honojs/hono/issues/5593">#5593</a>)</li> <li>Additional commits viewable in <a href="https://github.com/honojs/hono/compare/v4.13.13...v4.13.16">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/ClickHouse/ClickStack/network/alerts). </details>
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @hyperdx/api@2.45.0 ### Minor Changes - 2d17de5: feat: serve PromQL label lookups from ClickHouse's Prometheus HTTP API On ClickHouse 26.9+ with the `prometheus_api_v1` handler, `/labels` and `/label/:name/values` for a ClickHouse-backed PromQL source now proxy to the handler instead of querying the TimeSeries tags table with SQL. Older servers, servers without the handler, and sources set to `table-function` keep the SQL path, so a source that runs queries over HTTP on 26.6-26.8 still gets label autocomplete. - db4e7ba: chore: upgrade bundled ClickHouse to 26.10.3.7 The all-in-one image and the Docker Compose files now use `clickhouse/clickhouse-server:26.10.3.7-alpine`. New TimeSeries tables default to schema version 8, which keeps each series' time range in a separate inner table; existing tables keep their layout. `system.metric_log` switches to the bucketed schema, and rows from before the upgrade move to `system.metric_log_0`. ### Patch Changes - c17fc16: fix: `{{note}}` in webhook bodies now contains the alert's note when the alert fires, not only in "Send test" - 1fba1c3: fix: mark the MCP `clickstack_save_webhook` and `clickstack_save_alert` tools as open-world Saved webhooks and alerts send HTTP requests to third-party endpoints, so both tools now declare `openWorldHint: true`. - 7b03880: feat: read the MCP PromQL label catalog from ClickHouse's Prometheus HTTP API `describe_source` on a ClickHouse-backed PromQL source now lists label and metric names through the `prometheus_api_v1` handler on ClickHouse 26.9+, and falls back to SQL on older servers, servers without the handler, and sources set to `table-function`. - ac913ce: feat: Choose how a PromQL source on ClickHouse is evaluated (the Prometheus HTTP API or the `prometheusQuery` table functions) instead of probing the server on every query. Without a choice the server is still probed, but the answer is now kept for 5 minutes. A source set to the HTTP API against a server that does not serve it fails with a clear error. Onboarding pins a PromQL source it detects to the HTTP API when the server serves it. - 7cfd333: fix(mcp): drop the health verdict from clickstack_service_health The tool no longer labels services critical, degraded or healthy, and no longer tells agents a service needs "no action". Each service keeps its threshold flags, score and a factual summary, so agents reason from the numbers instead of a verdict that service-wide totals can get wrong. `summary.statusCounts` is replaced by `summary.servicesFlagged`, and the span attributes `mcp.service_health.critical_count` and `mcp.service_health.degraded_count` are replaced by `mcp.service_health.flagged_count`. - Updated dependencies [2d17de5] - Updated dependencies [ac913ce] - @hyperdx/common-utils@0.35.0 ## @hyperdx/app@2.45.0 ### Minor Changes - b3cbd02: feat: split the service map by up to 3 extra group-by SQL expressions (for example `ResourceAttributes['k8s.pod.name']`), so a node is a service plus those values and a slow or failing pod is no longer averaged into its service. ### Patch Changes - ac913ce: feat: Choose how a PromQL source on ClickHouse is evaluated (the Prometheus HTTP API or the `prometheusQuery` table functions) instead of probing the server on every query. Without a choice the server is still probed, but the answer is now kept for 5 minutes. A source set to the HTTP API against a server that does not serve it fails with a clear error. Onboarding pins a PromQL source it detects to the HTTP API when the server serves it. - Updated dependencies [c17fc16] - Updated dependencies [1fba1c3] - Updated dependencies [7b03880] - Updated dependencies [2d17de5] - Updated dependencies [ac913ce] - Updated dependencies [7cfd333] - Updated dependencies [db4e7ba] - @hyperdx/api@2.45.0 - @hyperdx/common-utils@0.35.0 ## @hyperdx/common-utils@0.35.0 ### Minor Changes - 2d17de5: feat: serve PromQL label lookups from ClickHouse's Prometheus HTTP API On ClickHouse 26.9+ with the `prometheus_api_v1` handler, `/labels` and `/label/:name/values` for a ClickHouse-backed PromQL source now proxy to the handler instead of querying the TimeSeries tags table with SQL. Older servers, servers without the handler, and sources set to `table-function` keep the SQL path, so a source that runs queries over HTTP on 26.6-26.8 still gets label autocomplete. ### Patch Changes - ac913ce: feat: Choose how a PromQL source on ClickHouse is evaluated (the Prometheus HTTP API or the `prometheusQuery` table functions) instead of probing the server on every query. Without a choice the server is still probed, but the answer is now kept for 5 minutes. A source set to the HTTP API against a server that does not serve it fails with a clear error. Onboarding pins a PromQL source it detects to the HTTP API when the server serves it. ## @hyperdx/otel-collector@2.45.0
## Summary Bump `uuid` in `packages/api` from 8.3.2 to 11.1.1 and drop `@types/uuid`. - uuid 8.3.2 is flagged by [GHSA-w5hq-g745-h8pq](GHSA-w5hq-g745-h8pq), fixed in 11.1.1. - uuid 11 ships its own TypeScript types, so `@types/uuid` is no longer needed. - The api only uses `v4` (`import { v4 as uuidv4 } from 'uuid'`), whose import and behavior are unchanged. uuid 11 still provides a CommonJS build, so `require` and ts-jest keep working. ### How to test locally or on Vercel 1. `yarn install` 2. `cd packages/api && npx tsc --noEmit`: passes. 3. `yarn ci:unit`: 80 suites, 1525 tests pass. I did not run the integration tests. The code paths that generate IDs (team and user creation, the access-key migration) call the same `v4` function. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
…House#3677) ## Summary Move the `@opentelemetry/sdk-trace-base` dev dependency in `packages/api` from `^1.30.1` to `^2.8.0`. - The api's other OpenTelemetry packages (`@opentelemetry/core`, `@opentelemetry/resources`) are already on 2.x, and the tree already resolves `sdk-trace-base` 2.12.0. The new range reuses that copy. - The 1.x range pulled in a second copy of `core`, `resources`, `sdk-trace-base` and `semantic-conventions`. Removing it also removes `@opentelemetry/core` 1.30.1, which is flagged by [GHSA-8988-4f7v-96qf](GHSA-8988-4f7v-96qf) (fixed in 2.8.0). - Its only user is `src/utils/__tests__/aiTelemetry.test.ts`, which already passes span processors through the constructor, the API 2.x requires. No code changes needed. ### How to test locally or on Vercel 1. `yarn install` 2. `cd packages/api && npx tsc --noEmit`: passes. 3. `npx jest src/utils/__tests__/aiTelemetry.test.ts`: 6 tests pass. Dev dependency only, so no changeset. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
…lickHouse#3679) ## Summary Add `resolutions` floors for advisories that `yarn npm audit` reports in transitive dependencies. Each floor stays within the major version the consumer requested, so no package is moved to a new major. | Resolution | Clears | | :-- | :-- | | `lodash` → 4.18.1 | GHSA-r5fr-rjxr-66jc, GHSA-f23m-r3pf-42rh (`~4.17.x` consumers were on 4.17.23) | | `qs` → `^6.16.0` | GHSA-4mjr-xmp4-gh2g, GHSA-6pq8-jhm2-2vcw, GHSA-q8mj-m7cp-5q26, GHSA-x5fp-wj9c-mxmx | | `minimatch` 3.x / 8.x / 9.x / 10.x descriptors | GHSA-23c5-xmqv-rm74, GHSA-3ppc-4f35-3m26, GHSA-7r86-cg39-jmmj | | `picomatch@^4.0.2`, `^4.0.3` → `^4.0.4` | GHSA-3v7f-55p6-f55p, GHSA-c2c7-rcm5-vvqj | | `protobufjs` → `^7.6.3` | GHSA-f38q-mgvj-vph7, GHSA-j3f2-48v5-ccww | | `@hono/node-server` → `^1.19.13` | GHSA-jpvv-r467-5p4w | | `smol-toml@1.6.1` → `^1.8.0`, plus a refreshed `^1.6.1` lock entry | GHSA-7w5x-hrqm-74c2, GHSA-r4xh-jqrq-34v2 | Before and after `yarn npm audit -A -R`: 14 advisories cleared, none added. Not covered here, because the fix needs a new major or a direct dependency bump: minimatch GHSA-g3hv-75wg-m249 (needs 11.x), `@hono/node-server` GHSA-rmxm-3fg6-px4f (needs 2.x), and the advisories on direct dependencies such as `axios` and `@modelcontextprotocol/sdk`. ### How to test locally or on Vercel 1. `yarn install` 2. `yarn npm audit -A -R`: the advisories in the table no longer appear. 3. `make ci-lint` and `make ci-unit`: both pass. Root manifest and lockfile only, so no changeset. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
…lickHouse#3668) ## Summary On a deployment with about 2,900 alerts, one check-alerts tick took about 3 minutes, with the worker's Node thread at 100% CPU. One-minute alerts were evaluated every 3 to 4 minutes, so every notification was late. The default provider hands every alert in a tick the same `previousMap`. That map holds the latest history of every group of every alert. Each alert then scans it in full: once in `shouldSkipAlertCheck` (about 21 ms per alert on that deployment), and again in `getAlertEvaluationDateRange`, the empty-bucket check and the missing-group loop. Tick CPU grew with alerts times total groups. This PR adds `partitionPreviousMapsByAlert` and calls it once in `CheckAlertTask.execute()`, right after `getAlertTasks()`: - It walks each distinct map once and gives every alert a map that holds only its own entries (key `alertId` or `alertId||group`). Alerts with no history get an empty map. - Keys and values are unchanged, so no reader changes. `recentHistoryMap` is left alone because it is only read with `.get()`. - It runs in the task, not the loader, so it covers every `AlertProvider`. - The input is not mutated. Side effect: on `main`, the empty-bucket check (`previousMap.values().some(...)`) and the missing-group loop read entries of other alerts. As far as I can tell from the code (not reproduced), a grouped alert could write a spurious OK history for group `''` when a different alert was ALERT or PENDING. With per-alert maps that no longer happens on the task path. Callers that pass a shared map straight to `processAlert` behave as before. Not in this PR: reading less history from the database (ClickHouse#3508 and ClickHouse#3509). ### How to reproduce **Starting point:** a local checkout. The change is in the check-alerts worker and has no UI. **On `main`:** 1. Add the `should pass each alert only its own previous history` test from this PR, with its `buildHistory` and `buildPartitionTask` helpers, to `packages/api/src/tasks/checkAlerts/__tests__/checkAlertsTask.test.ts`. 2. From `packages/api`, run `yarn ci:unit src/tasks/checkAlerts/__tests__/checkAlertsTask.test.ts`. It fails: both alerts receive all three history entries. **On this branch:** 1. Run the same command. All 13 tests pass, and each alert receives only its own entries. 2. `make dev-int FILE="checkAlerts.int.test --testNamePattern=shared.by.every.alert"` runs two integration tests that split a shared map and evaluate a grouped alert for real while another alert is ALERT. Both fail if the map reaches `processAlert` unsplit: one gets an extra empty-group OK history, the other records 1 of its 3 empty buckets. 3. `make dev-int FILE=checkAlerts` passes. ### How to test on Vercel preview N/A — non-UI change. ### References - Linear Issue: https://linear.app/clickhouse/issue/HDX-6022/check-alerts-tick-is-cpu-bound-every-alert-scans-the-shared-group - Related PRs: ClickHouse#3509. Related issue: ClickHouse#3508 (history read cost, not fixed here)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Bumps [next](https://github.com/vercel/next.js) from 16.4.3 to 16.4.5. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/vercel/next.js/releases">next's releases</a>.</em></p> <blockquote> <h2>v16.4.5</h2> <p>This release contains security fixes for the following advisories:</p> <h2>Moderate</h2> <ul> <li><a href="https://github.com/vercel/next.js/security/advisories/GHSA-mfr8-8qww-v76h">Cross-tenant sensitive information disclosure in Next.js 'use cache' when called through unstable_cache</a></li> <li><a href="https://github.com/vercel/next.js/security/advisories/GHSA-vc7v-qv4w-wrv8">Cache leak across root param values in nested 'use cache' functions (follow-up)</a></li> <li><a href="https://github.com/vercel/next.js/security/advisories/GHSA-vvgp-ww4w-46vf">Cache poisoning of shared fallback shells in Cache Components via request-supplied placeholder route params</a></li> <li><a href="https://github.com/vercel/next.js/security/advisories/GHSA-rhh4-g77r-r9qj">Cross-user cache disclosure and poisoning in Next.js use cache with binary arguments</a></li> <li><a href="https://github.com/vercel/next.js/security/advisories/GHSA-pc58-hwjq-p385">Cross-client response injection and disclosure in self-hosted Next.js applications forwarding fetched responses</a></li> <li><a href="https://github.com/vercel/next.js/security/advisories/GHSA-7qx7-33qx-rqx2">SVG rejection bypass in Next.js image optimization</a></li> <li><a href="https://github.com/vercel/next.js/security/advisories/GHSA-f3mh-rxg3-f5g2">HttpOnly cookie exposure through internal response header on Next.js Edge runtime routes</a></li> </ul> <h2>v16.4.4</h2> <blockquote> <p>[!NOTE] This release is backporting bug fixes. It does <strong>not</strong> include all pending features/changes on canary. The <a href="https://nextjs.org/blog/upcoming-nextjs-security-release-november-2026">announced security released for November</a> will be published tomorrow.</p> </blockquote> <h3>Core Changes</h3> <ul> <li>[lts-active] test: disable the <code>reads fallback params after a client navigation</code> deployment test (<a href="https://redirect.github.com/vercel/next.js/issues/100668">#100668</a>)</li> <li>[lts-active] Reload on missed Turbopack startup CSS updates (<a href="https://redirect.github.com/vercel/next.js/issues/100619">#100619</a>)</li> <li>[lts-active] Revert "Optimize strict module factory chunks (<a href="https://redirect.github.com/vercel/next.js/issues/98421">#98421</a>)" (<a href="https://redirect.github.com/vercel/next.js/issues/100866">#100866</a>)</li> <li>[lts-active] Emit the Turbopack shared-runtime bootstrap in the PPR resume so it gets the CSP nonce (<a href="https://redirect.github.com/vercel/next.js/issues/100907">#100907</a>)</li> <li>[lts-active] [ci] Pin deploy test deployments to Node.js 22.x (<a href="https://redirect.github.com/vercel/next.js/issues/100886">#100886</a>)</li> <li>[lts-active] fix(analyze): use route summaries as the analyzer route index (<a href="https://redirect.github.com/vercel/next.js/issues/100974">#100974</a>)</li> <li>[lts-active] Use fast-jwt instead of jsonwebtoken (<a href="https://redirect.github.com/vercel/next.js/issues/100885">#100885</a>)</li> </ul> <h3>Credits</h3> <p>Huge thanks to <a href="https://github.com/icyJoseph"><code>@icyJoseph</code></a>, <a href="https://github.com/mischnic"><code>@mischnic</code></a>, <a href="https://github.com/wbinnssmith"><code>@wbinnssmith</code></a>, <a href="https://github.com/lukesandberg"><code>@lukesandberg</code></a>, and <a href="https://github.com/eps1lon"><code>@eps1lon</code></a> for helping!</p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/vercel/next.js/commit/4e5335a00314be7fbb2aace5e9be56a88e64e5a8"><code>4e5335a</code></a> v16.4.5</li> <li><a href="https://github.com/vercel/next.js/commit/809be725f033ec7aa4c658ba2b7a084cb039d1f2"><code>809be72</code></a> [lts-active] Strip internal middleware cookie headers from edge responses (<a href="https://redirect.github.com/vercel/next.js/issues/282">#282</a>)</li> <li><a href="https://github.com/vercel/next.js/commit/2842833be3a5a1e5fef0c5fb8c96df74742eef2a"><code>2842833</code></a> [lts-active] Fix stale compressed framing for forwarded fetch responses (<a href="https://redirect.github.com/vercel/next.js/issues/281">#281</a>)</li> <li><a href="https://github.com/vercel/next.js/commit/6596840a0fa3c2633735b05e41ca3d9ab01ece41"><code>6596840</code></a> [lts-active] [use cache] Fix cache key when binary args are used (<a href="https://redirect.github.com/vercel/next.js/issues/280">#280</a>)</li> <li><a href="https://github.com/vercel/next.js/commit/18eeffb5fabd91911852d44cf56948b3f2cbee04"><code>18eeffb</code></a> [lts-active] Fix shared shell poisoning from request-supplied placeholder par...</li> <li><a href="https://github.com/vercel/next.js/commit/e66e656e7d423a828bdca5f87e82cef7038c57a6"><code>e66e656</code></a> [lts-active] [next/image] Fix false-positive AVIF/HEIC detection (<a href="https://redirect.github.com/vercel/next.js/issues/278">#278</a>)</li> <li><a href="https://github.com/vercel/next.js/commit/d605874e5a4b8b6b7dca1b6e07bcabb44d0e2e5b"><code>d605874</code></a> [lts-active] Fix <code>unstable_cache</code> leaking cold <code>'use cache'</code> fills across roo...</li> <li><a href="https://github.com/vercel/next.js/commit/80c96ede21798d4ad54da12fe50d5b00a09b06e3"><code>80c96ed</code></a> [lts-active] Fix outer <code>'use cache'</code> entries reused across root param values ...</li> <li><a href="https://github.com/vercel/next.js/commit/b175f52b05a5f6c6c39ca72565ea178542be323b"><code>b175f52</code></a> v16.4.4</li> <li><a href="https://github.com/vercel/next.js/commit/ba4a4c161b982c615f5be9d50fe60732f3951add"><code>ba4a4c1</code></a> [lts-active] Use fast-jwt instead of jsonwebtoken (<a href="https://redirect.github.com/vercel/next.js/issues/100885">#100885</a>)</li> <li>Additional commits viewable in <a href="https://github.com/vercel/next.js/compare/v16.4.3...v16.4.5">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/ClickHouse/ClickStack/network/alerts). </details>
) ## Summary Adding a `1m` option in non-dev environments for tile alert windows. Not sure if it was intentional to make this dev-only, but it'd be really nice for us to be able to use 1m as the window, because in conjunction with consecutive windows, this allows us to do something like 1m window over 5 consecutive windows, which AFAICT is a stricter condition than a single 5m window (1 consecutive), because we'd get 5 samples instead of aggregating across the entire window into one big sample (which means a very noisy single minute could trip a 5m window alert, but maybe not the second minute of five 1m window alerts). Not sure if this reasoning makes sense, so happy to explain more, and thanks! Wasn't sure if a frontend-only change required a changeset, etc. or not - happy to add that
…lert (ClickHouse#3694) ## Summary `clickstack_save_alert` can't set an alert's `note` or `numConsecutiveWindows`, although the alert model, the UI and the external API support both and `clickstack_get_alert` returns them. So an alert created through MCP always fires on its first window, and any update through MCP clears a note or window count that someone set in the UI. This PR adds both fields to the tool's input schema and passes them through on create and update. Validation reuses `alertNoteSchema`, and a new shared `alertNumConsecutiveWindowsSchema` (integer ≥ 1) in `common-utils` replaces the rule's inline copies in the external API, the MCP tool and the alert forms. **One design decision to review.** On update, an omitted `note` or `numConsecutiveWindows` keeps the stored value, and `null` clears it. This is the tool's existing `scheduleStartAt` rule, not the replace rule that `name` and `message` keep. Callers written before these fields existed don't send them, so replace semantics would keep wiping values set in the UI. To do this, the update path loads the existing alert first, so an unknown `id` now returns "Alert not found" before the referenced entities are validated. The tool description is updated to match. **Tests.** New integration tests in `packages/api/src/mcp/__tests__/alerts.int.test.ts` cover create with both fields and with neither (stored as `null`), rejecting `numConsecutiveWindows: 0` and an empty or over-long `note`, and an update that omits (keeps), sets (replaces) and nulls (clears) them. The file passes locally; `tsc --noEmit` passes for `common-utils`, `api` and `app`, and eslint reports no errors on the touched files. ### How to reproduce **Starting point:** `yarn dev` (the change needs the API), with one saved search, one webhook, and an MCP client connected to `/api/mcp`. **On `main`:** 1. In the UI, edit an alert on the saved search: add a note and set **Advanced settings → consecutive windows** to 3. 2. Call `clickstack_save_alert` with that alert's `id` and its current threshold, interval, source and channel. 3. `clickstack_get_alert` returns `note: null` and `numConsecutiveWindows: null`. Passing either field in step 2 changes nothing. **On this branch:** 1. Repeat steps 1–3: the note and the window count are kept. 2. Pass `note` or `numConsecutiveWindows` to `clickstack_save_alert` on create or update: the value is stored. Pass `null` on update: it is cleared. ### How to test on Vercel preview N/A — non-UI change (MCP tool in `packages/api`). ### References - Linear Issue: N/A. I found no existing GitHub issue for this. - Related PRs: none
Triggered by [comment](ClickHouse#3694 (comment)) from @brandon-pereira. Vouch: @igor-kupczynski
…3681) ## Summary Closes ClickHouse#2355. A log source can define `bodyExpression` without a separate `implicitColumnExpression`. Bare-text Lucene searches already fall back to that body field in the UI, but several MCP and alert query builders omit it, so the same search fails there. This passes the log source's body expression through MCP builder queries, raw SQL tile hydration, pattern sampling/counting and drill-down filters, event-deltas sampling, and alert alias rendering. Notification samples already use the shared search-config builder; the new tests cover that path too. The existing serializer still decides which field to search. An explicit implicit column keeps priority, and trace sources receive no body fallback. There are no API or schema changes. ### How to reproduce **Starting point:** a local checkout with the integration-test services (`make dev-int-build` followed by `make dev-int`), or a full `yarn dev` stack. This requires the API; the frontend-only demo cannot exercise these paths. **On `main`:** 1. Configure a log source with `bodyExpression: Body` and no `implicitColumnExpression`. 2. Insert one log whose Body contains `needle`, plus another whose ServiceName contains `needle` but whose Body does not. 3. Call `clickstack_search` with `where: needle`, `whereLanguage: lucene`, and a time range covering those logs. It fails with “Can not search bare text without an implicit column set.” The pattern/comparison tools and saved-search alert alias rendering have the same gap. **On this branch:** 1. Repeat the search. It returns the body-matching row. 2. Set the source's implicit column to ServiceName and repeat it. The ServiceName-matching row is returned instead. 3. Run `make dev-int FILE=bodyExpressionFallback`: all 14 cases pass, including rejection when neither search field is configured and unchanged trace behavior. ### Tests Run in a Node 22 container with MongoDB 5.0.32 and ClickHouse 26.10.3.7: - `yarn lint:fix` - `yarn lint-staged` - `make ci-lint` - `make ci-unit` - Affected integration suites: **168 tests passed**, including the 14 fallback cases. These cover absent/empty implicit columns, explicit-column precedence, map-valued body expressions, raw SQL source hydration and filtered rows, pattern counts and drill-downs, both comparison windows, alert aliases, notification samples, rejection without either search field, and unchanged trace behavior. The integration command used was: ```sh cd packages/api yarn ci:int src/mcp/__tests__/queryTool.int.test.ts \ src/mcp/__tests__/deltasTool.int.test.ts \ src/mcp/__tests__/emergingSignalsTool.int.test.ts \ src/mcp/__tests__/dashboards/queryTile.int.test.ts \ bodyExpressionFallback.int.test.ts ``` ### Risks and limitations This changes previously failing bare-text filters on body-only log sources into working body searches in the listed paths. It reuses existing expression rendering and adds no SQL parser or new query endpoint. The raw SQL test executes the MCP-hydrated config with a Lucene filter against ClickHouse at the query-client boundary: `query_tile` currently exposes variables but no runtime dashboard-filter input. The full integration and browser E2E suites were not run. The pre-existing omissions in tile/inline-alert evaluation and denoise queries remain separate follow-ups. This PR follows the issue's named call sites and the repository's review-scope rules. ### How to test on Vercel preview N/A — API-only change. ### References - Issue: ClickHouse#2355 - Original UI fallback: ClickHouse#2354
…e#3646) ## Summary Line colours on panels are assigned by series position, and ClickHouse returns groups in a different order as the time window moves, based on which blocks were processed at that particular point in time. This PR resolves by sorting the series alphabetically first, and then assigning the colour based on the now sorted alphabetical sorted list. Refreshing a graph now keeps the series colours consistent. ### Screenshots Before: Here you can see the colours assigned to each series. When reloading a page, or updating the time interval to a new internal, the series colours are assigned at somewhat random order: <img width="720" height="338" alt="image" src="https://github.com/user-attachments/assets/a5263fe2-c02b-4660-bb19-72a31844bdb2" /> After a second refresh: <img width="720" height="341" alt="image" src="https://github.com/user-attachments/assets/f9ad16de-c5df-40a6-b472-ccddc150043c" /> And another refresh: <img width="722" height="338" alt="image" src="https://github.com/user-attachments/assets/702ff142-be25-4310-ab86-9fb6d8d8b7d2" /> After: Now the colours assigned to each series remains the same, no matter how many times you refresh the page or update the time picker. <img width="722" height="344" alt="image" src="https://github.com/user-attachments/assets/a4ce1334-da28-4b2e-8c00-d4e0cae99143" /> ### How to reproduce Before: Open a graph with multiple lines, and change the time picker to "last 15 minutes". Watch the colours selected on the graph. Keep repeating this process and you'll see after a few refreshes that the colours are seemingly assigned in random order to the same series. This is because ClickHouse does not guarantee the order of the returned series. After: Do the same as above, but now the series colours remain the same no matter how many times you refresh. This creates a richer user experience as a user might expect the graph to remain the same colours as they are used.
…s it (ClickHouse#3696) ## Summary The source selector is a searchable Mantine Select, and clicking it puts the caret wherever the pointer lands inside the current label. Typing `Data plane` over `ControlPlane Logs` produces `ControlData planePlane Logs`, the dropdown filters to nothing, and the user has to clear the box by hand before every switch. This PR selects the whole label on the click that focuses the selector, so typing replaces it. **A second click into an already focused selector places the caret as usual**, and Escape or clicking away still restores the previous label. The handlers live in `useSelectAllOnFocus` and only `SourceSelectControlled` uses them, so the aggregation, database, table and filter dropdowns are unchanged. A unit test pins replace-on-click and the second-click caret. ### Screenshots or video Not captured: this change was made without a browser. A short video of click-then-type on the source box shows it best. | Before | After | | :----- | :---- | | <img width="800" height="450" alt="Search---Observability-ezgif com-video-to-gif-converter" src="https://github.com/user-attachments/assets/492957a0-261e-43cf-90d9-4b89dc46531f" /> | <img width="800" height="450" alt="Search---ClickStacknew-ezgif com-video-to-gif-converter" src="https://github.com/user-attachments/assets/4a5847f1-f926-4a5a-9f18-4ea52271efa4" /> | ### How to reproduce **Starting point:** https://play.hyperdx.io/search, or `yarn app:dev:local` connected to the demo server. **On `main`:** 1. Click in the middle of the source selector text (placeholder **Data Source**), between two letters of the current source name. 2. Type `tra`. 3. The box shows the old name with `tra` inserted in the middle and the dropdown has no matching source. **On this branch:** 1. Click anywhere in the source selector text. 2. The whole name is highlighted. Type `tra`. 3. The box shows only `tra` and the dropdown lists the sources whose name or section contains it. 4. Click the box again: the caret lands where you clicked instead of selecting all. 5. Press Escape: the previous source name is back. ### How to test on Vercel preview **Preview routes:** /search **Steps:** 1. Click in the middle of the source selector input with placeholder **Data Source**. 2. Type `tra`. 3. Verify the input value is exactly `tra` and the dropdown lists at least one source whose name contains "Tra". 4. Press Escape and verify the input shows the previously selected source name again. ### References - Linear Issue: n/a - Related PRs: n/a
…me_consuming_ops (ClickHouse#3698) ## Summary Renames the MCP tool `clickstack_trace_top_time_consuming_operations` (46 chars) to `clickstack_trace_top_time_consuming_ops` (39 chars). It was our longest tool name. Some MCP clients cap tool name length (and many prefix the server name on top), so the long name could be truncated or rejected. The shorter name keeps it inside the safe range for most clients. Updates the registration, error message, cross-references in other tool descriptions, integration tests, and `MCP.md`. Historical CHANGELOG entries are left as-is. **Breaking for callers using the old name** — agents discover tools via `tools/list`, so most clients pick up the new name automatically. ### How to reproduce **Starting point:** `yarn dev`, connect an MCP client to the API's `/mcp` endpoint. **On `main`:** 1. List tools; `clickstack_trace_top_time_consuming_operations` is present. **On this branch:** 1. List tools; `clickstack_trace_top_time_consuming_ops` is present and behaves the same. ### How to test on Vercel preview N/A — non-UI change.
…e#3699) ## Summary Stacked bar and stacked line charts could show the same Y-axis label twice. With a "Number" format at 0 decimals and a stack that reaches 2000, the axis rendered `0, 500, 1k, 2k, 2k`, because 1500 rounds to "2k". Line charts already avoid this: `computeYAxisBounds` picks nice ticks and escalates precision when two labels collide. Stacked charts returned early from it and left ticks to Recharts, because the function only scanned per-series values, not stack heights. The label formatter then rounded Recharts' ticks with nothing checking for collisions. This PR: - Adds `scanStackedYAxisValueRange`, which computes the axis extent from each row's running sums. This matches how Recharts stacks with its default `stackOffset="none"` (each series sits on the previous one's top, null counts as 0, zero baseline included). - Sends stacked charts through the same zero-pinned tick path the default line chart uses, so they get the same distinct-label handling. Stacked charts stay pinned at zero whatever the fit-to-data setting, which is documented as line-only. - Leaves stacked charts with a reference line on Recharts' auto ticks, as line charts already do in that branch. That path can still collide, and this PR doesn't change it. ### Screenshots or video Same dashboard tile (raw SQL, stacked bar, 1200 + 800 per bucket, Number format, 0 decimals). | Before | After | | :----- | :---- | |  |  | ### How to reproduce **Starting point:** `yarn app:dev:local` connected to the demo server (onboarding → "Connect to Demo Server"). **On `main`:** 1. Go to Dashboards, create a dashboard, and add a tile. 2. Switch the tile to raw SQL (time series) and enter: `SELECT toStartOfInterval(now() - INTERVAL number MINUTE, INTERVAL {intervalSeconds:Int64} SECOND) AS ts, any(toFloat64(1200)) AS a, any(toFloat64(800)) AS b FROM numbers(60) GROUP BY ts ORDER BY ts` 3. Keep display type as stacked bar. In display settings, set the number format to "Number" with 0 decimals. 4. Set the time range to the last hour and save the tile. The Y axis reads `0, 500, 1k, 2k, 2k`. **On this branch:** 1. Same steps. The Y axis reads `0, 500, 1k, 1.5k, 2k`. ### How to test on Vercel preview **Preview routes:** /dashboards **Steps:** 1. Create a new dashboard and click "Add" to add a tile. 2. Switch the tile to raw SQL time series and enter the SQL from "How to reproduce" above. 3. Choose the stacked bar display type, open display settings, set number format to "Number" with 0 decimals, and save the tile with a "last 1 hour" range. 4. Verify the Y-axis labels are `0, 500, 1k, 1.5k, 2k`, with no label repeated. ### References - Related PRs: ClickHouse#3172, ClickHouse#3162 (earlier distinct-tick work for line charts) <div><a href="https://cursor.com/agents/bc-0cf08a5f-4888-4059-8423-d0a03471108a?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-0cf08a5f-4888-4059-8423-d0a03471108a&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div> Co-authored-by: Cursor Agent <199161495+cursoragent@users.noreply.github.com>
…ickHouse#3662) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…kHouse#3663) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…kHouse#3664) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…House#3665) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…hreads (ClickHouse#3464) ## Summary Today the review bot posts **every** finding it can anchor as an inline thread, at every severity, labelled with its own `critical`/`major`/`minor` self-estimate. Apart from ClickHouse#3138 (triage guidance for the author's agent), the reviewer has not changed since ClickHouse#3024. This PR adds a separate grading pass that assigns each finding a priority, posts only P0–P2 inline, and folds P3 into the sticky summary. It also stops reworded findings from being re-posted as new threads on later pushes. ## Production today vs this PR | | production (`main`) | this PR | |---|---|---| | Label users see | reviewer's own severity: 🔴 critical · 🟠 major · 🔵 minor | priority only: 🔴 P0/P1 · 🟡 P2 · 🔵 P3 (same icons as deep-review) | | Inline threads | every anchored finding | P0–P2 | | Folded into the summary | only `minor` findings that could not be anchored | every P3, anchored or not. Folded, never dropped | | Grading | none | a second pass (Sonnet, `Read` only) grades the finished findings. It cannot add, drop or reword them | | Reworded finding on a later push | opens a new thread (dedup keyed on the exact title) | recognised as the same finding | | Grading fails | n/a | nothing is folded; the review posts exactly as on `main` | ### How a finding's priority is decided (`effectivePriority` in `priority.cjs`) A finding is folded only when **both** graders call it low, and nothing says it matters today: - the reviewer itself labelled it `minor`, **and** - the grading pass put it at P2 or P3, **and** - the grader doesn't say the harm is reachable in the merged code, **and** - it doesn't read as security-related. Neither grader can fold anything on its own: a grader P3 on a finding the reviewer called major or critical is shown as P2. Without a grade, nothing is folded (critical → P0, major → P1, minor → P2). ## Measured against human votes Data: 👍/👎 reactions maintainers left on this bot's inline comments, covering **75 graded findings across 29 PRs** (53 👍, 22 👎) from 4 maintainers. Two kinds of vote are excluded: reactions cast by bots, and "blanket" votes, where one person thumbed ≥10 findings on a PR without a single 👎. The "this PR" column comes from running this branch's `effectivePriority` over the grading pass's output. | | production | this PR | |---|---|---| | Inline threads | 75 / 75 | **49 / 75** | | Folded as P3 | 0 | **26 (35%)** | | 👍 major/critical findings still inline | 17 / 17 | **17 / 17** | | 👎 findings folded | 0 / 22 | 8 / 22 | | 👍 findings folded | 0 | 18, all ones the reviewer labelled `minor` | So, on this sample, about a third fewer inline threads, with no upvoted major/critical finding hidden. The cost is 18 upvoted minor findings moving from inline threads into the folded section of the summary. ## Checked against the gold set The vote data can only see the severity the bot assigned. It can't tell whether a folded finding was one a human treated as **must-fix**. That's what the gold set measures. It contains human review comments on 30 past PRs (93 items, 29 of them must-fix). The deployed reviewer's findings on those PRs were re-graded with this PR's grading prompt and routed with this PR's rule, reusing the existing match judgements. | | production | this PR | same rule, no reachable-today floor | |---|---|---|---| | Inline threads | 122 (4.1/PR) | **93 (3.1/PR)** | 70 (2.3/PR) | | Must-fix items the reviewer caught | 10/29 | 10/29 | 10/29 | | …of those, folded out of the inline threads | 0 | **0** | **3** | Must-fix recall can't move, because grading never changes what was found. The column to read is the last row. The grader rated 3 of the 10 caught must-fix items P2, and the reviewer had labelled all 3 `minor`, so the minor-P2 fold alone would have hidden them: - ClickHouse#1410: deep-linked equality/range filters are silently dropped from the filter sidebar - ClickHouse#2604: OpenAPI spec not regenerated for the new tile type - ClickHouse#2696: `getRecentAlertGroupSummaries` has no DB-side document cap, unlike its sibling The reachable-today floor is what keeps all three inline. On this data it is the difference between hiding 0 and 3 of the 10. ## Dedup fix The cross-push dedup key was `file + exact title`, on the assumption that titles are stable between runs. They aren't. ClickHouse#3039 was reviewed four times in 2.3 hours, and one defect was posted three times under three titles; all three were thumbed down. Restatements are now matched by title-word overlap within the same file: at least 0.4 overlap **and** at least 3 shared content words. The second condition stops short titles like "Missing timeout in fetchUser" and "Missing retry in fetchUser" from merging. The threshold (0.4) was set from all 140 same-PR, same-file pairs of voted findings. Every pair scoring 0.36 or higher is a restatement. At 0.333, restatements collide with genuinely distinct findings. On ClickHouse#3129, "signs every user out on each container restart" and "still signs sessions with the public secret" are two real defects (the second critical) at exactly that score. So one known reword on ClickHouse#3039 is still missed rather than risk merging those two. Both cases are verbatim test fixtures. ## Limits and what isn't measured yet - **The gold-set result rests on 10 caught must-fix items** from one reviewer run (Sonnet; production runs Opus). Zero folded is the bar, but each item is worth 10 points. - **The votes are sparse and uneven.** There are 22 👎, mostly from two people whose thresholds differ ~4×, and only 1 of 197 voted comments has more than one reactor. - **The reachable-today floor costs volume.** In the vote sample it didn't separate 👍 from 👎 (~30% 👎 either way), and it lowers the fold rate there from 52% to 35%. On the gold set it is what keeps all 3 at-risk must-fix items visible, so the cost buys something. - **Premise findings.** The grading prompt describes findings that object to the change's premise as "published in their own section". This PR does not build that section; those findings are routed by priority like any other. - **Cost:** one more Sonnet call per reviewed push that has at least one finding. Not yet measured in CI. - **This PR's own review runs the old workflow,** because `pull_request_target` loads it from `main`. To exercise the new path before merge, dispatch **Claude Code Review** from this branch against an open PR. ## Test plan - [x] `node --test .github/scripts/code-review/__tests__/*.test.mjs`: 58/58. The priority rule and the title dedup live in `priority.cjs` and `dedup.cjs`. - [x] Workflow YAML parses; Prettier and knip clean on the changed files - [x] Ran the helpers over a real PR's findings and grades (ClickHouse#3258: 7 findings → 4 shown, 3 folded) - [ ] Dispatch from this branch on 2–3 open PRs and check the inline/folded split - [x] Gold-set check: 0 of 10 caught must-fix items folded (3 without the reachable-today floor) ## Also tried (not in this PR) - **The reviewer assigning P0–P3 itself, in a single pass.** Its grades were better calibrated, but it caught 7/29 must-fix items against 10/29 (one run each, so possibly noise). - **Folding all P2s, not just minor ones.** This hid 61% of comments but lost 4 of the 17 upvoted major/critical findings. - **Folding on the reviewer's `minor` label alone.** On the gold set it hid 46% of the findings humans treated as merge-blocking. - **Using `reachableToday` as the main signal.** It didn't distinguish 👍 from 👎 in the votes, so here it only acts as a floor. As a floor, it's what protects must-fix items on the gold set. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
…use#3703) ## Summary On a phone the team switcher and user preferences at the bottom of the app nav could not be reached. The app shell (`.app-layout`) and the nav (`.nav`) were both sized with `100vh`. Mobile browsers resolve `vh` against the **large** viewport, which includes the area behind the retractable browser toolbar, so the nav extended past the bottom of the screen. The nav is `position: fixed` while the mobile overlay is open, and the overlay also sets `body { overflow: hidden }`, so nothing could scroll the bottom section into view. The collapsed rail had the same problem — its avatar was off screen too. Both now size to the **small** viewport (the part that is always on screen) through a shared `--app-viewport-height` custom property, declared in `styles/globals.css` with a `100vh` fallback for browsers without `svh`. `PageLayout`'s `fillViewport` uses the same property so full-viewport pages stay flush with the shell. `svh` rather than `dvh`: the shell never scrolls the root document, so the toolbar never retracts and `svh` is the steady-state height. That keeps the value constant and avoids reflowing the whole layout on a toolbar transition. Desktop is unaffected — `svh`, `lvh` and `vh` are the same there, and the measured nav geometry at 1440x900 and 1280x520 is byte-identical before and after. ### Screenshots or video Mobile emulation with the browser toolbar simulated via Chromium's `Emulation.setSmallViewportHeightDifferenceOverride`, iPhone 12 (`lvh` 745 / `svh` 664), dark theme, nav overlay open. The dark strip at the bottom is the area the browser toolbar covers. | Before | After | | :----- | :---- | |  |  | Pixel 5 (`lvh` 851 / `svh` 727): | Before | After | | :----- | :---- | |  |  | Desktop, unchanged: | Before | After | | :----- | :---- | |  |  | Measured bottom edge of the user menu against the visible viewport, nav overlay open: | Profile | visible viewport | menu bottom before | menu bottom after | | :-- | --: | --: | --: | | iPhone 12 | 664 | 737 (off screen) | 656 | | Pixel 5 | 727 | 843 (off screen) | 719 | | iPhone 12 landscape | 344 | 382 (off screen) | 336 | | Desktop 1440x900 | 900 | 892 | 892 | ### How to reproduce **Starting point:** a real phone, or Chrome DevTools device emulation. Plain DevTools device emulation is **not** enough on its own — it does not simulate the retractable toolbar, so `vh` and `svh` resolve to the same value there and the bug does not appear. Either use a physical device, or drive `Emulation.setSmallViewportHeightDifferenceOverride` over CDP the way `packages/app/tests/e2e/core/mobile-nav.spec.ts` does. **On `main`:** 1. Open the app on a phone in portrait (iPhone Safari or Chrome on Android), on any page with the app nav, e.g. `/search`. 2. The nav is a 50px icon rail. Note that the avatar at the bottom of the rail is not visible. 3. Tap the panel icon in the top right of the rail to open the full nav. 4. Scroll the nav to the bottom. The team switcher / user preferences row never appears — it sits behind the browser toolbar and the nav cannot scroll to it. **On this branch:** 1. Repeat the steps above. The avatar is visible at the bottom of the collapsed rail, and the team switcher / user preferences row is visible at the bottom of the open nav. 2. Rotate to landscape and confirm the nav links scroll while the bottom row stays pinned on screen. 3. On a desktop browser, confirm the nav is unchanged. ### How to test on Vercel preview **Preview routes:** /search **Steps:** 1. Open `/search` with the browser emulating a phone viewport (e.g. 390x664). 2. Click the panel icon in the top-right corner of the icon rail to open the full navigation. 3. Verify the user menu row (avatar plus name, `data-testid="user-menu-trigger"`) is visible at the bottom of the navigation, fully inside the viewport. 4. Click that row and confirm the menu with "User preferences" opens. 5. Resize to a desktop viewport (e.g. 1440x900) and verify the navigation and its bottom user menu row look unchanged. ### References - Linear Issue: HDX-6067 - Related PRs: ## Testing - New E2E test `packages/app/tests/e2e/core/mobile-nav.spec.ts` emulates a mobile browser toolbar over CDP and asserts the user menu stays within the small viewport in both the collapsed rail and the open overlay. It also asserts `svh < lvh` first, so it fails loudly rather than passing vacuously if the emulation stops working. Verified it fails on `main` (menu bottom 731 vs a 666 visible viewport) and passes on this branch. - `make ci-lint` equivalent for the touched package (`nx run @hyperdx/app:ci:lint`) and `yarn ci:unit` in `packages/app` (5593 tests) both pass. - The E2E suite as a whole was not run here: this VM has no Docker, so the ClickHouse/Mongo-backed runner cannot start. The new spec was run against a local `next dev` server in local mode. <div><a href="https://cursor.com/agents/bc-67f7af30-e3d0-4424-84a2-e733665bc35a?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-67f7af30-e3d0-4424-84a2-e733665bc35a&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div> Fixes HDX-6067 Co-authored-by: Cursor Agent <199161495+cursoragent@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
…use#3707) ## Summary Settings were only reachable by clicking through Team settings tabs or the user menu. The Cmd+K menu now finds them and opens the right place: - **Settings group** (hidden in local mode, matching the nav, since `/team` renders nothing there): Team settings, Sources, Connections, Team members, API keys, Organization API keys, MCP server, Export to Terraform (flag-gated), Webhooks, Query settings. Each one opens `/team?tab=<tab>#<section-id>`, using the tab values and section ids `TeamPage` already defines. - **Preferences group**: "Preferences" opens the preferences modal. It also matches searches like time zone, 12h/24h, font, and row click. "Use light mode", "Use dark mode", and "Use system color mode" switch the theme without opening anything. Supporting changes: - The preferences modal's open state now lives in a jotai atom (`useUserPreferencesModal`), so the spotlight can open the modal that AppNav renders. - `TeamTabContent` scrolls the anchored section into view once the team has loaded. Next's own hash scroll runs before the tab content exists on a cold load, so without this the onboarding MCP link (`/team?tab=api-agents#team-api-agents-mcp-server`) also landed at the top. - The new actions live in `spotlightSettingsActions.tsx` so `Spotlights.tsx` stays under 300 lines. The old "Team Settings" menu entry moved into the new group as "Team settings". Not included: the Access tab (security policies). It only appears when the team has `allowedAuthMethods`, and adding it would mean fetching the team on every page. ### Screenshots or video The "Before" column is empty because `main` returns "Nothing found" for these queries. I took these screenshots in local mode, so the Settings group doesn't appear in them. | Before | After | | :----- | :---- | | |  | | |  | | |  | ### How to reproduce **Starting point:** `yarn app:dev:local` connected to the demo server for preferences. Use `yarn dev` for the Settings group, which needs the API. **On `main`:** 1. Press Cmd+K and type "light", "time zone", or "mcp". Nothing matches except the generic "Team Settings" entry. **On this branch:** 1. Press Cmd+K, type "light", and select "Use light mode". The theme switches. 2. Press Cmd+K, type "time zone", and select "Preferences". The preferences modal opens. 3. (`yarn dev`) Press Cmd+K, type "mcp", and select "MCP server". Team settings opens on the "API & Agents" tab, scrolled to "Connect your AI Agents". Try "users" (Team members) and "api key" (API keys) too. ### How to test on Vercel preview **Preview routes:** /search **Steps:** 1. Press Control+K (Cmd+K on macOS) to open the search menu. 2. Type "light mode" and select "Use light mode". 3. Verify the app switches to the light theme. 4. Press Control+K, type "time zone", and select "Preferences". 5. Verify the "Preferences" modal opens. ### References - Linear Issue: - Related PRs: <div><a href="https://cursor.com/agents/bc-d1a99dd7-2ec4-4211-890c-db24074ba951?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-d1a99dd7-2ec4-4211-890c-db24074ba951&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div> Co-authored-by: Cursor Agent <199161495+cursoragent@users.noreply.github.com>
…riables (ClickHouse#3712) ## Summary This PR updates dashboard data source and connection variables so that source and connection names can be specified in URL param values, to enable stable deeplinks in environments with identical source names but different source IDs. The name to ID resolution is shared with the existing source name to source id param mapping (eg. from the search page). ### Screenshots or video https://github.com/user-attachments/assets/8daddbaa-0e1b-4b41-b53f-a6d753cdb70e ### How to test on Vercel preview 1. Create a dashboard 2. Add some connection and source variables 3. Reference them in a tile 4. Update the URL to use a source or connection name, load that URL in another page Helpful site for URL decoding: https://meyerweb.com/eric/tools/dencoder/ ### References - Linear Issue: - Related PRs:
ClickHouse#3715) ## Summary Name PromQL sources after what they read from: "Time Series" for a ClickHouse TimeSeries table, "Prometheus" for an external Prometheus API. - Add `getSourceKindLabel()`, which picks the label from the source's connection (`isPrometheusEndpoint`). The stored kind stays `promql`, so the external API, MCP and Terraform are unchanged and no migration is needed. - Sources list rows show "Time Series" or "Prometheus". - The "Source Data Type" radio reads "Time Series / Prometheus" until a connection is picked, then switches to the specific name. - Places that only know the kind (a data source variable's "Source kinds" and its summary line) show "Time Series / Prometheus", since that kind covers both. - Rename the source created by onboarding auto-detection and the local dev default sources from "PromQL" to "Time Series". Existing sources keep their names. - Other "PromQL" copy (chart mode, filter messages) is about the query language and is unchanged. ### Screenshots or video <img width="607" height="485" alt="Screenshot 2026-11-18 at 15 28 27" src="https://github.com/user-attachments/assets/67b556b6-0acc-4f6d-9952-68e9a834e8df" /> <img width="503" height="176" alt="Screenshot 2026-11-18 at 15 28 02" src="https://github.com/user-attachments/assets/60a195e2-0832-46c9-bab7-0dd0992a7c1d" /> https://github.com/user-attachments/assets/c292ae30-14e6-4550-a236-024043653caf ### How to reproduce 1. Open `/team`. The ClickHouse PromQL source shows "Time Series"; the source on the Prometheus connection shows "Prometheus". 2. Add a source. The last "Source Data Type" option reads "Time Series / Prometheus", then "Time Series" or "Prometheus" once a "Server Connection" is picked. 3. On a dashboard, open the filters, add a "Data source" filter and open "Source kinds". It offers "Time Series / Prometheus". ### References - Linear Issue: Closes HDX-5757
ClickHouse#3693) ## Summary Attribute maps in the ClickStack schema store every value as a `String`, so Lucene comparisons on attributes compiled to string comparisons. `LogAttributes.gc_pause_ms:>100` became `LogAttributes['gc_pause_ms'] > '100'`, which matches `'17.25'` and `'5'` and misses `'150'`. Ranges with numeric bounds became `... BETWEEN 10 AND 20` on a String, which ClickHouse rejects ("no supertype for types String, UInt8"). When the field is String-typed and every bound is a numeric literal, `gt`, `gte`, `lt`, `lte` and `range` now compare `toFloat64OrNull(field)`: ``` LogAttributes.gc_pause_ms:>100 before: (`LogAttributes`['gc_pause_ms'] > '100' AND indexHint(...)) after: (ifNull(toFloat64OrNull(`LogAttributes`['gc_pause_ms']) > 100, 0) AND indexHint(...)) ``` - Values that aren't numbers convert to NULL and don't match. `ifNull(..., 0)` keeps that a plain non-match instead of NULL, so `NOT field:>100` still includes rows where the attribute is missing or non-numeric, as it does today. - Unchanged: numeric columns (`Duration:>100`), JSON paths, and non-numeric bounds (`version:>abc`, hex such as `0x10`), which still compare as strings. - It applies to any String-typed field, not only map subscripts, so an attribute behaves the same whether it is read from the map or from a materialized String column. - The `indexHint(mapContains(...))` postfix is kept. The existing tests mocked `LogAttributes` as a bare `Map` and only asserted SQL text, which is how `BETWEEN 1 AND 5` on a String passed without ever running. One existing case, `foo:[1 TO 5]` on a String column, now expects the numeric form; its old expected SQL fails on ClickHouse. Closes ClickHouse#3692 ### Screenshots or video Same live demo data, Demo Logs, last 15 minutes. `infra.gc_pause_ms` peaks at 50 in this data. | Before (`main`) | After (this branch) | | :----- | :---- | | `gc_pause_ms:>100`: no error, but 54,841 rows whose values (8.1, 16.13, 32…) are all below 100 | 0 results | | <img width="1440" height="900" alt="image" src="https://github.com/user-attachments/assets/05018a18-3add-4935-ac09-b4ac7f9f5607" /> | <img width="1440" height="900" alt="image" src="https://github.com/user-attachments/assets/28e6de55-dcc0-45c4-880f-308c7af1ccf5" /> | | `gc_pause_ms:[10 TO 20]`: "no supertype for types String, UInt8" | 11,668 results, all between 10 and 20 inclusive | | <img width="1440" height="900" alt="image" src="https://github.com/user-attachments/assets/d942a870-ddd7-410d-a2e7-342c28944424" /> | <img width="1440" height="900" alt="image" src="https://github.com/user-attachments/assets/310bb202-f043-4a54-9675-3611cb029f97" /> | ### How to reproduce **Starting point:** `yarn app:dev:local`, onboarding → **Connect to Demo Server**. **On `main`:** 1. Open **Search**, source **Demo Logs**, time range **Last 15 minutes**. 2. Set SELECT to `Timestamp, ServiceName, LogAttributes['infra.gc_pause_ms'] AS gc_pause_ms, Body`. 3. Search `LogAttributes.infra.gc_pause_ms:>100`: rows come back with values below 100. 4. Search `LogAttributes.infra.gc_pause_ms:[10 TO 20]`: the query fails with the "no supertype" error. **On this branch:** 1. Same steps. 2. Step 3 returns no rows (the demo data never exceeds 50). 3. Step 4 returns rows whose `gc_pause_ms` is between 10 and 20. ### Local validation - Ran the generated SQL on ClickHouse 26.8 against values `5, 10, 17.25, 20, 100, 150, -3, abc` and a row without the key. Every form (`>`, `>=`, `<`, `<=`, negative bounds, `[a TO b]`, `{a TO b}`, `[a TO *]`, `-field:[a TO b]`, `NOT field:>x`) returned exactly the expected rows. The old SQL returned `1,3,4,6,7` for `>100` instead of `6`. - `queryParser.test.ts`: 16 new cases (12 numeric, 4 unchanged). - `packages/common-utils`: 3,175 tests pass; `ci:lint` 0 errors, warning count unchanged (80). ### How to test on Vercel preview **Preview routes:** /search **Steps:** 1. Click **Connect to Demo Server** on the onboarding screen. 2. Open /search with the **Demo Logs** source and **Last 15 minutes**. 3. Set SELECT to `Timestamp, ServiceName, LogAttributes['infra.gc_pause_ms'] AS gc_pause_ms, Body`. 4. Search `LogAttributes.infra.gc_pause_ms:[10 TO 20]`. 5. Verify results appear and every `gc_pause_ms` value is between 10 and 20. 6. Search `LogAttributes.infra.gc_pause_ms:>100` and confirm no results are returned. ### References - Related PRs: ClickHouse#2779 (range fixes, verified on numeric columns; its map-attribute range test asserted SQL that fails on a String map), ClickHouse#2841 ### Update: After review, this PR now only fixes range searches like field:[10 TO 20] on text fields. >, <, >= and <= work the same as on main (they compare as text) so existing saved searches and alerts don't change. Use a range like field:[100 TO *] for a numeric comparison. The >100 parts below no longer apply.
…e#3713) ## Summary Problem: In the search view, entering **Event Deltas** mode on a trace source and then switching to a source that can't do deltas (e.g. a log source) left the panel blank. The fix switches the user to results table mode and shows a notification when switching to a log source. ### Screenshots or video https://github.com/user-attachments/assets/ac0de04a-792a-446e-9add-1a3b04b7d976 ### How to test on Vercel preview 1. Select a trace source 2. Click the **Event Deltas** tab in the left filter panel 3. Change the source selector to a log source. 4. Verify the panel shows the results table (not a blank panel) and a notification reading "Event deltas are only available for trace sources. Switched to the results table." is shown. ### References - Linear Issue: Closes HDX-6081 Co-authored-by: Cursor Agent <199161495+cursoragent@users.noreply.github.com>
## Summary Bumps the custom OTel collector build and OpAMP supervisor from contrib v0.155.0 to v0.165.0 (core 1.61.0 to 1.71.0). Artifact Hub's scan of chart 3.6.0 reports 32 highs in the `opampsupervisor` and `otelcontribcol` binaries from their Go and dependency versions, and upstream has fixed them since. - The supervisor template drops `reports_remote_config`. Since v0.163.0 the supervisor refuses to start with it, and `accepts_remote_config` now sets both capabilities, so the HyperDX OpAMP server still gets remote config status. - `k8sattributesprocessor` is pinned to v1.4.0. It went stable and no longer shares the contrib version, so the README upgrade steps now say to copy its version from the upstream manifest. ### Breaking changes - None for the bundled configs or the configs the OpAMP server pushes. - A custom supervisor config that still sets `reports_remote_config` will crashloop until the key is removed. - Behaviour change for custom configs that use `k8sattributes`: it emits only the stable Kubernetes conventions, so `k8s.pod.labels.*` becomes `k8s.pod.label.*` (same for annotations, nodes and namespaces), and `container.image.tag` becomes `container.image.tags`. `OTEL_AGENT_FEATURE_GATE_ARG=--feature-gates=-processor.k8sattributes.DontEmitV0K8sConventions` keeps the legacy names alongside the new ones. The changeset covers both. ### How to reproduce **Starting point:** local Docker. **On `main`:** 1. `docker run --rm --entrypoint /otelcontribcol docker.clickhouse.com/clickhouse/clickstack-otel-collector:2.45.0 --version` prints 0.155.0. **On this branch:** 1. `docker build . -f docker/otel-collector/Dockerfile --target prod -t otel-bump`, then run the same command against `otel-bump`. It prints 0.165.0. 2. `cd smoke-tests/otel-collector && bats .` passes. <details> <summary>Implementation detail</summary> - `validate` passes on every config combination the entrypoint builds (base plus standalone, auth, OIDC and PromQL), on `custom.config.yaml`, and on the configs `buildOtelCollectorConfig` generates (no teams, open, auth enforced, PromQL on and off). - `go build ./... && go test ./...` in `packages/otel-collector` passes, and the collector smoke suite passes 50 of 50. - The all-in-one image builds on 0.165.0. Run in supervisor mode, it receives remote config from its own OpAMP server, the effective config includes the ClickHouse exporters, and the health check reports the server available. - Checked the contrib and core changelogs from 0.156 to 0.165 for removed options and keys used in `docker/otel-collector/config*.yaml` and the supervisor template. Apart from the two above, none affect us. - Not assessed: kubeletstats turns on a new beta gate, `receiver.kubeletstats.cpuUsageScrapeBased`, by default. CPU usage values from custom kubeletstats configs may shift. </details>
…lickHouse#3711) ## Summary Clears the high-severity Node dependency CVEs that Artifact Hub's scan of chart 3.6.0 reports in the app image. Trivy on the rebuilt image goes from 50 high and 45 medium findings in Node packages to 2 and 2. Upgrading the MCP SDK changed how tool validation errors read, so the MCP tool schemas now keep their specific messages. - axios 1.18.1 to 1.21.1, `@modelcontextprotocol/sdk` 1.29.0 to 1.32.2, and lockfile refreshes for follow-redirects, body-parser, path-to-regexp, brace-expansion, js-yaml, ip-address, browserslist, nanoid, validator and others. Every bump stays within its current major. nx moves from 23.1.1 to 23.3.2, dev-only, because it pinned axios exactly. - From MCP SDK 1.30, a failed union only reports "Invalid input at tiles[0]", which hid the messages agents use to correct a tool call, such as "isDelta is only valid for gauge metrics". MCP tool unions now go through `mcpUnion`. It reports the branch whose `displayType`/`configType` the input matched, and when no branch accepts the value it lists the accepted ones. ### Breaking changes - None. Tool input schemas accept exactly what they did before; only the error text changes. ### How to reproduce **Starting point:** local Docker with [Trivy](https://trivy.dev) installed, and `yarn dev` for the MCP check. **On `main`:** 1. `trivy image -q --scanners vuln --severity HIGH docker.hyperdx.io/hyperdx/hyperdx:2.45.0` lists highs in axios, `@modelcontextprotocol/sdk`, follow-redirects and others. **On this branch:** 1. `docker build . -f docker/hyperdx/Dockerfile --build-context hyperdx=./docker/hyperdx --build-context api=./packages/api --build-context app=./packages/app --target prod -t app-deps`, then scan `app-deps`. The only Node package findings left are picomatch and `@hono/node-server`. 2. Through the MCP server, call `clickstack_save_dashboard` with a line tile that sets a tile-level `where`. The error says builder tiles take no tile-level `where`, rather than "Invalid input". <details> <summary>Implementation detail</summary> - uuid 8, fast-xml-parser 4 and glob 10 came from mongodb's optional `@aws-sdk/credential-providers` (stale at 3.279) and `gcp-metadata`'s exact `gaxios@7.1.3` pin. Refreshing the first within 3.x and resolving gaxios to 7.3.1 removes all three. The `fast-xml-parser` resolution no longer matches anything, so it's gone. - `@aws-sdk/credential-providers` is only loaded for `MONGODB-AWS` auth. mongodb still finds `fromNodeProviderChain` in 3.1166, but AWS auth wasn't run end to end. - Left alone: picomatch 2.3.2 has no fixed release, and `@hono/node-server` is only fixed in 2.x, outside the MCP SDK's `^1.19` range. - `mcpUnion` ranks branches by how many literal and enum fields in the input they accept, at any object depth, then by fewest issues. Builder tiles have no `configType`, so counting matches rather than penalising mismatches is what lets a `configType: 'sql'` tile be judged as SQL. - When the closest branch still rejects a literal or enum field, the error lists every value the union accepts at that path, e.g. `config.displayType: expected one of "line", "stacked_bar", ...`. - It covers the save and patch tile unions with PromQL on and off, the alert chart config, saved filter values, saved search filters and both granularity fields. Spreading `.options` drops a union's error map, which is how the PromQL patch union was first missed. `mcpUnion.test.ts` checks the real save and patch schemas in both modes. - Tested: API unit tests 1568/1568, MCP integration suite 631/631, `tsc` and eslint clean on the changed files. </details>
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @hyperdx/cli@0.9.1 ### Patch Changes - a25e945: feat(cli): `hdx mcp install` can keep several ClickStack servers side by side `--name <server-name>` adds the MCP server under a name you choose, so a second ClickStack instance no longer overwrites the first. When the key belongs to more than one team, the installer asks which teams to add a server for and adds one entry per team. When it finds more than one agent it asks which to set up. ## @hyperdx/api@2.46.0 ### Minor Changes - 6705e50: feat: Create, read, and update ad hoc dashboard filters through the external API `/api/v2/dashboards` now accepts and returns `ADHOC` filters, with SQL and PromQL source types, and their `adhoc` entries in `savedFilterValues`. Each filter's sources must exist and be a kind its `sourceType` supports. MCP still hides ad hoc filters. - b681cec: feat(mcp): Create, read, and update ad hoc dashboard filters through the MCP dashboard tools `clickstack_save_dashboard`, `clickstack_get_dashboard`, and `clickstack_patch_dashboard` now handle `ADHOC` filters and their `adhoc` saved conditions. PromQL ad hoc filters are offered only while PromQL is enabled, and are hidden and kept on update otherwise. Saved conditions that name no ad hoc filter, or use an operator their filter can't apply, produce a warning. - 743c3c1: feat: add an optional "Row key expression" to log and trace sources. When set, the side panel's row lookup selects and filters on only those columns instead of detecting keys from table metadata. - a7744e8: feat: add data source and connection variable types to dashboards - a7744e8: feat: support data source and connection variables in the external API and MCP - a7744e8: feat: add connection variables for raw SQL tiles, SQL query filters, and connection-scoped data source variables ### Patch Changes - f15b849: feat: Ad hoc dashboard filter finishing touches - Add an `IN` operator. `IN` conditions on the same key are OR'd into one `IN (...)` condition for SQL, or one `=~"a|b"` matcher for PromQL. - Ad hoc filters always broadcast (`isBroadcastEnabled: true`), and their variable name is only a unique identifier. It is no longer declared as a `$variable`. - Warn when another ad hoc filter already applies to the same sources. - Collapse the filter input to three conditions behind a "+N more" toggle. - 8952972: perf: check-alerts gives each alert only its own previous history, so a tick no longer scans every alert's group history once per alert - f42c68a: chore: bump `uuid` to 11.1.1 (fixes GHSA-w5hq-g745-h8pq) and drop `@types/uuid` - 61999b4: fix: clear the critical CVEs from the app and collector images by moving the collector to Alpine 3.24, upgrading gomplate to v5 and dropping the unused goose and esbuild binaries. Custom entrypoints that called `goose` directly should call `migrate` with the same schema directory instead. - bfb5c83: Use the log source body expression for bare-text MCP searches, pattern filters, event deltas, and alert alias queries when no implicit search column is set. - 02a4092: feat: `clickstack_save_alert` accepts `note` and `numConsecutiveWindows` Updates that omit either field now keep the stored value instead of clearing it; send `null` to clear. - 8dc1aa7: refactor: the MCP `clickstack_event_patterns` tool builds its drill-down `whereSnippet` with the shared pattern predicate from `@hyperdx/common-utils` instead of its own copy. The snippet is unchanged. - 6256667: fix(mcp): Rename `clickstack_trace_top_time_consuming_operations` to `clickstack_trace_top_time_consuming_ops` The old name was the longest MCP tool name and exceeded the tool-name length limit some MCP clients enforce. Clients that call the tool by its old name need to switch to the new one. - cf4b70b: fix: update the Node dependencies flagged as vulnerable in the app image (axios, MCP SDK, express, js-yaml, brace-expansion and others). MCP tool validation errors still name the field that failed under the new MCP SDK, and list the accepted values when a tile's `displayType` is wrong. - 272c514: fix: support numeric range searches on String attributes Range searches with numeric bounds on a String-typed field, such as `LogAttributes.duration_ms:[10 TO 20]`, failed with "no supertype for types String, UInt8". They now compare with `toFloat64OrNull`; values that aren't numbers don't match. `>`, `<`, `>=` and `<=` still compare String fields as text; use a range such as `:[1000 TO *]` for a numeric comparison. - cac14eb: feat: Name PromQL sources "Time Series" or "Prometheus" by their connection The source type for a PromQL source now reads "Time Series" when it queries a ClickHouse TimeSeries table and "Prometheus" when it queries an external Prometheus API. Where no connection is known yet, such as the source form before a connection is picked or a data source variable's kinds, it reads "Time Series / Prometheus". The stored kind is still `promql`. The PromQL source created by onboarding auto-detection and the local dev default sources is now named "Time Series" instead of "PromQL". - fa3a564: feat: accept SQL query dashboard filters in the API, external API, and MCP Saving a dashboard now rejects a `SQL_QUERY` filter whose connection doesn't belong to the team. The external API and MCP read and write the filter with a `connectionId`, and MCP warns about unknown variables and source-only macros in its SQL. - 5b50c31: feat: add the SQL query dashboard filter type to the dashboard schema A `SQL_QUERY` filter stores a ClickHouse connection and a SQL template whose first column fills the filter's dropdown. It is variable-only. Validation flags templates that use `$__sourceTable` or `$__filters`, or whose macros and variable references can't expand. The filter is not yet exposed through the external API or MCP, and has no editor or values lookup yet. - Updated dependencies [f15b849] - Updated dependencies [fe96b72] - Updated dependencies [02a4092] - Updated dependencies [272c514] - Updated dependencies [d311d82] - Updated dependencies [743c3c1] - Updated dependencies [a7744e8] - Updated dependencies [a7744e8] - Updated dependencies [3acd5ba] - Updated dependencies [5b50c31] - @hyperdx/common-utils@0.36.0 ## @hyperdx/app@2.46.0 ### Minor Changes - ca4855d: feat: filter for or exclude a pattern from Event Patterns Each row in Event Patterns now has "Filter for this pattern" and "Exclude this pattern" buttons on hover. Each adds a filter for every event that fits the pattern in the time range, not only the sampled rows, so the results table, histogram and counts all update. Exclusions stack, show as pills next to the other filters, survive sidebar filter changes, and are kept in the URL and in saved searches. A new include replaces the previous one, and switching source removes pattern filters. - 743c3c1: feat: add an optional "Row key expression" to log and trace sources. When set, the side panel's row lookup selects and filters on only those columns instead of detecting keys from table metadata. - a7744e8: feat: add data source variables to dashboard filters and tiles - a7744e8: feat: let tiles and filters use a data source variable as their source - a7744e8: feat: add connection variables for raw SQL tiles, SQL query filters, and connection-scoped data source variables ### Patch Changes - f15b849: feat: Ad hoc dashboard filter finishing touches - Add an `IN` operator. `IN` conditions on the same key are OR'd into one `IN (...)` condition for SQL, or one `=~"a|b"` matcher for PromQL. - Ad hoc filters always broadcast (`isBroadcastEnabled: true`), and their variable name is only a unique identifier. It is no longer declared as a `$variable`. - Warn when another ad hoc filter already applies to the same sources. - Collapse the filter input to three conditions behind a "+N more" toggle. - 3a196eb: Fix blank search panel when switching from a trace source in Event Deltas mode to a source that doesn't support deltas (e.g. a log source). The view now falls back to the results table and shows a notification. - 61999b4: fix: clear the critical CVEs from the app and collector images by moving the collector to Alpine 3.24, upgrading gomplate to v5 and dropping the unused goose and esbuild binaries. Custom entrypoints that called `goose` directly should call `migrate` with the same schema directory instead. - 832c11c: Bring back the Claude Code and Codex CLI commands in the MCP setup panel, next to the `hdx mcp install` command, so connecting an agent no longer needs another CLI installed. - 3419ab0: fix: keep the team switcher and user preferences reachable in the mobile app nav. The app shell and nav were sized with `100vh`, which on mobile browsers includes the area behind the retractable toolbar, so the bottom of the nav sat off screen with no way to scroll to it. They now size to the small viewport. - cf4b70b: fix: update the Node dependencies flagged as vulnerable in the app image (axios, MCP SDK, express, js-yaml, brace-expansion and others). MCP tool validation errors still name the field that failed under the new MCP SDK, and list the accepted values when a tile's `displayType` is wrong. - 272c514: fix: support numeric range searches on String attributes Range searches with numeric bounds on a String-typed field, such as `LogAttributes.duration_ms:[10 TO 20]`, failed with "no supertype for types String, UInt8". They now compare with `toFloat64OrNull`; values that aren't numbers don't match. `>`, `<`, `>=` and `<=` still compare String fields as text; use a range such as `:[1000 TO *]` for a numeric comparison. - ca4ceae: fix: make the "No organization API keys yet" empty state span the full width of the team settings section. - cac14eb: feat: Name PromQL sources "Time Series" or "Prometheus" by their connection The source type for a PromQL source now reads "Time Series" when it queries a ClickHouse TimeSeries table and "Prometheus" when it queries an external Prometheus API. Where no connection is known yet, such as the source form before a connection is picked or a data source variable's kinds, it reads "Time Series / Prometheus". The stored kind is still `promql`. The PromQL source created by onboarding auto-detection and the local dev default sources is now named "Time Series" instead of "PromQL". - 3a10f62: fix: clicking the source selector selects its current label so typing replaces it instead of inserting into the middle of the old name - 2ee64d8: feat: accept source and connection names for dashboard source and connection variables - a7744e8: feat: add data source and connection variable types to dashboards - 0e9fb1b: feat: Find settings and preferences from the Cmd+K menu - Team settings sections (sources, connections, team members, API keys, MCP server, webhooks, query settings, and more) open the right tab and scroll to the section. - "Preferences" opens the preferences modal, and "Use light mode", "Use dark mode", and "Use system color mode" switch the theme directly. - 3acd5ba: feat: create SQL query dashboard filters and fill their dropdowns Dashboard filters can now take their values from a ClickHouse SQL query. The filter editor offers a "SQL query values" type with a connection, a SQL editor, and a preview of the values. The dropdown lists the query's first column in the order it returns, up to 10,000 values, and the query can use the time macros and other filters' variables. - 5b50c31: feat: add the SQL query dashboard filter type to the dashboard schema A `SQL_QUERY` filter stores a ClickHouse connection and a SQL template whose first column fills the filter's dropdown. It is variable-only. Validation flags templates that use `$__sourceTable` or `$__filters`, or whose macros and variable references can't expand. The filter is not yet exposed through the external API or MCP, and has no editor or values lookup yet. - 50129d1: fix: time chart series keep the same color across refreshes; series are now ordered by name instead of by the order ClickHouse returned them - 3c8794f: fix: stacked bar and stacked line charts no longer show duplicate Y-axis labels (e.g. "0, 500, 1k, 2k, 2k" when 1.5k rounds to 2k) - a4f6856: feat: dashboard tile alerts can use a 1 minute interval outside development - 1556317: feat: small addition to user preferences - Updated dependencies [f15b849] - Updated dependencies [6705e50] - Updated dependencies [b681cec] - Updated dependencies [8952972] - Updated dependencies [f42c68a] - Updated dependencies [fe96b72] - Updated dependencies [61999b4] - Updated dependencies [bfb5c83] - Updated dependencies [02a4092] - Updated dependencies [8dc1aa7] - Updated dependencies [6256667] - Updated dependencies [cf4b70b] - Updated dependencies [272c514] - Updated dependencies [cac14eb] - Updated dependencies [d311d82] - Updated dependencies [743c3c1] - Updated dependencies [a7744e8] - Updated dependencies [a7744e8] - Updated dependencies [a7744e8] - Updated dependencies [fa3a564] - Updated dependencies [3acd5ba] - Updated dependencies [5b50c31] - @hyperdx/common-utils@0.36.0 - @hyperdx/api@2.46.0 ## @hyperdx/common-utils@0.36.0 ### Minor Changes - fe96b72: feat: add `buildCompactPatternPredicate` It builds the same match as `buildPatternPredicate` in much shorter SQL, for pattern filters that are kept in a URL. `parsePatternPredicate` reads both forms. - d311d82: feat: share the Event Patterns drill-down predicate `templateToRegex` and `buildPatternPredicate`, which the MCP server uses to build the `clickstack_event_patterns` drill-down filter, are now in `@hyperdx/common-utils/dist/drain`. New options match templates mined with extra delimiters (`extraDelimiters`) or by Python Drain3 (`whitespace: 'python'`), and `parsePatternPredicate` reads a predicate back into its value expression and template. Without options the output is the same as the MCP server's. - 743c3c1: feat: add an optional "Row key expression" to log and trace sources. When set, the side panel's row lookup selects and filters on only those columns instead of detecting keys from table metadata. - a7744e8: feat: add data source and connection variable types to dashboards - a7744e8: feat: add connection variables for raw SQL tiles, SQL query filters, and connection-scoped data source variables ### Patch Changes - f15b849: feat: Ad hoc dashboard filter finishing touches - Add an `IN` operator. `IN` conditions on the same key are OR'd into one `IN (...)` condition for SQL, or one `=~"a|b"` matcher for PromQL. - Ad hoc filters always broadcast (`isBroadcastEnabled: true`), and their variable name is only a unique identifier. It is no longer declared as a `$variable`. - Warn when another ad hoc filter already applies to the same sources. - Collapse the filter input to three conditions behind a "+N more" toggle. - 02a4092: feat: `clickstack_save_alert` accepts `note` and `numConsecutiveWindows` Updates that omit either field now keep the stored value instead of clearing it; send `null` to clear. - 272c514: fix: support numeric range searches on String attributes Range searches with numeric bounds on a String-typed field, such as `LogAttributes.duration_ms:[10 TO 20]`, failed with "no supertype for types String, UInt8". They now compare with `toFloat64OrNull`; values that aren't numbers don't match. `>`, `<`, `>=` and `<=` still compare String fields as text; use a range such as `:[1000 TO *]` for a numeric comparison. - 3acd5ba: feat: create SQL query dashboard filters and fill their dropdowns Dashboard filters can now take their values from a ClickHouse SQL query. The filter editor offers a "SQL query values" type with a connection, a SQL editor, and a preview of the values. The dropdown lists the query's first column in the order it returns, up to 10,000 values, and the query can use the time macros and other filters' variables. - 5b50c31: feat: add the SQL query dashboard filter type to the dashboard schema A `SQL_QUERY` filter stores a ClickHouse connection and a SQL template whose first column fills the filter's dropdown. It is variable-only. Validation flags templates that use `$__sourceTable` or `$__filters`, or whose macros and variable references can't expand. The filter is not yet exposed through the external API or MCP, and has no editor or values lookup yet. ## @hyperdx/otel-collector@2.46.0 ### Minor Changes - 4b66d1f: chore(otel-collector): bump base collector to v0.165.0 Upgrade the custom OTel Collector base from contrib v0.155.0 (core 1.61.0) to v0.165.0 (core 1.71.0), picking up upstream Go and dependency CVE fixes in the collector and OpAMP supervisor binaries. A custom supervisor config that sets `reports_remote_config` must drop it: the supervisor refuses to start with it from v0.163.0, and `accepts_remote_config` now covers both. `k8sattributes` now emits the stable Kubernetes semantic conventions only. Pod, node and namespace `labels.*` and `annotations.*` become `label.*` and `annotation.*`, and `container.image.tag` becomes `container.image.tags`. Set `OTEL_AGENT_FEATURE_GATE_ARG=--feature-gates=-processor.k8sattributes.DontEmitV0K8sConventions` to keep emitting the legacy names alongside the new ones while you migrate. ### Patch Changes - 61999b4: fix: clear the critical CVEs from the app and collector images by moving the collector to Alpine 3.24, upgrading gomplate to v5 and dropping the unused goose and esbuild binaries. Custom entrypoints that called `goose` directly should call `migrate` with the same schema directory instead.
Folds 122b942 (replayed on 2.43.1 as 43388c2) and the WorkOS parts of the 2.44.0 sync (#5). On 2.44.0: - Member removal keeps upstream's org API keys and last-member guard. With WorkOS it unsets the team and rotates the access key, and a restore after a race puts both back. Members without a team cannot authenticate with an access key. - OAuth credential scrubbing moves from the HyperDX SDK tracing preload into upstream's ClickStack telemetry preload. - The WorkOS removal tests keep a second member, since the last member can never be removed.
Folds 9f10846 (replayed on 2.43.1 as e01f52b) and the 2.44.0 adaptations from #5: - run upstream's new and changed tests on Vitest; - adapt upstream code to Mongoose 9, Zod 4, Express 5 validation and @clickhouse/client, and lock upstream's new dependencies; - pin @opentelemetry/api 1.9.1, the range the ClickStack SDKs accept; - run the ClickStack telemetry preload under Bun, keeping HTTP server spans when HTTPS loads after HTTP; - import the undici package so Bun keeps upstream's webhook DNS check; - move upstream's uplot patch to Bun patches and drop the @hyperdx/browser patch, which the ClickStack browser SDK supersedes, with the browser SDK memory proof ported to it. Also folds 97ee572: the E2E Playwright step no longer overrides the job-level fork E2E_WORKERS value of two, so pushes to main stop running four workers on the 4-vCPU runner. On 2.45.0: - run upstream's new PromQL, connection, onboarding and service-map tests on Vitest; - import ClickHouseError from @clickhouse/client in the new utils/clickhouseErrors.ts; - accept an unset value in the service-map group-by validator, as the fork's react-hook-form types require; - keep upstream's TimeSeries version 7 test tables and default E2E PromQL table (its `samples` column) for ClickHouse 26.10; - lock hono 4.13.16, as upstream does. On 2.46.0: - port upstream's mcpUnion error map to Zod 4 and drop the fork's mcpUnionErrorMap, so MCP tool unions match upstream's call sites; - run upstream's new dashboard-filter, pattern, spotlight, Konami and mcpUnion tests on Vitest, with Zod 4's default messages; - move upstream's per-alert history partitioning into the fork's check-alerts task module; - pass plain sources to the new body-fallback alert test, as the fork's alert providers do; - set the mobile shell test's small-viewport override after navigation, which Playwright 1.64's Chromium resets; - take upstream's collector 0.165.0 and k8sattributesprocessor v1.4.0, dropping the fork's separate contrib version; - allow 304 api lint warnings for the three that upstream's new tests add under the fork's linters.
Folds the packaging commit of the 2.43.1 release stack (87ec1b5), unchanged on 2.44.0. On 2.46.0, take upstream's collector 0.165.0, goose-less migration and Alpine 3.24 image lines, keeping only the fork's Go 1.27.3 builders.
mfroembgen
force-pushed
the
fork-sync/app-2.46.0-rebase
branch
from
November 23, 2026 09:02
58cf84b to
4732504
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This branch puts the fork on upstream's latest release,
@hyperdx/app@2.46.0(d71b2d8c7, also@hyperdx/api@2.46.0,@hyperdx/otel-collector@2.46.0,@hyperdx/common-utils@0.36.0and@hyperdx/cli@0.9.1), as the same four patch commits. It supersedes #7, which can be closed once this lands.Don't merge this with the PR button. Once it's reviewed,
maingets force-pushed to this branch with a lease, and that needs Marco's confirmation.The first two commits replay unchanged:
git range-diffshows only context changes, plusMCP.mdreflow hunks that upstream now ships itself. The MCP-instructions patch from #8 stays a separate opt-in on top, in #10.Upstream 2.45.0 → 2.46.0 (41 commits):
INoperator (feat: ad hoc filter finishing touches ClickHouse/ClickStack#3658, feat(api): support ad hoc dashboard filters in the external API ClickHouse/ClickStack#3659, feat(mcp): support ad hoc dashboard filters in the MCP dashboard tools ClickHouse/ClickStack#3660)noteandnumConsecutiveWindowsinclickstack_save_alert(feat(mcp): accept note and numConsecutiveWindows in clickstack_save_alert ClickHouse/ClickStack#3694), name/team/agent choices forhdx mcp install(feat(cli): name, team and agent choices for hdx mcp install ClickHouse/ClickStack#3670); 1m tile alert interval (feat: allow tile alerts to use 1m as an interval option ClickHouse/ClickStack#3327)Conflicts and adaptations (all in the runtime/tooling patch unless noted):
package.json,packages/{api,app,cli}/package.jsonworkspace:*) with upstream's 2.46.0 versions; CLI0.9.1-fork.1. Upstream's newresolutionsfloors stay out: Bun resolves the runtime packages above them, and only dev tools (Stryker'sqs6.15.1, nx'sundici7.29.0) sit belowbun.lockpackages/api/src/mcp/utils/errors.tsmcpUnionported to Zod 4 (invalid_valueissues, branch-relative paths,erroroption); the fork's ownmcpUnionErrorMapis gone, soalerts/schemas.tsanddashboards/schemas.tstake upstream's call sites unchangedpackages/api/src/mcp/__tests__/mcpUnion.test.tspackages/api/src/tasks/checkAlerts/{index,task}.tspartitionPreviousMapsByAlertstays inindex.ts; the fork'stask.ts(where the fork movedCheckAlertTask) calls itpackages/api/src/routers/external-api/v2/utils/dashboards.tsisTraceSourceandisPromqlSourceimports: upstream no longer uses the second, the fork comparesSourceKindpackages/common-utils/src/filters.tspackages/cli/src/cli.tsx@/mcp/installimports plus the fork'sversionfrom#packagepackages/app/src/components/{ConnectionSelect,SelectControlled,SourceSelect}.tsxpackages/app/src/components/DBEditTimeChartForm/EditTimeChartForm.tsxchartFormResolverwrapping the fork'spassthroughFormResolverDashboardFiltersModal,SqlQueryFilterEditForm,ReferenceVariableDashboardFilter,PatternRowActions,useKonamiCode,useSqlQueryFilterValues,useDashboardFilterValues,queryTilesHandler,bodyExpressionFallback,queryParser,mcpInstalland others)vi.*,vi.importActual,Mock)packages/app/src/__tests__/Spotlights.test.tsxMCPserver), so the two highlighted names accept a missing space.env, compose files,builder-config.yaml, otelREADME.md, smoke testsk8sattributesprocessorv1.4.0. The fork's separateOTEL_COLLECTOR_CONTRIB_VERSION(only needed for contrib 0.164.1) is dropped.github/workflows/claude-code-review.ymlbun testruns upstream's newpriority.test.mjstoo; the new grading step's action is SHA-pinned like the otherspackages/api/src/tasks/checkAlerts/__tests__/bodyExpressionFallback.int.test.tstoJSON({ virtuals: true })), as the fork's alert providers do:fetchSampleLinesspreads the source, which drops a document's fieldspackages/app/tests/e2e/core/mobile-nav.spec.tspage.goto: the Chromium in Playwright 1.64 resets it on navigation, sosvhequalledlvh(745) and both tests failed their own preconditionpackages/api/package.jsonlint--max-warnings 304: upstream's new tests add three warnings under the fork's linters (2.45.0 rebase: 301)docker/{hyperdx,otel-collector}/Dockerfile(packaging patch)Evidence
mcpUnionand the alert/dashboard schemas mix Zod 3'serrorMap/unionErrorswith the fork's Zod 4, 19 of upstream's new and changed test files still calljest.*, and twoSpotlightstests fail (Unable to find role="button" and name /MCP server/).After: locally with Bun 1.4.4:
bun install --frozen-lockfilepasses. Unit tests pass: api 90 files / 1646 tests, common-utils 48 / 3279, app 371 / 5752, cli 10 / 151.tsrs --noEmitreports 0 errors in api, app, common-utils and cli. ESLint reports 0 errors in api (304 warnings), app (562) and common-utils (80); stylelint passes. The first CI run failed only on those last two tests (expected '' to contain 'needle in body';expected 745 < 745); a probe on Chromium 156 showssvh745 with the override set before navigation and 545 after. Integration, E2E and collector suites run in the Main run onai/release-2.46.0.Merge Danger
Door: two-way
Landing this means force-pushing
mainfrom97ee5727d7f0a252eace6f6db9cdf239f7cfa028to47325049e1176472ff8901c5e3939645bece4b58with a lease. The old head stays reachable throughfork-sync/app-2.44.0-rebaseand #7'sfork-sync/app-2.45.0-rebase.Blast Radius: fork-only
No images are published until someone runs
fork-image.ymlwithpublish=true. Consumers keep their current tags until they're updated. Custom collector entrypoints that callgoosemust callmigrateinstead (upstream ClickHouse#3709).