Introducing a new way to review your PRs.

Read the announcement

bruin-data / dac

DaC is a dashboard-as-code tool. Build interactive dashboards using YAML and JSX. Built-in semantic layer. Get your agents to build standardized, reviewable dashboards.

View on GitHub

20 documents · Updated Nov 23, 2026

docs / platform-operations

Platform operations and delivery

Platform operations keep DAC current, visible, testable, and ready to ship. They connect local development with locked automation, release artifacts, installation, upgrades, and documentation publishing so a source change can become a usable CLI on a supported platform.

Operational model

DAC follows one delivery path with three linked stages: local work, automated proof, and release delivery. Each stage checks a stronger form of the product, from source changes and live reload to a packaged binary that can install and run on a clean supported machine.

Local development loop

The local loop lets an engineer work on the browser view and the Go command as one product. Make targets cover dependency setup, browser asset creation, compilation, tests, style checks, action-lock checks, and live reload.

The normal loop is:

  1. Install Go and front-end dependencies.
  2. Run the development target for live browser and Go-server feedback.
  3. Run formatting, tests, and a build before handing the change to automation.
  4. Verify GitHub Actions references when workflow changes affect the lock file.

The Go binary needs the built browser assets. A local build therefore turns the browser view into part of the same executable that serves the dashboard. The local targets also build the component library and the MCP dashboard viewer when those delivery outputs need review.

References: Makefile• L23-52 Makefile• L57-91 Makefile• L93-106

Packaged application boundary

The packaged application is one DAC binary with the browser experience included. This boundary keeps local serving and released serving aligned while still allowing development to use separate live-reload processes.

Release tooling adds version and commit identity to the binary. That identity lets users and support tools recognize the running artifact. The related Updates, versioning, and telemetry page explains how the identity supports update checks and anonymous usage signals.

The Go module fixes the toolchain and the external inputs used by command parsing, query work, asset handling, network access, and telemetry. Its checksum record helps local and automated builds use the same verified dependency graph.

References: Makefile• L1-7 go.mod• L1-62 go.sum• L1-219

Telemetry boundary

Telemetry is an optional observer of real command runs. When enabled, the process keeps an anonymous install identity, records command timing and runtime identity, and sends those signals to the telemetry service without making telemetry part of the command result.

The telemetry client stays quiet in the user's terminal. Client setup, missing install state, and event delivery remain best effort, so a telemetry problem does not stop a command or change its normal output. The related Updates, versioning, and telemetry page describes the user controls and event meaning in more detail.

References: main.go• L25-33 cmd/root.go• L19-25 pkg/…/telemetry.go• L23-30 pkg/…/telemetry.go• L57-95 pkg/…/telemetry.go• L98-145 pkg/…/telemetry.go• L147-193 pkg/…/state.go• L24-54

Automation trust boundary

GitHub Actions uses pinned action versions with recorded commit references. The lock file gives workflow changes a repeatable action set and provides a verification target before delivery.

The lock covers the actions used for version tags, CI, documentation, and stable or edge releases. A workflow can therefore change its product checks without silently changing the action code that runs those checks.

References: .github/…/actions.lock• L1-34 .github/…/actions.lock• L35-82 Makefile• L83-91

Automated verification

Automated verification checks product behavior and delivery boundaries before a change can become an edge release or a later stable release. Pull requests and pushes to main use the same core proof path.

CI proof stages

The CI job prepares the Go and Node toolchains and the Bruin query runtime. It then checks source form, runs tests, builds the binary and delivery-facing front-end outputs, and exercises representative public command paths.

The proof covers these boundaries:

BoundaryWhat the check proves
Dashboard setupFresh YAML and TSX projects can be created and validated
Query executionExample dashboards return data through the supported query path
Local serviceA served dashboard answers a browser-facing API request
InstallationA release-shaped archive installs and reports its version
Example projectsMaintained example forms remain valid
Component libraryThe reusable front-end library can be built in CI
MCP viewerThe self-contained dashboard viewer can be built and checked

CI also warms the Bruin query runtime before product checks run. This proof checks the handoff between source files, generated browser assets, the binary, the local server, the installer, the reusable front-end library, and the MCP viewer. Dependency changes are part of the same contract because they can change query, network, telemetry, or test behavior without changing application code.

References: .github/…/ci.yml• L12-65 .github/…/ci.yml• L66-127 Makefile• L48-81 go.mod• L1-62 go.sum• L1-219

Documentation delivery

Documentation has a separate build and publish path. Changes under docs/ trigger a VitePress build check in pull requests and on pushes to main; the check installs the pinned Node.js and npm tool versions, builds the site, and verifies that the VitePress output directory exists. The Pages workflow builds the site again and deploys the resulting artifact.

The build check uses Node.js 22.14.0 and npm 11.10.0. Deployment permits only one Pages deployment at a time, but it does not cancel a deployment already in progress. The build preserves the hidden .nojekyll marker so the published site is served as a complete static site.

References: .github/…/docs-build.yml• L1-43 .github/…/deploy-docs.yml• L1-20 .github/…/deploy-docs.yml• L22-63 docs/package.json• L1-15

Release delivery

Release delivery turns a trusted commit into installable artifacts for stable users or for users who choose the edge stream. Stable tags use the stable path, while pushes to main create a separate edge release.

Version tag path

Version bump workflows create stable tags from main on demand. One workflow requests a minor bump and the other requests a patch bump; both use the v prefix and create non-prerelease tags for the stable release path.

Stable delivery starts when a v* tag reaches the repository. The release job requires a telemetry key, then asks GoReleaser to build artifacts for supported operating systems and CPU types. It publishes archives and checksums through the stable release channel.

References: .github/…/bump-version-minor.yml• L1-29 .github/…/bump-version-patch.yml• L1-29 .github/…/release.yml• L1-50 .goreleaser.yaml• L1-60

Stable release assets

Stable delivery also creates assets for systems that consume the browser view or its reusable components. The extension asset uses a relative-path browser build, the component-library asset carries the tagged release version, and the MCP viewer is published with a checksum.

These assets extend the stable release contract beyond the CLI archive. Their names, paths, checksums, and version rules must remain aligned with the extension, component-library, and MCP consumers.

References: .github/…/release.yml• L51-85 .goreleaser.yaml• L13-35

Edge release path

Edge delivery gives each push to main a test release without changing the stable stream. The job creates an edge tag from the workflow run and commit, writes edge-channel install guidance, checks the telemetry key, and publishes through the same artifact builder.

Only one edge release runs for the branch at a time. A newer push cancels an older edge run, so the edge channel stays close to the newest source state.

References: .github/…/edge-release.yml• L1-17 .github/…/edge-release.yml• L19-42 .github/…/edge-release.yml• L44-81 .goreleaser.yaml• L3-35

Installation handoff

The installer is the public handoff from a release to a user machine. It selects stable or edge, maps the host operating system and CPU type to a published archive, installs the binary, and can install the Bruin CLI when needed.

The upgrade command reuses this official installer instead of creating a second update path. It keeps the current channel by default and refreshes project skills as a best-effort follow-up. The related Updates, versioning, and telemetry page covers update checks, version identity, and telemetry in more detail.

References: install.sh• L14-30 install.sh• L109-145 install.sh• L189-209 install.sh• L279-306 cmd/upgrade.go• L14-27 cmd/upgrade.go• L44-107

Delivery relationships

The main operational risk is a broken contract between stages. A change can pass local compilation and still fail when browser assets are embedded, a release tag selects a channel, or a clean machine installs an archive.

Stage handoffs

Each stage consumes an output from the prior stage and adds a stronger check. This diagram shows how a source change moves from local work to an installed CLI.

flowchart LR
    A[Source change] --> B[Local build and checks]
    B --> C[CI validation]
    C --> D{Release trigger}
    D -->|v tag| E[Stable artifacts]
    D -->|main push| F[Edge artifacts]
    E --> G[Stable installer]
    F --> H[Edge installer]
    G --> I[User CLI]
    H --> I

Release jobs depend on the same front-end and Go build assumptions as local development. The installer and update service then depend on archive names, edge tag shape, and release metadata staying aligned. Stable releases also expose the extension viewer, component library, and MCP viewer as release assets, so their asset names, checksums, and version rules must stay aligned with consumers.

References: Makefile• L32-52 .github/…/ci.yml• L48-65 .github/…/release.yml• L42-85 .github/…/edge-release.yml• L36-81 install.sh• L7-12 install.sh• L279-305 go.mod• L1-62 go.sum• L1-219

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep the front-end output path aligned with Go embedding, local builds, GoReleaser hooks, and the CI build step.
  • Keep supported operating systems, CPU types, archive names, and installer platform mapping aligned.
  • Keep stable and edge tag rules aligned with release triggers, release metadata, update checks, and upgrade hints.
  • Keep the telemetry key requirement aligned with release workflows and the linker values passed into published binaries.
  • Keep telemetry setup and event delivery non-fatal so client, state, or network faults cannot change command behavior.
  • Keep CI smoke commands aligned with public CLI flags, example project names, API routes, and installer archive layout.
  • Keep documentation build and deploy paths aligned with the VitePress output directory, hidden-file handling, and Pages artifact path.
  • Keep the documentation workflow's Node.js and npm versions aligned with the lockfile and the supported documentation toolchain.
  • Keep the action lock aligned with every uses entry in the changed workflows, and verify it after workflow edits.
  • Keep the Go dependency graph aligned with the toolchain and available to clean CI and release builds.
  • Keep release asset names, checksums, component-library versioning, and extension, component-library, and MCP embed paths aligned with their downstream consumers.

Important failure modes

TriggerConsequenceGuard
Front-end assets are not built before the Go binary is compiledThe packaged application cannot produce the expected viewerKeep the front-end build as a prerequisite and retain the CI build step
A workflow action changes without updating the action lockAutomation can use an unreviewed or unverifiable action revisionRun make actions-lock-verify after workflow changes
A release archive name differs from the installer's platform mappingThe installer cannot find or unpack the published binaryTreat GoReleaser archive templates and installer platform logic as one contract
The telemetry key is missing from a stable or edge release jobThe release stops before it publishes artifactsConfigure the repository secret before release delivery
A telemetry client, install-state, or event-delivery fault is treated as a command faultA monitoring problem can stop a user command or add provider logs to its outputKeep telemetry initialization and sending best effort with a silent client logger
A stable or edge tag does not match its workflow rulesNo release path runs or update checks select the wrong streamUse the expected stable and edge tag forms
A CI smoke path uses a changed dashboard name, flag, or API routeCI reports a false product failure or misses a broken public pathUpdate smoke inputs with the public command and API contract
The documentation output path or hidden-file handling changes without a workflow changeDocumentation builds or deploys an incomplete artifactKeep VitePress output, .nojekyll, and Pages upload paths in sync
The documentation workflow uses a tool version that does not match the lockfile or build scriptsThe documentation check fails before it can validate the siteKeep the workflow tool versions and documentation package inputs aligned
A dependency version or checksum is unavailable to a clean buildCI or release builds fail before product checks runReview go.mod and go.sum together
A release asset name, checksum, or package version changes without a consumer updateThe extension, component-library, or MCP consumer cannot load or verify the assetTreat release asset naming, checksums, and version metadata as published interfaces

Key files

FileWhy to read it
MakefileDefines the local dependency, build, test, check, action-lock, and live-reload loop
main.goShows where build identity and cross-cutting services enter the CLI
embed.goShows why the front-end build is part of the packaged application
go.modDefines the Go toolchain and dependencies used by local and automated builds
go.sumRecords dependency checksums for reproducible clean builds
.github/…/actions.lockRecords the action revisions used by delivery workflows
.github/…/ci.ymlShows automated proof from tool setup through smoke tests and front-end delivery builds
.goreleaser.yamlShows the supported release artifact shape and build metadata handoff
.github/…/bump-version-minor.ymlShows the controlled minor version tag path
.github/…/bump-version-patch.ymlShows the controlled patch version tag path
.github/…/release.ymlShows stable release gating and published extension, component-library, and MCP assets
.github/…/edge-release.ymlShows the edge release trigger, tag, and channel path
install.shShows the user-facing handoff from release archives to an installed CLI
cmd/upgrade.goShows how in-place upgrades reuse the official installer
.github/…/docs-build.ymlShows pull-request and main-branch documentation build checks and output validation
.github/…/deploy-docs.ymlShows the production documentation publish path
docs/package.jsonShows the documentation build commands used by automation
pkg/…/telemetry.goShows the optional command observer and its failure isolation
pkg/…/state.goShows the persistent anonymous installation identity used by telemetry