mehen.toml thresholds evaluated inside the binary against absolute values,
and the GitHub Action’s thresholds input evaluated against per-file
deltas. This page explains how they differ, how they compose with the JSON output of
mehen diff, and how to write your own gating logic in CI.
Repository thresholds (mehen.toml)
Amehen.toml at the repository root gates every command — locally, in pre-commit hooks, and in
any CI system:
mehen metrics, mehen diff (head side), and mehen top-offenders exit 1 when a reported
metric crosses its limit, after a grouped stderr report that names the config table to adjust.
Limits bound where a metric may be: a file over the limit fails the gate even if the current
change didn’t move it. Full reference: Configuration.
Action threshold input
mehen diff and then evaluates each per-file delta against the supplied limits. A
violation:
- Counts toward the
violationsoutput. - Fails the action when
fail-on-threshold: true(default).
mehen.toml thresholds to bound both.
Adverse direction
Each metric has an adverse direction. Thresholds limit how far in the adverse direction a per-file delta is allowed to go:
mehen knows the direction for the standard metrics and applies the threshold accordingly.
Composition with diff JSON
If you want richer logic than the action provides, runmehen diff -O json yourself and pipe the JSON
into a CI script:
jq and the JSON shape give you full control. The downside: you reimplement adversity rules.
See also
- Configuration —
mehen.tomlreference: absolute thresholds, per-language overrides, the violation report. - GitHub Action — full input/output reference.
- Commands → diff —
mehen diffCLI reference. - Output formats — JSON shape.