pub struct Acceptances(/* private fields */);Expand description
Accepted benchmark names, each with every source that accepted it.
Keyed on the benchmark name alone, so an acceptance covers every tool and
runner that benchmark was measured with. The name is what a user declares
in tak.toml and sees in the report; the runner in particular is something
a commit author cannot know ahead of time.
Implementations§
Source§impl Acceptances
impl Acceptances
Sourcepub fn add_name(&mut self, name: &str, source: Source) -> Result<()>
pub fn add_name(&mut self, name: &str, source: Source) -> Result<()>
Add one exact name, as --accept gives it.
Not split on commas and not trimmed. Benchmark names are unrestricted,
so " startup " is a different benchmark from startup, and trimming
would accept the wrong one’s regression — waiving a gate nobody asked
to waive. The flag is repeatable, which covers every list without a
separator. An empty value is an error rather than skipped: it is
almost always an unset variable in a CI script, and silently accepting
nothing hides that.
Sourcepub fn add_trailer_log(&mut self, log: &str)
pub fn add_trailer_log(&mut self, log: &str)
Parse the output of crate::notes::trailers: one line per commit,
the SHA and then each trailer value, NUL-separated.
One trailer names one benchmark, the whole value, exactly as --accept
takes one name per flag. It used to be split on commas, which made a
benchmark named a,b impossible to accept and Tak-Accept: a,b accept
two unrelated ones instead — waiving gates nobody named. Benchmark
names are unrestricted, so no separator inside a value is safe; several
benchmarks take several trailers.
Nothing else is stripped: Tak-Accept: startup (new plugin loader)
names a benchmark that does not exist and is reported as such, which
fails closed — the real startup regression still gates — rather than
guessing which word was meant. git has already trimmed the value, so a
trailer cannot name a benchmark with leading or trailing spaces; that
takes --accept.