| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
§13)
tiny_http, thread-per-connection, askama templates. Every §13 surface is
server-rendered HTML that works with scripts switched off: Inbox, review
detail with the full panel set, Builds, Attention, Index, Subscriptions,
Ops/audit, Settings.
The parts that are easy to get wrong:
- Handlers read through thread-local READ-ONLY connections. They cannot
take the write lock even by accident, so a slow page render never blocks
the build pipeline's writer. tests/http.rs asserts this by trying to
write through a read connection and requiring failure.
- Every POST requires a CSRF token derived from the session id. Logout
drops the session, which invalidates every form still open in a browser.
- Approve carries identity_hash AND diff_digest (§7.1a). If either has
moved, the approval is refused with 409 and the page re-renders the
review AS IT IS NOW — never a silent retarget onto the newer state.
- Bulk approve refuses high-risk items unless each one is individually
confirmed by id. Bulk is per-item, never 'approve everything forever'.
- Reject requires a note; it is re-openable, not a deletion.
- Optional password gate; anonymous visitors are redirected to /login.
Also: the index page states the pacman conf snippet including
'SigLevel = Required DatabaseOptional', because a repo consumers ignore the
signature is a repo that gets MITM'd.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
capture (§5.2)
Stage A probes every VCS source in source=() with git ls-remote,
respecting #commit/#tag/#branch fragments, and returns one UpstreamPin
per source. If the tip set equals the accepted release's pins, nothing
can have changed and Stage B never runs — the common case costs one
round trip per source and no clone. svn/hg have no cheap universal probe,
so they are reported as unprobed and force Stage B rather than being
silently treated as unchanged.
Stage B runs only on movement: it fetches into a persistent vcs_cache
(rather than re-cloning a multi-gigabyte upstream daily), runs makepkg
--vercheck, and captures the pins from the clone it already has. Results
are cached on (pkgbase, recipe_hash, upstream_tip) with a per-pkgbase
cooldown, and a process-wide slot cap bounds concurrent resolutions.
The resolved epoch:pkgver-pkgrel plus the pins go into identity_hash, so
a different commit is a different thing to approve.
Also fixes a misclassification the new path exposed: a VCS source's
digest is its pin, so upstream movement showed up as an integrity_alert.
Integrity events are now restricted to fixed downloads; VCS movement
under a frozen pkgver is pin_drift, as §5.2 specifies.
New fixtures git-multi (two upstreams) and git-tagged (#tag pin). 10
tests in tests/vcs.rs.
|
|
|
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).
|