Repository navigation
chore(deps): pnpm 12, and ClickHouse row validation on - #86
Merged
Merged
Conversation
pnpm 12.9.1 in package.json, CI and Dockerfile.web; the lockfile gains the pnpm 12 binary document (14 per-platform entries), lockfileVersion unchanged. The ClickHouse client keeps the crate's row validation on. Every read was checked: DESCRIBE of all 68 query sites and their variants against the Rust rows on 26.8 and 26.9, and a new integration test that seeds complete rows and calls each reading endpoint in each shape. That found and fixes three bugs: route history decoded UInt32 and Nullable quantiles into i64/f64 and came back empty; formatDateTime's %M is the month name, so trace and log-body timestamps read "04:August:52"; and the trace's app-log query compared the String alias created_at with a DateTime, failed, and showed no app events. The test harness now builds its client with the production create_client. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Follow-up to #85. It does two things: moves the frontend to pnpm 12, and turns the ClickHouse client's row validation on once every read had been checked.
pnpm 12.9.1
packageManager, thepnpm/action-setupversion in CI, and the Corepack pin inDockerfile.web.pnpm@12.9.1and lists 14 per-platform@pnpm/exe.*binaries.lockfileVersionstays9.0. A local pnpm 11 switches itself to 12.9.1 and leaves the lockfile alone.pnpm/action-setupv6.1.0, already pinned, supports pnpm 12. It installs a pinned 12.x and then runspnpm self-updateto the requested version.pnpm store path, whichsetup-node's cache step runs, returns the same path as before.node:24.21.0-alpineprepares 12.9.1 and runs the native musl binary.install --frozen-lockfile,check:i18n,lint,test(143 tests) andbuildall pass; the web image builds and serves the app.ClickHouse row validation, on
With validation, the clickhouse crate checks each result against the Rust row it lands in. A type that drifts then fails the query instead of decoding into garbage. #85 left validation off until every read had been checked. Checking them found three bugs:
toUnixTimestampreturnsUInt32intoi64, and the quantiles of the Nullablelatency_msareNullable(Float64)intof64. Under plain RowBinary that misread the stream; the handler swallows the error and returns an empty history.formatDateTime(..., '%M')gives the month name in ClickHouse, not the minute (for example04:August:52). This affected trace events and both log-body endpoints; they now use%i.created_atString alias shadowed the column inPREWHERE created_at >= now() - …. The String-to-DateTime comparison failed, andunwrap_or_defaultturned that into "no app events". The column is now qualified asapp_logs.created_at.How the reads were checked
DESCRIBEon all 68 ClickHouse reads, including every variant of the dynamic SQL (ranges,group_bydimensions, scoped and unscoped), on 26.8 LTS and on 26.9, and compared names and types with the Rust structs using the crate's validation rules. The five insert structs were compared against their tables the same way. After the fixes there are no mismatches.tests/clickhouse_row_types.rs.compare, and everygroup_by.query_logconfirms that every query variant ran and returned rows. The one exception is the all-emptygroup_by, which the handler cannot produce.create_client: the same settings, the same validation and the same connector.Checks run locally
cargo fmt --check,clippy --all-targets -D warnings, and 755 unit tests.🤖 Generated with Claude Code