From 2a8ce53f6754217c8e24f92a7b13190b68708d7a Mon Sep 17 00:00:00 2001 From: aur-build Date: Wed, 18 Nov 2026 18:16:12 +0000 Subject: http, pipeline: form pairs parsed once, and a rebuild identity in the real format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit n-3. `Req::form_get` called `form()`, which re-parsed the entire request body every time. The approve handler asks five times — two hashes, a note, a CSRF token, and a confirm flag — so a single POST parsed its own body five times. The pairs are parsed once at decode, next to the query pairs, and `form()` returns the stored slice. n-5. `enqueue_manual_rebuild` invented its own identity format, `hex("{aur_commit}|{recipe_hash}|manual")`, while every other identity in the system is a `sha256:` over the canonical JSON of the identity tuple (§3). Two formats for one concept is how a comparison quietly stops meaning anything, and the ad-hoc one had a delimiter that can appear inside a URL-shaped value and ignored the pins and digests that are the whole point of an identity. A rebuild is now identified by the canonical-JSON hash of the release's actual commit, recipe, pins and digests plus a `requested: manual_rebuild` marker — the marker being what keeps a rebuild a distinct build from the one that landed, while staying deterministic so that clicking rebuild twice is one build, not two. --- src/pipeline/mod.rs | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'src/pipeline') diff --git a/src/pipeline/mod.rs b/src/pipeline/mod.rs index c3a2cb3..20648c0 100644 --- a/src/pipeline/mod.rs +++ b/src/pipeline/mod.rs @@ -283,10 +283,26 @@ pub fn enqueue_manual_rebuild(cfg: &Config, db: &Db, pkgbase: &str) -> Result