Fixed
-
A negative number in any setting is now refused, instead of quietly turning
the gate off.pricing.usd_per_tib: -6.25— one typed minus sign — made
every cost negative, so all three money thresholds stopped firing while the
report still looked ordinary. A 3 TiB model against a USD 10 ceiling went from
GATE: FAIL/ exit 1 toGATE: PASS/ exit 0. A negativerun_frequencydid
the same to the per-month threshold.Ten of the twelve numeric settings accepted a negative value; only
pricing.regionsandpricing.free_tib_per_monthrefused one. All twelve now
do, on the command line as well as in the file:dbt-costgate: .dbt-costgate.yml: pricing.usd_per_tib: must not be negative, got -6.25. dbt-costgate: --usd-per-tib: must not be negative, got -6.25.Zero is unaffected — it still means flat-rate slots for a rate, and a
declared-but-spent allowance for the free tier. If you have a negative value in
a config today, the run now stops at exit 2 and names the key rather than
reporting a number nobody should act on. -
A run frequency written as a fraction is refused rather than silently
rounded down.run_frequency.default: 3.7became3, so every monthly
figure was a fifth too low and nothing said so.
Changed
-
An unreadable config file now says what is wrong and where. The message
used to carry four lines of parser internals — including a caret diagram and
<unicode string>— flattened onto one line, which buried the only part worth
reading. Now:dbt-costgate: .dbt-costgate.yml is not valid YAML: expected ',' or ']', but got '<stream end>' (line 3, column 1). -
Config error messages read as sentences:
must not be negativerather than
must be >= 0, and the few that were missing a full stop have one.