nolapse.yaml
nolapse.yaml is the per-repository configuration file for nolapse. It controls which language runner is used, how aggressively coverage regressions are enforced, and whether warnings are treated as failures.
File location and discovery
Section titled “File location and discovery”Place nolapse.yaml in the root of your repository — the same directory that contains your .git folder. nolapse looks for this file relative to the --repo path (which defaults to the current working directory).
my-project/├── .git/├── .audit/│ └── coverage/│ └── baseline.md├── nolapse.yaml ← here└── ...If no nolapse.yaml is found, nolapse uses built-in defaults (see each field below).
Schema
Section titled “Schema”lang: go # go | pythonwarn_threshold: -1.0 # max tolerated regression before warn (negative = regression)fail_threshold: -5.0 # max tolerated regression before fail (negative = regression)strict_mode: false # when true, warn exits 1 instead of 0Fields
Section titled “Fields”| Type | Default | Allowed values |
|---|---|---|
| string | go | go, python |
Selects which coverage runner nolapse invokes when executing nolapse run and nolapse init.
go— runsgo test -coverprofile=...and parsesgo tool coveroutput.python— runspytest --covand parses thecoverage.pysummary.
lang: pythonwarn_threshold
Section titled “warn_threshold”| Type | Default (no yaml) | Unit |
|---|---|---|
| float | -0.5 | percentage points |
The minimum coverage delta before nolapse emits a warning. Values are expressed as negative numbers because they represent regressions (drops in coverage).
- A value of
-1.0means: warn if coverage drops by more than 1.0 percentage point. - The built-in default when no
nolapse.yamlexists is equivalent to-0.5.
fail_threshold
Section titled “fail_threshold”| Type | Default (no yaml) | Unit |
|---|---|---|
| float | -1.0 | percentage points |
The coverage delta at which nolapse exits non-zero. Must be a more negative value than warn_threshold (a larger allowed regression).
- A value of
-5.0means: fail if coverage drops by more than 5.0 percentage points. - The built-in default when no
nolapse.yamlexists is equivalent to-1.0.
fail_threshold: -5.0strict_mode
Section titled “strict_mode”| Type | Default | Effect |
|---|---|---|
| bool | false | When true, a warn result exits 1 instead of 0 |
By default, a warning is informational — nolapse prints a message but exits 0, so CI passes. Setting strict_mode: true causes warnings to also exit 1, blocking the pipeline.
strict_mode: trueThis is equivalent to passing --strict-mode on every nolapse run invocation.
CLI flag overrides
Section titled “CLI flag overrides”All nolapse.yaml values can be overridden per-run using CLI flags. Flags always take precedence over the config file.
| yaml field | CLI flag | Note |
|---|---|---|
warn_threshold | --warn-threshold <float> | Positive value on CLI |
fail_threshold | --fail-threshold <float> | Positive value on CLI |
strict_mode | --strict-mode | Boolean flag (no value) |
lang | --lang <go|python> | Selects runner |
Example — temporarily tighten enforcement for a single run without changing the config file:
nolapse run --warn-threshold 0.1 --fail-threshold 0.5Example configurations
Section titled “Example configurations”Tight enforcement (production service)
Section titled “Tight enforcement (production service)”Warn on any regression, fail on anything over 0.5 pp. Warnings block CI.
lang: gowarn_threshold: -0.0fail_threshold: -0.5strict_mode: trueGradual adoption (legacy codebase)
Section titled “Gradual adoption (legacy codebase)”Allow coverage to drift up to 3 pp before warning, 10 pp before failing. Gives teams time to improve without blocking every PR.
lang: gowarn_threshold: -3.0fail_threshold: -10.0strict_mode: falsePython project with moderate enforcement
Section titled “Python project with moderate enforcement”lang: pythonwarn_threshold: -1.0fail_threshold: -3.0strict_mode: falseStrict Python project
Section titled “Strict Python project”lang: pythonwarn_threshold: -0.5fail_threshold: -1.0strict_mode: true