Repository navigation
fix: keep new bridge asset tags npm-shaped instead of appending -N - #131
Merged
Merged
Conversation
When two pipelines shared one bridge build, select_next_release_target gave the second a rebuild tag. On 2026-09-24 the native v0.4.1-1 pipeline claimed v0.1.50 and the native v0.5.0 pipeline got v0.1.50-1. npm orders v0.1.50-1 as a prerelease below v0.1.50, so the newer llama.cpp v0.5.0 assets would have sorted below a redundant v0.4.1 rebuild, and consumers that pin plain vMAJOR.MINOR.PATCH (llamadart) could not adopt it. While the v0.1.50-1 claim was live, _claimed_rebuilds_of also kept the byte-identical v0.4.1-1 candidate from ending as satisfied_by_identical_release, so it went to qualification to publish a duplicate v0.1.50. Both runs were cancelled. - select_next_release_target uses published and claimed tags as the version floor and takes the next free patch version on a collision, always with rebuild 0. A new tag is never lower than a published tag or a live claim. - release_contract.validate_new_release_identity requires rebuild 0. The validate-release command, which bridge_candidate.yml and publish_assets.yml run, now uses it, so a -N tag cannot be built or published. Reading history (validate_release_identity, run-name binding recovery, manifests) still accepts earlier -N tags such as v0.1.47-1. - README and CONTRIBUTING describe the rule.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On 2026-09-24 one orchestrator scan dispatched two pipelines at bridge build
5e8cc64:v0.4.1-1claimedv0.1.50. This was a redundant pipeline: bridge chore: build ordinary CI against llama.cpp v0.5.0 #129 changed only a build input, so its bytes are identical tov0.1.49.v0.5.0gotv0.1.50-1fromselect_next_release_target, becausev0.1.50was already claimed.npm and semver order
v0.1.50-1as a prerelease belowv0.1.50. The llama.cpp v0.5.0 assets would therefore have sorted below a redundant v0.4.1 rebuild, and llamadart pins only plainvMAJOR.MINOR.PATCHbridge tags, so it could not have adopted them.There was a second effect. While the
v0.1.50-1claim was live,_claimed_rebuilds_ofstopped the byte-identical v0.4.1-1 candidate from ending assatisfied_by_identical_release. Scan 36029945708 therefore dispatched qualification to publish a duplicatev0.1.50.Both runs were cancelled: candidate 36028710227 (
v0.1.50-1) and qualification 36030026422 (v0.1.50).Fix
select_next_release_target): published and claimed tags both set the version floor. A collision takes the next free patch version, always with rebuild 0. A new tag is never lower than a published tag or a live claim. A released claim stops counting, so its version may be taken again or stay unused.release_contract.validate_new_release_identity): a new release must have rebuild 0. Thevalidate-releasecommand uses this check, andbridge_candidate.ymlandpublish_assets.ymlboth run that command, so a-Ntag can be neither built nor published.validate_release_identity,PipelineBindingrecovery from run names, published manifests andrelease_publication_statestill accept earlier-Ntags such asv0.1.47-1.-N.scripts/release_contract.pyis a governed path, so merging this gives the bridge a new build identity. That un-blocks native v0.5.0: the old binding is stuck onv0.1.50-1because a cancelled candidate pins its tag.After merge
Run a plain stable scan (
native_release_tagleft empty) so tags follow native order:v0.1.50. It should end assatisfied_by_identical_release, and the number stays unused.v0.1.51.Dispatching v0.5.0 on its own to get
v0.1.50is unsafe. If the v0.4.1-1 bytes differed, native-order publication would publishv0.1.51first, andv0.1.50would then fail the forward-only check.Tests
The new and updated tests fail against the old code (an independent review ran them on a
git archivecopy of the base).-Nsets the floor but is never emitted; seed collision; and 4 pipeline tests that used to expect-1dispatches.validate_new_release_identityaccepts plain tags and rejectsv0.1.50-1,v0.1.47-1andb10600-1, while history still parses. Thevalidate-releasecommand acceptsv0.1.50and rejectsv0.1.50-1.Local verification
python3 -m unittest discover -s scripts -p '*_test.py' </dev/null: 421 tests, OK.python3 scripts/verify_ci_reliability.py </dev/null: passed.npm run check:jsand the CONTRIBUTING lightweight contract list pass.Review notes
An independent review found nothing blocking. It confirmed:
-N;bridge_candidate.yml,validate-releaseruns beforegenerate_release_manifest.py.I fixed its doc finding, the claim-reuse wording. It also noted that
_claimed_rebuilds_ofcan no longer fire for new claims; it is harmless and left in place.