summaryrefslogtreecommitdiffstats
path: root/src/db/retention.rs
diff options
context:
space:
mode:
authordev <dev@localhost>2026-11-20 17:41:34 +0000
committerdev <dev@localhost>2026-11-20 17:41:34 +0000
commit1cd680c12dc191bfbf7afa8ad8308524776e60ae (patch)
tree492da08774525f32e7f25642af46f22160154e1b /src/db/retention.rs
parent154f6f6dd284c11da82cf1188ff8549db6459228 (diff)
downloadaur-build-1cd680c12dc191bfbf7afa8ad8308524776e60ae.tar.gz
aur-build-1cd680c12dc191bfbf7afa8ad8308524776e60ae.zip
review: one call to record a candidate, and one way to read one
`watch::detect` was performing review's write protocol by hand: look up the accepted release, upsert the candidate, assess the risk, store the risk, work out the missing dependencies, store those. Six calls that only make sense in that order, issued from a module whose job is noticing that an upstream moved. Get the order wrong and nothing complains — the candidate just quietly has no risk score, and the reviewer approves it without one. `review::intake::record` is the protocol now. The watcher hands over what it observed and review decides what it means. `missing_deps` moved with it: it computes a risk signal, which is a review question that happened to be living in the watcher. `accepted_for` was not a review question either. It reads a pointer column off the pkgbase row, so it is now `db::accepted_release_for` — the watcher asks persistence what is currently accepted, rather than asking review as a favour. With intake owning the write path, three things became internal and closed: `upsert_candidate`, `risk::assess`, and the risk/missing-deps column setters. `approve::approval_for` was a pass-through to db that only the pipeline called; it is gone, and the pipeline now asks `review::reads::{candidate, approval}` — two named facts instead of a re-export of review's storage layout. The budget rose in two places and both are moves, not growth: db.pub 201->202 is `accepted_release_for` arriving from review, and review.test 4->5 is `set_risk_for_tests`, the one place a fixture still needs to force a score. review.pub itself is unchanged at 29 — four names added, four removed. `priv` was also dropped from the budget keys. Counting `pub(crate)` items against a ceiling was backwards: closing an interface raises that number, so a budget that punishes it punishes the work. The Rust test never checked it. 277 passed / 0 failed, clippy -D warnings clean, and every detect, approve and staleness assertion intact.
Diffstat (limited to 'src/db/retention.rs')
0 files changed, 0 insertions, 0 deletions