Commit dc4c2f8
fix(lab-runner): one currency verdict for materialization staleness, and two fail-open bugs it exposed (#10552)
* feat(lab-contract): one currency verdict for materialization staleness
Adds crates/contracts/homeboy-lab-contract/src/materialization_currency.rs:
Currency (Current/Stale/Unknown), CurrencyEvidence (which evidence a
verdict rests on and whether it can prove byte equality), and comparators
that fail closed to Unknown when either side of a comparison is missing.
Adopts it at the two decision sites where the fail-open was real:
- rig_materialization::with_lab_package_freshness reported `verified` for
a source whose current revision could not be read at all, because the
install-time revision was copied into the current-revision slot and then
compared with itself. homeboy_rig::package_evidence_from_metadata already
reported `unknown` for the same input. The two now agree.
- runtime_overlay_freshness reported `Fresh` whenever a git probe failed,
because every probe failure collapsed into commits_behind: None and fell
through the `> 0` test onto the fresh branch. New UnknownProbeFailed
status; stale stays false so nothing newly warns or hard-fails.
Refs #10309
* fix(lab-contract): pass digests as str slices in compare_identities
* style: cargo fmt --all
---------
Co-authored-by: chubes-bot <266378653+homeboy-ci[bot]@users.noreply.github.com>1 parent 7239ace commit dc4c2f8
5 files changed
Lines changed: 697 additions & 36 deletions
File tree
- crates
- contracts/homeboy-lab-contract/src
- homeboy-core/src
- homeboy-lab-runner/src
- rig_materialization
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
0 commit comments