Skip to content

Debug build is not covered by default tests #19

@abdyek

Description

@abdyek

Compono uses Go build tags to separate debug-only behavior:

//go:build debug
//go:build !debug

By default, tests are executed with:

go test ./...

This means that code behind the debug build tag is not compiled or tested unless tests are explicitly run with:

go test ./... -tags debug

As a result, debug-only code paths (including debug output used during development) are currently not covered by tests, which caused an issue that only surfaced when running tests with the debug tag enabled.

Why this matters

  • The default test command correctly validates production behavior
  • However, debug behavior can silently break without being noticed
  • This creates a gap in test coverage and developer confidence

Decision

Going forward, both test modes are considered valid and required:

go test ./...              # production behavior
go test ./... -tags debug  # debug behavior

This will be:

  • Documented in CONTRIBUTING.md
  • Enforced in CI

This issue serves as a reference for why two separate test commands are required.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions