diff options
| author | aur-build <aur-build@localhost> | 2026-11-17 21:19:35 +0000 |
|---|---|---|
| committer | aur-build <aur-build@localhost> | 2026-11-17 21:19:35 +0000 |
| commit | f586d11f6a1711145ba4804787217a1bab58751d (patch) | |
| tree | 3a8cd7d4a3d4097e315907c63e687bd243e8e686 /src/watch/mod.rs | |
| parent | fd3ecf91686b11feea078531baeddb60e6941116 (diff) | |
| download | aur-build-f586d11f6a1711145ba4804787217a1bab58751d.tar.gz aur-build-f586d11f6a1711145ba4804787217a1bab58751d.zip | |
feat: AUR mirror watcher, recipe parsing, candidate creation
The detection path (§5.1, §5.1a, §5.3, §7.1):
* git helpers, all subprocess git in one auditable place. Mirrors are
cloned with --mirror and polled with git ls-remote, fetching only when
the tip actually moved; --no-prune keeps history we may need forever.
* .SRCINFO parsing (authoritative) with a PKGBUILD fallback, and
source=() parsing that keeps VCS kind, #commit/#tag/#branch refs and
the filename:: form.
* recipe_hash over the whole snapshot tree, so a shipped patch is part
of the recipe and cannot change silently.
* source digest resolution: declared checksums are trusted-as-declared
(makepkg enforces them, no bandwidth), local files are hashed from the
mirror, and SKIP sources are downloaded and stream-hashed into the
content-addressed source cache. Detection always re-fetches SKIP
sources — answering from our own cache would defeat drift detection.
* candidate creation with base = current_accepted_release, collapse in
place while unviewed, supersede only once a human has looked, and a
previously rejected identity is not re-raised.
* non-publishable change handling (I11): unchanged version string means
no review, but never silence — recipe drift and pin drift become
notices, and a changed digest on a remote source with an unchanged
version becomes a high-severity integrity_alert.
Also vercmp + dep-string parsing with the ALPM test vectors, and the
approval record with optimistic concurrency (§7.1a) that the CLI and web
layers will both call.
16 detection tests against real file:// git fixtures, incl. I2 across
three unattended detections and I11 for all three drift kinds.
Part of P0 (DESIGN.md §17).
Diffstat (limited to 'src/watch/mod.rs')
| -rw-r--r-- | src/watch/mod.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/watch/mod.rs b/src/watch/mod.rs new file mode 100644 index 0000000..3f0d217 --- /dev/null +++ b/src/watch/mod.rs @@ -0,0 +1,12 @@ +//! Watchers: AUR recipe mirror (§5.1), upstream VCS probe (§5.2), source digest +//! resolution (§5.3), and the scheduler tick. + +pub mod detect; +pub mod digests; +pub mod mirror; +pub mod scheduler; + +pub use detect::{check_pkgbase, CheckReport, Outcome}; +pub use digests::{cached_path, download_and_cache, resolve_sources, skip_on_non_vcs}; +pub use mirror::{read_tree, sync_mirror, Tree}; +pub use scheduler::spawn_scheduler; |
