Skip to main content

host_integer_or

Function host_integer_or 

Source
pub fn host_integer_or(
    settings: &Settings,
    key: &str,
    default: i64,
    range: RangeInclusive<i64>,
) -> i64
Expand description

A HOST key: a setting that describes the machine — how many heavy checks it runs at once, how far its load may stretch a budget — and so is read from --global or --system config only (ADR-0009). A value set in a repository is ignored with one warning naming the scope to use: two repositories that disagreed about the host’s slot count would each take slots the other never sees. An environment variable named after the key (amont.idleLoadScale → AMONT_IDLE_LOAD_SCALE) outranks both, which is the precedence cli.config.precedence gives it: flag or environment, then the person’s config, then the system’s, then the default. The amont.conf policy ladder does not apply: a committed file cannot set a host key.

One --show-scope scan per Settings, run on the first host key read and never before: amont.idleLoadScale is read when the first observed tool of any check is spawned, so a commit that runs no tool spawns nothing for it and one that does pays exactly one spawn, pinned by spawn_budget.rs.