Skip to content

fix(api): normalize telemetry query bounds for ClickHouse DateTime - #1

Draft
jacobwl wants to merge 2 commits into
mainfrom
fix/clickhouse-datetime-query-bounds
Draft

fix(api): normalize telemetry query bounds for ClickHouse DateTime#1
jacobwl wants to merge 2 commits into
mainfrom
fix/clickhouse-datetime-query-bounds

Conversation

@jacobwl

@jacobwl jacobwl commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Normalize telemetry query bounds to second precision for ClickHouse DateTime columns.
  • Keep the v2 API contract unchanged; no schema migration.

Validation

  • bun test apps/api/src/routes/v2/telemetry.http.test.ts
  • 8 tests passed.

Makisuo and others added 2 commits July 22, 2026 00:54
… issues, and last-deploy columns

Redesigns the /services table per the approved "dense table+" direction while
keeping every data source fleet-level (no per-service fan-out):

- serviceOverviewQuery gains a per-commit `firstSeen: min(Timestamp)` on the
  same scan; CommitBreakdown now carries errorCount + firstSeen. The
  serviceOverview cachedDirect policy is bumped to version 2 so pre-upgrade
  cached rows (missing the field) can't be served.
- New GET /v2/error_issues/service_counts backed by
  ErrorsService.countOpenIssuesByService — one Postgres GROUP BY over
  actionable, error-kind, non-archived issues (name-scoped; env scoping would
  need the warehouse fingerprint intersection and is deliberately out).
- New useServiceHealthSummary hook derives per-(service, env) health from the
  already-fetched alert incidents + anomalies; shared by the table (name dot,
  destructive left rail, footer tally, health filter) and the sidebar's new
  client-side Health facet.
- P95 cell shows a tone-colored delta vs the trailing-7d baseline — first
  consumer of the existing fleet-level, hour-cached serviceHealthBaseline.
- "Commit" becomes "Last deploy": commit message first (lazy per-distinct-sha
  lookup), sha · age demoted, rollout progress bar with breakdown tooltip, and
  an "errors ↑ since" state when the newest commit errors ≥2× the older ones.
- Rows extracted into a memoized ServiceRow; baseline/issues/messages render
  progressively and never block first paint.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants