Skip to content

Harden AUR review boundaries and pin adapter identities - #51

Merged
kridaydave merged 2 commits into
mainfrom
fix-aur-review-findings
Sep 12, 2026
Merged

kridaydave merged 2 commits into
mainfrom
fix-aur-review-findings

Conversation

@kridaydave

Copy link
Copy Markdown
Contributor

PR made by GLM-5.3-Flash from zcode on behalf of Kriday.

Follows up on the adapter code review: the P1s (shallow clone, timeout, url pinning) landed in #50, this closes the P2s. Git plumbing failures inside the .SRCINFO history walk now fail closed instead of being silently counted as skips, and an archive can no longer pretend to be a different package than the one the adapter resolved.

Summary :

  • commit_version now splits content failures (missing, oversized, non-UTF-8, malformed .SRCINFO) from plumbing failures — the former stay per-commit skips, the latter propagate with the real cause. Corruption between a commit and its .SRCINFO can no longer pass for "no parseable .SRCINFO" (reproduced empirically before/after)
  • resolve stores the pinned commit's canonical version, so vercmp aliases like 1.1.0-01 hit the same store key and display the same identity every time
  • the review boundary refuses an AUR archive whose declared pkgbase differs from the resolved package base
  • list_versions keeps the adapter's vercmp order instead of re-sorting under semver prerelease rules
  • seven new tests: canonical spelling, vercmp order net, deterministic hash tiebreak, split-package pkgname→pkgbase resolve, oversized .SRCINFO skip, directory-not-file refusal, pkgbase mismatch refusal
  • ran two adversarial review passes on the diff (security + regression); the happy-path walk stays at one git subprocess per commit

Base automatically changed from feat/pkgbuild-heuristics to main September 12, 2026 07:04
…ss-checks

Closes the P2 findings from the adapter review:

- commit_version classifies git failures: content-class failures (missing,
  oversized, non-UTF-8, malformed .SRCINFO) count as per-commit skips;
  plumbing failures propagate fail-closed, so object corruption can no
  longer be swallowed as a skip. git show runs first so the happy path is
  one subprocess per commit; the missing-path skip is granted only via
  cat-file -t plus git's 'does not exist' stderr, so corruption propagates.
- resolve_package stores the matched commit's canonical version, so
  vercmp aliases resolve to identical store keys and display identities.
- prepare_extracted_root refuses an AUR archive whose .SRCINFO pkgbase
  differs from the resolved package base.
- list_versions keeps list_releases' vercmp order instead of re-sorting
  with semver prerelease rules.
- New tests: canonical spelling, vercmp-order regression net, deterministic
  hash tiebreak, split-package pkgname→pkgbase resolve, oversized .SRCINFO
  skip, PKGBUILD-as-directory refusal, and pkgbase mismatch refusal.
@kridaydave
kridaydave force-pushed the fix-aur-review-findings branch from b824481 to 999ccac Compare September 12, 2026 07:04
@kridaydave
kridaydave merged commit 78ea3e6 into main Sep 12, 2026
32 of 33 checks passed
@kridaydave
kridaydave deleted the fix-aur-review-findings branch September 12, 2026 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant