From 2b15c13e86303cfcc9a8f94974bbaaa802270029 Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Mon, 7 Sep 2026 17:53:26 -0400 Subject: [PATCH] advance: skip same-name files with differing bytes instead of failing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Incremental advances collide with same-version artifacts that reached the destination through another lineage — the stable -> rc bootstrap seed and native rc builds are not byte-identical to edge's builds of the same version. A collision means the package has not moved in the source since, so keep the destination's published copy and continue; the hard failure also aborted before the db rebuild and sync, leaving the advance half-done. Also stop advancing pinned packages into rc: eligibility deferred to package_builds_for_mirror, whose OMARCHY_RC_PINS gate is never set during an advance, so edge's omarchy/omarchy-settings looked movable — and could have overtaken an in-flight RC pin under a fresh filename. --- bin/advance-channel | 13 ++++++------- helpers/package-metadata.sh | 5 +++++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/bin/advance-channel b/bin/advance-channel index 1effbc6..2bf75d2 100755 --- a/bin/advance-channel +++ b/bin/advance-channel @@ -326,7 +326,7 @@ while IFS=$'\t' read -r name base filename; do done < <(read_manifest) echo "" -print_info "Copied: $COPIED | Already present: $PRESENT | Not eligible: $SKIPPED" +print_info "Copied: $COPIED | Already present: $PRESENT | Differing (kept): ${#DIFFERING[@]} | Not eligible: $SKIPPED" if [[ ${#MISSING_FILES[@]} -gt 0 ]]; then print_error "${#MISSING_FILES[@]} package(s) named in the $FROM database are missing on disk:" @@ -345,13 +345,12 @@ if [[ ${#MISSING_SIGS[@]} -gt 0 ]]; then fi if [[ ${#DIFFERING[@]} -gt 0 ]]; then - print_error "${#DIFFERING[@]} file(s) already published in $TO with DIFFERENT bytes:" + print_warning "${#DIFFERING[@]} file(s) already published in $TO with different bytes — kept as-is:" printf ' %s\n' "${DIFFERING[@]}" - echo "Published filenames are never rewritten, and two artifacts fighting over" - echo "one name means something built twice from different inputs. Resolve it" - echo "deliberately: bump pkgrel and rebuild so the new artifact gets a new" - echo "filename, or remove the source copy if the destination is correct." - exit 1 + echo "Published filenames are never rewritten, so the $TO copy stays authoritative." + echo "A same-name collision means this version reached $TO through another lineage" + echo "(native build, bootstrap seed, or a same-version rebuild) and the package has" + echo "not moved in $FROM since; it advances under a new filename when it does." fi if [[ "$DRY_RUN" == true ]]; then diff --git a/helpers/package-metadata.sh b/helpers/package-metadata.sh index 564cd2d..c66aef1 100644 --- a/helpers/package-metadata.sh +++ b/helpers/package-metadata.sh @@ -269,6 +269,11 @@ package_builds_for_mirror() { package_moves_to_channel() { local pkgdir="$1" channel="$2" package_in_channel "$pkgdir" "$channel" || return 1 + # Pinned packages build natively in rc from the release pin. That the + # advancing environment lacks OMARCHY_RC_PINS (so *it* may not build them) + # does not make the edge copy movable over the pin's artifact — edge's + # version can be ahead of the in-flight RC. + [[ "$channel" == "rc" ]] && package_is_pinned "$pkgdir" && return 1 ! package_builds_for_mirror "$pkgdir" "$channel" }