Development and test workflows
Development and test workflows give engineers repeatable ways to change HyperDX and check its behavior before release. Yarn starts package work, Nx orders workspace checks, Docker Compose supplies isolated data services, and the test layers move from fast local rules to full browser and telemetry flows. For runtime placement outside these workflows, see Deployment topology.
Workspace model
The repository uses Yarn workspaces for dependency and package commands. Nx treats the packages as projects and uses their dependency graph to order builds and checks. Together they support focused local work and repeatable CI checks without making each engineer know every package boundary.
Workspace commands
The root package.json is the main command index. Yarn selects a package script with yarn workspace <package> <script>, while Nx selects a project target with nx run <project>:<target> or applies a target to many projects with nx run-many.
| Goal | Command | Result |
|---|---|---|
| Install the workspace | yarn setup | Installs locked dependencies and Git hooks. |
| Run the normal development stack | yarn dev | Starts local services and the API, app, alert task, and shared utility processes. |
| Run the app without its API | yarn dev:local | Starts a front-end mode for work that does not need the API. |
| Run CI builds | npx nx run-many -t ci:build | Builds projects in dependency order. |
| Run lint and type checks | npx nx run-many -t ci:lint | Checks code and tracked lint debt. |
| Run unit tests | npx nx run-many -t ci:unit | Builds needed dependencies and runs package unit suites. |
| Run integration tests | npx nx run-many -t ci:int --parallel=false | Runs integration suites one at a time against shared test services. |
| Check the API contract | make ci-openapi | Regenerates the OpenAPI document and detects drift from the committed file. |
Nx caches results from content-based inputs. CI targets build dependent projects first, so a changed shared package reaches the checks that use it while an unchanged package can reuse a result. Pull requests use affected-project lint and type checks with an Nx cache restored from main or prior runs, while branch pushes use the full lint target. The lint workflow also uses a ratchet, which blocks increases in gated escape-hatch counts against per-package baselines. The OpenAPI sync and review-helper checks run outside affected-project selection so a small change cannot hide a whole-repository contract failure.
Release validation uses the same locked workspace model before publishing. The release workflow installs the root dependencies and builds shared utilities before the changesets action publishes packages, so package publish hooks can resolve workspace output. It uses the Node version declared by .nvmrc and upgrades npm only for npm's trusted publishing path (.github/…/release.yml• L32-64, .github/…/release.yml• L103-115).
The Vouch workflow is a separate trust gate for outside pull requests. It limits the open review queue and asks maintainers to approve first-time contributors without changing the source or test workflow.
References: package.json• L6-55 yarn.lock• L1-6 nx.json• L10-47 nx.json• L49-81 Makefile• L109-121 scripts/…/check-openapi-sync.sh• L1-37 scripts/…/ratchet.mjs• L15-25 .github/…/main.yml• L38-81 .github/…/release.yml• L32-64 .github/…/release.yml• L103-115 .github/…/vouch.yml• L1-67
Package checks
The packages use a shared CI vocabulary so an engineer can narrow a check without changing its purpose. API and shared utility packages add integration checks because they use MongoDB or ClickHouse. The app adds browser checks and Storybook because its main risk is user-visible behavior. The CLI also keeps selected chart and number-format rules aligned with the app so terminal output remains predictable.
The app has separate development, production, and ClickHouse-focused build paths. Development uses Turbopack for a fast feedback loop, while production-oriented targets use Webpack for closer release parity. The ClickHouse target also prepares a static export that can be served locally. A successful development start does not by itself prove that the production or ClickHouse build paths work (packages/…/package.json• L9-16).
| Package | Main role | Important checks |
|---|---|---|
@hyperdx/api | HTTP API and background work | Lint, unit, integration, migrations, and API documentation. |
@hyperdx/app | Web interface | Lint, unit, Playwright, Storybook, and production or ClickHouse builds. |
@hyperdx/common-utils | Shared query and data rules | Lint, unit, integration, and mutation checks. |
@hyperdx/cli | Terminal interface | Lint, unit, build, and platform compile checks. |
@hyperdx/otel-collector | Collector image and configuration | Go unit checks and collector smoke tests. |
The main workflow separates fast checks from stateful checks. It runs unit tests after building workspace dependencies, runs API and shared-utility integration suites in four parallel shards, and runs collector checks only when collector or related ClickHouse configuration files change.
References: packages/…/package.json• L97-117 packages/…/package.json• L9-27 packages/…/package.json• L44-56 packages/…/package.json• L28-40 packages/…/formatNumber.test.ts• L7-190 .github/…/main.yml• L82-222
Local environments
Local work uses separate environments for long-lived development and short-lived tests. Worktree-based slots give each environment its own Compose project, ports, data volumes, and logs so engineers can work in parallel without changing another worktree's services.
Local development stack
yarn dev starts the development Compose services and the source-based API, app, alert task, and shared utility processes. Docker supplies MongoDB, ClickHouse, and the OpenTelemetry Collector. yarn dev:local keeps the front-end loop lighter by using an app mode that does not need the API and MongoDB.
The root docker-compose.yml serves a different purpose. It describes a packaged-app environment with the app image and its supporting stores. It is not the slot-based source development or CI test stack. Use yarn dev:down or make dev-clean when a development stack and its local discovery state must stop.
This diagram shows how local commands connect source processes to supporting services.
flowchart LR
C[Yarn and Nx commands] --> P[API and app processes]
C --> D[Development Compose project]
D --> M[MongoDB]
D --> H[ClickHouse]
D --> O[OpenTelemetry Collector]
P --> M
P --> H
O --> H
References: package.json• L34-47 scripts/dev-env.sh• L3-84 docker-compose.dev.yml• L6-133 docker-compose.yml• L17-126
Isolated test environments
Integration and Playwright environments use different Compose projects from normal development. The integration stack supplies ClickHouse, MongoDB, and the collector while the API and test runner stay outside Compose. The E2E stack supplies its own MongoDB and ClickHouse, then runs the API and app against those stores.
The Makefile assigns a slot range to integration tests and records their logs. The E2E runner assigns another range to its stores and processes. A slot can be overridden when a port is in use. Stop a test stack through its generated Compose project rather than a generic docker compose down, so one worktree cannot stop another worktree's services.
In CI, each integration shard runs on its own runner and its own Docker stack. The four shards split test files across runners, but each runner keeps the package suites serial because they share database state and fixed mock-service ports. A stable integration job reports the combined result for branch protection.
References: docker-compose.ci.yml• L1-45 packages/…/docker-compose.yml• L1-43 Makefile• L6-44 Makefile• L123-186 scripts/test-e2e.sh• L30-70 .github/…/main.yml• L100-164
Database changes
Database changes are part of the development workflow because application state and telemetry use different stores. MongoDB and ClickHouse each have their own migration history, so a schema change must target the store whose data shape changes.
Migration workflow
MongoDB migrations live under packages/api/migrations/mongo. ClickHouse migrations use ordered SQL files under packages/api/migrations/ch. make dev-migrate-db applies both migration sets in sequence, while API package commands can create a migration or apply one store on its own.
Use this sequence for a schema change:
- Identify whether the change affects MongoDB, ClickHouse, or both.
- Create the matching migration with the API package command.
- Review forward and rollback behavior.
- Apply it to the intended local database.
- Run API integration checks and the affected data or browser checks.
The migration checks cover legacy data and repeat runs. In particular, alert display fields must preserve explicit values and a backfill must not change already populated records when it runs again.
References: Makefile• L233-239 packages/…/package.json• L111-116 packages/…/migrate-mongo-config.ts• L1-31 packages/…/000001_add_is_delta_n_is_monotonic_fields_to_metric_stream_table.up.sql• L1-20 packages/…/migrations.int.test.ts• L31-226
Test workflows
The test layers answer different questions. Unit tests check local rules with little outside state. Integration tests check service and database contracts. Playwright checks user flows through the app. Collector smoke tests check telemetry delivery and storage through real containers.
Unit test workflow
Unit tests run through each package's ci:unit target. The root target builds dependent packages first, which keeps tests aligned with compiled workspace output. Local dev:unit targets keep a watcher open for focused changes.
The API unit suite protects local service rules before a live service check. Its current coverage includes environment and startup safety, provider selection, default source setup, MCP server metadata and query validation, metric selection rules, webhook URL and template validation, private-address blocking, password rules, error classification, and MCP tool behavior hints. The service-health rules also have focused checks for comparison windows, low-volume baselines, status thresholds, ranking, error groups, and error timing. These checks catch unsafe defaults and invalid tool input without requiring MongoDB or ClickHouse.
The app unit suite protects the boundary between user actions and the data shape passed to the next layer. Its current coverage includes:
- Chart, table, row, service-dashboard, and metadata states stay consistent during loading, refresh, empty results, errors, formatting, grouping, paging, and row actions.
- Chart forms preserve runnable and saved settings across builder, raw SQL, and PromQL modes. Generated SQL and PromQL previews describe the query that ran, while chart-specific settings remain scoped to the active display.
- Time-chart shaping keeps empty buckets, comparison periods, group and value-column identity, semantic colors, and high-cardinality series limits consistent. Comparison pairs and multi-value groups remain whole when a cap hides data (packages/…/ChartUtils.test.ts).
- Time-chart axis formatting keeps labels readable and distinct across units, negative values, narrow ranges, reference lines, stacked data, and sparse or flat data. Click and tooltip payloads stay tied to the drawn series.
- Heatmaps cover distribution, series, and histogram views. Their tests protect time buckets, numeric and log scales, histogram bounds, counts, percentiles, tooltips, and mode controls.
- Dashboard filters and Markdown variables show a clear result when required values are missing or out of scope. Filter editing keeps type-specific fields, variable names, selection limits, requirement scope, and ad hoc conditions aligned when a filter changes type.
- SQL, Lucene, and PromQL controls keep language-specific completion, variable expansion, filter operators, request rules, query types, reducers, and table row shapes aligned.
- Trace and service views keep span, log, metadata, and dashboard data related. Time range text round-trips across clocks and years, display zones, and daylight-saving changes, while row tables preserve selection, sorting, expansion, side-panel actions, and safe paging on errors.
- Trace row hints and side-panel state keep URL selections, opened rows, breadcrumbs, and waterfall highlights synchronized without restoring a selection after a user clears it.
- User preferences keep content font size stable across old and new local storage values. Preference migration handles older theme and UTC fields, incomplete data, and storage failures without blocking the app. The preferences modal persists time-zone and row-click choices. Navigation labels, annotation tooltips, resizable panels, streaming results, and alert panels retain clear state during user actions.
- Search result controls keep column selection and sort drafts separate from applied query text. They support defaults, reset and cancel behavior, repeated fields, tuples, quoted names, aliases, and safe empty states.
- Field and filter options keep SQL and PromQL metadata paths distinct. They quote non-bare names, expose nested Map and JSON keys, and avoid SQL lookups when a PromQL filter needs label metadata.
- Source discovery and number-format rules keep metric table choice, source inference, duration formats, formulas, and validation feedback consistent. Responsive controls and exception details retain useful labels and accessible states.
The common utility suite protects shared contracts used by both API and app code. Its filter checks cover include and exclude values, nested expressions, date types, escaping, variable expansion, and validation before a filter reaches SQL, Lucene, or PromQL (packages/…/filters.test.ts). Other checks cover metadata, query configuration, date and chart conversion, dashboard export and import, SQL expression parsing, time-zone conversion, number and duration formats, and query ordering. Span predicate checks also keep current and legacy error statuses and server span kinds queryable.
Use make ci-unit for the broad unit check used by the main workflow. Use npx nx run <project>:dev:unit or a package workspace script for a focused loop.
References: nx.json• L29-38 Makefile• L188-196 packages/…/package.json• L104-110 packages/…/serviceHealthComparison.test.ts• L65-140 packages/…/serviceHealthRank.test.ts• L30-382 packages/…/package.json• L17-24 packages/…/HDXMultiSeriesTimeChart.test.ts• L31-1144 packages/…/source.test.ts• L61-815 packages/…/UserPreferencesModal.test.tsx• L29-83 packages/…/useUserPreferences.test.tsx• L15-422 packages/…/timeQuery.test.ts• L6-151 packages/…/timeZone.test.ts• L11-80 packages/…/TimePicker.test.tsx• L12-77 packages/…/utils.test.ts• L112-395 packages/…/TimeZoneSelect.test.tsx• L23-65 packages/…/ColumnsPopover.test.tsx• L49-260 packages/…/SortPopover.test.tsx• L48-220 packages/…/useClauseFieldOptions.test.tsx• L50-91 packages/…/useAdhocFilterOptions.test.tsx• L59-277 packages/…/DBRowSidePanel.spanSelection.test.tsx• L180-254 packages/…/useOpenedRowSpanSelection.test.tsx• L131-171 packages/…/useRowHighlightHint.test.tsx• L53-206 packages/…/SplitValueButton.test.tsx• L5-53 packages/…/ExceptionSubpanel.test.tsx• L17-78 packages/…/OnboardingModal.test.tsx• L79-178 packages/…/package.json• L49-56 packages/…/filters.test.ts• L55-404 packages/…/utils.test.ts• L47-1548 packages/common-utils/src/__tests__/spanPredicates.test.ts#L6-... (line truncated to 2000 chars)
Integration test workflow
Integration tests run against real MongoDB or ClickHouse state. The API and common utility suites use dedicated Jest integration settings. The Makefile starts the CI Compose stack, runs the selected target, records logs for the developer portal, and tears the services down.
Run make ci-int for the combined local check. Use make dev-int FILE=<path> or make dev-int-common-utils FILE=<path> for a focused loop. Local runs are serial because suites share service state. CI uses four runners, one Docker stack per runner, and Jest file sharding. Each runner runs both package suites serially so shared databases and fixed mock-service ports remain safe.
These checks cover authenticated routes, dashboard and alert round trips, onboarding, infrastructure-as-code resource manifests, migrations, alert evaluation, notifications, and ClickHouse chart rendering. They also cover MCP source discovery, query, webhook, dashboard, and service-health tools; webhook secret handling and delivery validation; Prometheus proxy and fallback behavior; read-only query limits, metric types, error categories, and source ownership. MCP dashboard checks preserve unsupported PromQL tiles during edits, while service-health checks validate source kind, comparison data, service ranking, error groups, and trace status variants against real stored spans. Dashboard tests protect both internal routes and the external API's translation between legacy chart data and the current dashboard shape. Lookup and timeout failures must fail closed instead of returning incomplete results.
This diagram shows the integration boundary between code under test and external state.
sequenceDiagram
participant R as Test runner
participant A as API or shared utilities
participant M as MongoDB
participant H as ClickHouse
R->>A: Run integration cases
A->>M: Read or write application state
A->>H: Query telemetry data
M-->>A: Return stored state
H-->>A: Return telemetry result
A-->>R: Report contract result
References: packages/…/jest.int.config.js• L16-31 packages/…/jest.int.config.js• L5-18 Makefile• L157-186 .github/…/main.yml• L100-164 packages/…/promqlTiles.int.test.ts• L9-88 packages/…/serviceHealthTool.int.test.ts• L52-295 packages/…/queryTool.int.test.ts• L28-178 packages/…/dashboard.int.test.ts• L38-68 packages/…/migrations.int.test.ts• L31-226 packages/…/queryChartConfig.int.test.ts• L14-252
Playwright workflow
Playwright tests check the app as an engineer or user sees it. Full-stack mode starts the API and app and uses isolated MongoDB and ClickHouse services. Local mode starts only the front end and ClickHouse for search and display work that does not need authentication or persistence.
Full-stack setup seeds telemetry, creates a test user and team, applies sources, and saves authenticated browser state. The seed covers logs, traces, sessions, metrics, PromQL series, and filter cases. Tests tagged @full-stack stay out of local mode because they need backend state.
CI uses a shared E2E setup action. It installs immutable Yarn dependencies, builds workspace dependencies, caches and installs the pinned Chromium version, starts the E2E Compose project, and waits for MongoDB and ClickHouse health before the caller runs Playwright. The caller remains responsible for checkout, the browser run, artifacts, and teardown.
Browser coverage follows the main product paths:
- Navigation and smoke paths.
- Search selection, export, live tail, row detail, virtualized row layout, and filter behavior.
- Dashboard creation, filters, temporary and saved state, favorites, chart editing, and alerts.
- Dashboard cell actions that add, remove, or replace ad hoc filters across search, grouped tables, raw SQL, PromQL, charts, complex fields, and side-panel values (packages/…/dashboard-adhoc-click-filters.spec.ts).
- PromQL expressions, aliases, previews, instant and range queries, reducers, and saved settings.
- Shared SQL, Lucene, and multiline input behavior.
- Source configuration persistence, complete source updates, feature-flagged metric fields, and trace waterfall navigation.
Reusable page objects keep table and side-panel actions stable across these flows. They cover virtualized rows, inline expansion, row errors, JSON filters, trace tabs, span selection, breadcrumbs, and linked spans rather than making each feature test its own browser selectors.
Use make e2e or ./…/test-e2e.sh for a full run. Use --local, --ui, --debug, --headed, --grep, or --last-failed to narrow the loop. Use yarn test:e2e:ci from packages/app for the pinned Playwright container and production-style build.
This diagram shows the two E2E modes and their shared browser-test stage.
flowchart TD
A[Start E2E slot] --> B[Start ClickHouse]
B --> C{Full-stack mode?}
C -->|No| D[Seed ClickHouse]
C -->|Yes| E[Start MongoDB]
E --> F[Start API and app]
F --> G[Create user, sources, and auth state]
D --> H[Run browser tests]
G --> H
H --> I[Write reports and failure artifacts]
I --> J[Stop containers unless kept]
CI retries failed tests and uses multiple workers by default. Retry and worker counts can be overridden with E2E_RETRIES and E2E_WORKERS. Reports, screenshots, videos, and traces support diagnosis when a shard fails.
References: .github/…/action.yml• L1-113 packages/…/run-e2e.js• L25-100 packages/…/playwright.config.ts• L4-128 scripts/test-e2e.sh• L30-70 packages/…/docker-compose.yml• L1-43 packages/…/global-setup-fullstack.ts• L1-120 packages/…/sources.spec.ts• L108-425 packages/…/traces-workflow.spec.ts• L10-246 packages/…/SidePanelComponent.ts• L9-347 packages/…/TableComponent.ts• L7-319 packages/…/seed-clickhouse.ts• L250-255 packages/…/dashboard-adhoc-click-filters.spec.ts• L28-785
Smoke test workflow
Collector smoke tests check the telemetry edge without starting the full HyperDX app. Bats sends OTLP logs, traces, or metrics to standalone collector setups, then queries ClickHouse to confirm delivery and storage.
The suite checks signal routing, normalization, schema variants, custom pipelines, and collector authentication. It waits for service readiness and polls for the expected row count, so a result depends on data arrival rather than a fixed delay. Run cd smoke-tests/otel-collector && bats .; set SKIP_CLEANUP=1 or SKIP_CLEANUP=true to inspect containers after a failure. The main workflow runs this suite when collector, smoke-test, collector configuration, ClickHouse configuration, or CI Compose files change.
References: smoke-tests/…/README.md• L1-70 smoke-tests/…/setup_suite.bash• L7-25 smoke-tests/…/utilities.bash• L24-129 smoke-tests/…/docker-compose.yaml• L3-50 .github/…/main.yml• L187-222
Developer visibility
The developer portal gives one view of local development, E2E, and integration environments. It does not run services. It discovers Compose containers and local slot records, probes known ports, and exposes current and archived logs so an engineer can identify which worktree owns a process before debugging it.
Developer portal
The portal normally listens on port 9900. Development and E2E helpers start it when needed and write the worktree, branch, slot, service ports, and log directory to the local slot record. The portal combines that record with Docker labels to show API, app, alert, utility, database, collector, and test-runner state.
Use make dev-portal to start it directly or make dev-portal-stop to stop it. It can stream current logs and open archived runs for development, E2E, and integration slots.
References: scripts/ensure-dev-portal.sh• L1-24 scripts/dev-env.sh• L91-142 scripts/…/server.js• L35-78 scripts/…/server.js• L242-382 scripts/…/server.js• L467-576 Makefile• L91-103
Change checklist
When these files or sections are changed, remember to consider these:
- Keep Nx target names, dependency edges, cache inputs, package scripts, and ratchet baselines aligned. A missing target or stale input can omit a check or reuse a result from the wrong environment.
- Keep API and app package scripts aligned with the root Nx and Make targets. The app's fast development bundler and production build bundler are separate paths, while API unit, integration, migration, and documentation commands use different state and contract boundaries.
- Keep affected-project CI selection, full-branch targets, cache restore and save behavior, unconditional repository gates, and the stable integration aggregator aligned. A job can appear green while a required check did not run.
- Keep the release install mode, Node version, shared-utils build, changesets publish command, and package publish hooks aligned. A release can create tags while a package publish hook cannot resolve its workspace output.
- Keep API route documentation, the OpenAPI generator, the committed specification, and the uncached sync check aligned. A cached or affected-only run must not hide a changed public contract.
- Keep development, integration, and E2E slot allocators aligned with Compose project names, host ports, data volumes, and portal records. A mismatch can cause collisions or hide a healthy stack.
- Keep migration directories, store configuration, commands, and rollback behavior aligned. Backfills must preserve explicit old values and remain safe on repeat runs.
- Keep MCP tool schemas, metadata, ownership, safety hints, and integration fixtures aligned. A tool can remain callable while giving clients stale action data or the wrong team scope.
- Keep chart response shaping, filter parsing, query generation, and dashboard cell actions aligned. A change can make a chart look correct while sending a different filter to the API.
- Keep display time-zone parsing, formatting, range defaults, and preference migration aligned. A change in one boundary can shift a range or lose an existing user's setting.
- Keep search column and sort draft state aligned with query parsing and metadata field quoting. A valid-looking toolbar change can still produce an invalid query.
- Keep SQL Map and JSON key discovery aligned with expression formatting and PromQL label lookup. A field can appear in suggestions while generating the wrong clause or querying the wrong source.
- Keep E2E mode flags, tags, seeded sources, database helpers, browser URLs, and time windows aligned. Full-stack cases must not run against local mode or another slot.
- Keep smoke-test collector endpoints, credentials, ClickHouse ports, readiness checks, and row-count queries aligned. A passing request is not enough if the assertion reads another store.
- Keep portal service names and log directories aligned with names emitted by development, E2E, and integration runners.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| Two worktrees use the same development or test slot | Ports, Compose projects, or persistent data collide | Use a worktree-derived slot or set a unique HDX_DEV_SLOT, HDX_CI_SLOT, or HDX_E2E_SLOT. |
| A unit target runs before dependent packages are built | Tests import missing or stale workspace output | Use the Nx ci:unit target or run ci:build first. |
| Integration tests use a stopped or wrong Compose project | Checks fail as connection errors or validate stale data | Start the matching CI Compose project and use its slot-specific ports. |
| A CI check is hidden by affected selection or a stale cache | A required contract can break without the expected job running | Keep unconditional gates, cache inputs, and the integration aggregator aligned with the workflow. |
| A release runs with an incomplete install or without the shared-utils build | Changesets can publish tags while a package publish hook skips or fails to resolve workspace output | Use the .nvmrc Node version, install the lockfile dependencies, and build common-utils before yarn release. |
| The app passes in development but fails in the production build path | Release output fails even though the local server worked | Run the Webpack production build as well as the Turbopack development loop. |
| A migration uses the wrong database endpoint | State changes in an unintended database or the migration appears to do nothing | Check migration configuration and the active Compose port. |
| A migration backfill overwrites populated alert fields | User-defined names or tags are lost | Preserve populated fields and verify an immediate rerun is idempotent. |
| A tool omits or changes an MCP behavior hint | A client cannot safely classify the action before calling it | Keep all four hints boolean for every listed tool. |
| A filter or chart contract changes without the browser flow | A tile displays one state while its URL or query carries another | Run the affected unit and full-stack dashboard filter checks. |
| A display time zone is applied only to formatting or only to parsing | A range shifts, clamps, or fails to round-trip near a year or daylight-saving boundary | Run the time-range, time-zone, and TimePicker checks with an explicit display zone. |
| Preference migration accepts only the current storage shape | Existing users lose time-zone, theme, or row-click settings after an upgrade | Run migration checks for legacy, partial, invalid, and already migrated data. |
| Search column or sort drafts accept an empty or custom value incorrectly | The toolbar sends an invalid query or silently discards a user change | Run popover checks for reset, cancel, quoted fields, tuples, and empty states. |
| Metadata option logic treats Map, JSON, or PromQL data as scalar SQL fields | Field suggestions produce invalid expressions or query the wrong metadata source | Run field and ad hoc filter checks with nested keys and PromQL label metadata. |
| Full-stack E2E runs without full-stack mode | Tests lack the API, auth, or MongoDB state they need | Set E2E_FULLSTACK=true or use the full-stack runner. |
| E2E data falls outside the test time window | Search, dashboard, or metric assertions find no seeded events | Rerun E2E setup or the full test command to reseed data. |
| Smoke tests assert before the collector flushes its batch | ClickHouse checks see partial or missing rows | Wait for the expected row count and inspect collector errors on timeout. |
| Portal names or log paths drift from runner output | The portal reports a service as down or hides its logs | Update the portal mapping with every runner naming change. |
Key files
| File | Why to read it |
|---|---|
| package.json | Defines the root Yarn and Nx entry points for setup, development, and CI checks. |
| yarn.lock | Records dependency versions used by local and CI installs. |
| nx.json | Defines target dependencies, cache inputs, runtime sensitivity, and build-before-test behavior. |
| .github/…/main.yml | Defines affected and full lint paths, cache handling, unit checks, integration shards, collector gates, and result aggregation. |
| .github/…/release.yml | Defines the release install, shared-utils build, changesets publish path, and package publishing gates. |
| .github/…/action.yml | Defines the shared CI setup for E2E ports, dependencies, builds, browser caching, Compose startup, and health waits. |
Makefile | Provides commands for local stacks, unit and integration checks, E2E tests, migrations, OpenAPI sync, and portal control. |
| scripts/dev-env.sh | Defines worktree slots, service ports, data separation, logs, and portal discovery. |
| docker-compose.dev.yml | Describes supporting services for normal source development. |
| docker-compose.ci.yml | Describes isolated services for integration checks. |
| packages/…/package.json | Defines API unit, integration, migration, and documentation commands. |
| packages/…/package.json | Defines app development and production build paths, unit checks, Playwright commands, and Storybook. |
| packages/…/serviceHealthTool.int.test.ts | Shows how a real trace store validates the MCP service-health contract. |
| packages/…/promqlTiles.int.test.ts | Shows how dashboard edits preserve unsupported PromQL tiles. |
| packages/…/migrations.int.test.ts | Shows how migrations are checked against legacy data and repeat runs. |
| packages/…/playwright.config.ts | Defines browser modes, server startup, retries, workers, URLs, and failure artifacts. |
| scripts/test-e2e.sh | Starts isolated E2E services, waits for readiness, and runs the browser suite. |
| packages/…/global-setup-fullstack.ts | Defines full-stack user, source, telemetry, and authentication setup. |
| packages/…/sources.spec.ts | Shows source configuration and persistence checks in the browser. |
| packages/…/traces-workflow.spec.ts | Shows trace search, waterfall, filter, and span-selection checks. |
| packages/…/SidePanelComponent.ts | Provides shared browser actions for row details, trace navigation, filters, and linked spans. |
| packages/…/TableComponent.ts | Provides shared browser actions for virtualized rows, expansion, selection, and side-panel opening. |
| packages/…/HDXMultiSeriesTimeChart.test.ts | Shows chart axis, visible-series, tooltip, and gradient contracts. |
| packages/…/useUserPreferences.test.tsx | Shows safe migration of stored user preferences across old and current shapes. |
| packages/…/utils.test.ts | Shows time-range parsing and formatting across clocks, zones, years, and daylight-saving boundaries. |
| packages/…/ColumnsPopover.test.tsx | Shows applied and draft column-selection behavior for search results. |
| packages/…/SortPopover.test.tsx | Shows field, tuple, custom SQL, reset, and cancel behavior for result ordering. |
| packages/…/useAdhocFilterOptions.test.tsx | Shows how SQL and PromQL filters obtain safe field and value options. |
| packages/…/useRowHighlightHint.test.tsx | Shows how browser-row hints and trace selections stay synchronized. |
| packages/…/filters.test.ts | Shows filter parsing, query escaping, variable expansion, validation, and renderability rules. |
| packages/…/utils.test.ts | Shows shared contracts for time conversion, query ordering, chart configuration, SQL expressions, and value formatting. |
| packages/…/spanPredicates.test.ts | Shows compatibility rules for error status and server span predicates. |
| smoke-tests/…/setup_suite.bash | Defines collector smoke-test setup and teardown. |
| smoke-tests/…/utilities.bash | Defines telemetry emission, readiness polling, row polling, and cleanup. |
| scripts/…/server.js | Defines environment discovery, health display, log streaming, and run history. |