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:
- Install Go and front-end dependencies.
- Run the development target for live browser and Go-server feedback.
- Run formatting, tests, and a build before handing the change to automation.
- 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:
| Boundary | What the check proves |
|---|---|
| Dashboard setup | Fresh YAML and TSX projects can be created and validated |
| Query execution | Example dashboards return data through the supported query path |
| Local service | A served dashboard answers a browser-facing API request |
| Installation | A release-shaped archive installs and reports its version |
| Example projects | Maintained example forms remain valid |
| Component library | The reusable front-end library can be built in CI |
| MCP viewer | The 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
usesentry 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
| Trigger | Consequence | Guard |
|---|---|---|
| Front-end assets are not built before the Go binary is compiled | The packaged application cannot produce the expected viewer | Keep the front-end build as a prerequisite and retain the CI build step |
| A workflow action changes without updating the action lock | Automation can use an unreviewed or unverifiable action revision | Run make actions-lock-verify after workflow changes |
| A release archive name differs from the installer's platform mapping | The installer cannot find or unpack the published binary | Treat GoReleaser archive templates and installer platform logic as one contract |
| The telemetry key is missing from a stable or edge release job | The release stops before it publishes artifacts | Configure the repository secret before release delivery |
| A telemetry client, install-state, or event-delivery fault is treated as a command fault | A monitoring problem can stop a user command or add provider logs to its output | Keep telemetry initialization and sending best effort with a silent client logger |
| A stable or edge tag does not match its workflow rules | No release path runs or update checks select the wrong stream | Use the expected stable and edge tag forms |
| A CI smoke path uses a changed dashboard name, flag, or API route | CI reports a false product failure or misses a broken public path | Update smoke inputs with the public command and API contract |
| The documentation output path or hidden-file handling changes without a workflow change | Documentation builds or deploys an incomplete artifact | Keep VitePress output, .nojekyll, and Pages upload paths in sync |
| The documentation workflow uses a tool version that does not match the lockfile or build scripts | The documentation check fails before it can validate the site | Keep the workflow tool versions and documentation package inputs aligned |
| A dependency version or checksum is unavailable to a clean build | CI or release builds fail before product checks run | Review go.mod and go.sum together |
| A release asset name, checksum, or package version changes without a consumer update | The extension, component-library, or MCP consumer cannot load or verify the asset | Treat release asset naming, checksums, and version metadata as published interfaces |
Key files
| File | Why to read it |
|---|---|
Makefile | Defines the local dependency, build, test, check, action-lock, and live-reload loop |
| main.go | Shows where build identity and cross-cutting services enter the CLI |
| embed.go | Shows why the front-end build is part of the packaged application |
go.mod | Defines the Go toolchain and dependencies used by local and automated builds |
go.sum | Records dependency checksums for reproducible clean builds |
| .github/…/actions.lock | Records the action revisions used by delivery workflows |
| .github/…/ci.yml | Shows automated proof from tool setup through smoke tests and front-end delivery builds |
| .goreleaser.yaml | Shows the supported release artifact shape and build metadata handoff |
| .github/…/bump-version-minor.yml | Shows the controlled minor version tag path |
| .github/…/bump-version-patch.yml | Shows the controlled patch version tag path |
| .github/…/release.yml | Shows stable release gating and published extension, component-library, and MCP assets |
| .github/…/edge-release.yml | Shows the edge release trigger, tag, and channel path |
| install.sh | Shows the user-facing handoff from release archives to an installed CLI |
| cmd/upgrade.go | Shows how in-place upgrades reuse the official installer |
| .github/…/docs-build.yml | Shows pull-request and main-branch documentation build checks and output validation |
| .github/…/deploy-docs.yml | Shows the production documentation publish path |
| docs/package.json | Shows the documentation build commands used by automation |
| pkg/…/telemetry.go | Shows the optional command observer and its failure isolation |
| pkg/…/state.go | Shows the persistent anonymous installation identity used by telemetry |