Skip to content

cvcpkg recipes: pin every family dependency to its own release, not the major - #1377

Merged
transfix merged 6 commits into
masterfrom
fix/pin-binding-deps
Nov 21, 2026
Merged

transfix merged 6 commits into
masterfrom
fix/pin-binding-deps

Conversation

@transfix

@transfix transfix commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Why

While libcvc 4.0.1 was half-published on 2026-11-19, CVC-Lab/GRL-SNAM's CI (run 44612219787, attempt 1) installed packages from two releases at once:

  • cp313: pycvc-gl-cp313 4.0.1+cvc.1 beside cvcgl 4.0.0+cvc.3. _pycvc_gl.so failed to load with an undefined symbol, cvc::gl::RibbonNode::replaceFrom.
  • cp311/cp312: pycvc 4.0.0+cvc.2 beside libcvc 4.0.1+cvc.1. The dynamic-plant tests failed with no agent 0, segfaults and energies around -1e270.

The rerun on a complete 4.0.1 set passed. Two causes:

What cvcpkg supports (checked in cy-pca/cvcpkg master, 2.5.15)

  • Syntax. src/cvcpkg/semver.py accepts ==, >=, <=, >, <, ^, ~>, comma-separated combinations, and a bare version (read as ==).
  • Revisions. ==4.0.1 with no +cvc.N matches any revision of 4.0.1. Only a pin that names a revision holds that revision.
  • Recipe to catalog. builder.runtime_dependencies copies a recipe dependency's version into the bundle manifest, and cvcpkg publish sends it on as the catalog row's required_deps. The catalog already serves 4,227 versioned edges for other packages.
  • Resolver. src/cvcpkg/resolver.py backtracks with conflict-directed backjumping. Since 2.5.1 (cvc: broaden ImageMagick prefix fallback for autotools names #251) it also checks a candidate's constraints against packages already picked, in both directions.
  • Old versions stay listed. The catalog keeps every published version (pycvc-gl-cp313 lists 3.2.4+cvc.1 to 4.0.1+cvc.1), so the resolver can fall back to an older one.

So constraints are supported, and pinning each family edge to its own release is the fix.

Change

  1. Recipes. All 59 build and runtime dependencies on a libcvc recipe (or a name one provides) now say version: "==4.0.2" instead of "^4.0". (Master moved to 4.0.2 in chore: bump libcvc to 4.0.2; the wasm publishes pin the pre-JX1 bundles #1383. After merging master, recipe-family-pins.py --write moved the pins from ==4.0.1.) Those are the dependencies on libcvc, libcvc-cuda, cvcgl, pycvc-cp3XX and pycvc-gl-cp3XX across the bindings, ari*, arisrv*, cvc-cli* and libcvc-examples.
  2. .github/scripts/recipe-family-pins.py. The recipe-version job's step now requires ==<CMakeLists VERSION>. It used to require ^<major>.0. A new --write flag rewrites the pins in place and leaves comments and line endings alone.
  3. .github/scripts/bump-version.py X.Y.Z. This does the whole release bump: CMakeLists VERSION, every recipe's upstream_version, cvc_revision: 1, the "Reset to 1 for the X upstream version" notes, and the pins. Run against a copy of this tree, 4.0.2 reproduces chore: bump libcvc to 4.0.1 #1299's 28-line diff and adds the 59 pins. Run on this branch as it stood before the merge (dc97838, at 4.0.1), 4.0.2 writes exactly chore: bump libcvc to 4.0.2; the wasm publishes pin the pre-JX1 bundles #1383's hand bump plus the 59 pins. A bump done by hand that forgets the pins fails CI, and the error names the --write command.
  4. publish-cvcpkg's CUDA lane. pycvc-gl-cp311-cuda links the published cvcgl, which was installed with no version.
    • v4.0.1's linux bundle was built against cvcgl 4.0.0+cvc.3: installed at 20:16Z, while cvcgl 4.0.1 only reached the catalog at 21:05Z.
    • The install now waits for cvcgl==<version>, polling every 2 minutes for up to 120. If it never arrives, the step fails rather than build against another release.
    • A dry run publishes nothing, so there it falls back to the newest cvcgl and warns.
    • pycvc-cp311-cuda no longer waits for cvcgl, since it doesn't use it.
  5. .github/scripts/backfill-family-pins.py. This pins the same edges on rows already published, each to the row's own upstream version. It calls the registry's POST /v1/admin/packages/{name}/{version}/backfill-deps once per variant, with expect_required_deps set to what the row holds now.
    • A row anything else has changed in the meantime is left alone. The server answers count.required_deps == 0 for such a row, and the script reports it as UNCHANGED and fails.
    • It is a dry run by default. --apply needs an admin CVCPKG_TOKEN.
    • --limit N writes only the first N rows, as a canary.
    • --save FILE writes every row's old and new deps, so the change can be reverted.
    • Applied to cvcpkg.org on 2026-11-20, finishing at 04:40Z. First a one-row canary (ari 4.0.1+cvc.1, linux/arm64), which the catalog served at once, then the rest. All 1,116 rows were pinned (3.2: 63, 3.3: 61, 3.4: 127, 3.5: 44, 3.6: 17, 3.7: 683, 4.0: 121), with none left unchanged and none failed. A rerun finds nothing.
    • No row that resolved before stopped resolving. Every such row has its own release's peers on its own platform, arch, config and link.

Why the backfill matters (simulation)

I added synthetic 4.0.2 rows, carrying this PR's pins, to the real catalog for linux/x86_64/release. Then I resolved consumer requests in four states of a half-finished publish, using master's resolver. MIXED means the picked libcvc/cvcgl/pycvc/pycvc-gl are not all one release.

published rows bindings first libs first libcvc + bindings, no cvcgl complete
as they are (unpinned) ok MIXED (falls back to unpinned 4.0.1 bindings) MIXED ok
4.0.1 rows backfilled ok ok for binding requests; an explicit libcvc request still mixes via unpinned 4.0.0 ok / one MIXED via 4.0.0 ok
all rows backfilled ok ok, except an old -cuda edge (below) ok ok

So the recipe pins protect a release only once the rows it can fall back to are pinned too. With every row backfilled, publish order no longer matters for consumers on cvcpkg 2.5.1 or later.

On the live catalog after the backfill (and after the -cuda fix below), the same twelve states with master's resolver all resolve to one release, the last complete one. With 2.2.1, two still mix.

Done outside this PR (2026-11-20 UTC)

  • Backfill: applied, as above.

  • Old -cuda rows had no requires_capabilities. libcvc-cuda, pycvc-cp311-cuda and pycvc-gl-cp311-cuda 3.7.14 (linux) were published before migration 037, so a CPU host could pick them. That was the "old -cuda edge" in the table. All three now carry ["cuda"], filled through the same admin endpoint, which writes it only while it is empty.

  • GRL-SNAM's CI ran cvcpkg 2.2.1. It used transfix/libcvc-deps' cvcpkg-install action, which pip-installs that archived repo's tree. 2.2.1's resolver checks one direction only. CI: install cvcpkg 2.5.15 from cy-pca/cvcpkg, not the archived libcvc-deps (2.2.1) CVC-Lab/GRL-SNAM#197 moves it to cy-pca/cvcpkg 2.5.15.

  • v4.0.1's pycvc-gl-cp311-cuda (linux) was built against cvcgl 4.0.0+cvc.3.

    • In 4.0.1, GeometryNode (which pycvc-gl makes a SWIG director class) and RibbonNode gained data members, so that binary does not match the cvcgl 4.0.1 it pins.
    • Yanked on Joe's word: that one variant, linux/x86_64/release/shared. cvcpkg unyank restores it.
    • A CUDA host asking for pycvc-gl-cp311-cuda now gets the complete 4.0.0 set. Every other CPU or CUDA request checked resolves to one release.
    • The next release builds it against its own cvcgl, because of this PR's wait in the CUDA lane.

Carried from #1405 (master's red fleet test)

Testing (local, Windows, cvcpkg-prefix Python 3.12 + PyYAML)

  • recipe-family-pins.py.
    • It fails on the old ^4.0 pins: 59 errors.
    • --write changes exactly the 59 lines, and a second run changes nothing.
    • A stale pin (==4.0.2 under VERSION 4.0.1) fails it.
    • A deleted version: line is inserted back byte for byte.
    • CRLF files stay CRLF.
  • bump-version.py. On a copy of the tree, 4.0.2 gives chore: bump libcvc to 4.0.1 #1299's diff plus the pins. Starting from cvc_revision: 3, a bump resets it to 1. CI's own recipe-version shell check passes afterwards.
  • The CUDA wait step, run with a stub cvcpkg: the version arriving on the 3rd try passes; it never arriving fails at the deadline with the error; a dry run falls back.
  • The resolver simulation used cy-pca/cvcpkg master's resolver and libcvc-deps' 2.2.1 resolver.
  • Both workflows still parse as YAML.

Merge is Joe's.

…he major

While libcvc 4.0.1 was half-published (2026-11-19), CVC-Lab/GRL-SNAM's CI
resolved pycvc-gl-cp313 4.0.1 with cvcgl 4.0.0 (undefined symbol
cvc::gl::RibbonNode::replaceFrom) and pycvc-cp311 4.0.0 with libcvc 4.0.1
(segfaults, garbage energies). The ABI changes between patch releases, and
v4.0.1 predates #1289, so its rows record those edges with no version at all;
"^4.0" would have allowed the same mixes.

- Every dependency on a recipe under cvcpkg/recipes/ (or a name one provides)
  pins version "==<CMakeLists VERSION>". cvcpkg reads "==X.Y.Z" without
  +cvc.N as any revision of X.Y.Z, so +cvc.N rebuilds still satisfy it, and its
  backtracking resolver falls back to the newest release that is complete on
  the catalog instead of mixing two.
- recipe-family-pins.py checks "==<VERSION>" (was "^<major>.0") and gains
  --write. bump-version.py X.Y.Z does a release bump in one step (CMakeLists,
  every upstream_version, cvc_revision 1, the pins), so the pins move with it.
- publish-cvcpkg's CUDA lane installed the newest published cvcgl to build
  pycvc-gl-cp311-cuda: v4.0.1's was built against cvcgl 4.0.0+cvc.3, installed
  49 min before cvcgl 4.0.1 reached the catalog. It now waits (up to 120 min)
  for cvcgl==<version> and fails rather than link another release.
- backfill-family-pins.py pins the same edges on rows already published
  (1,116 rows; the registry's backfill-deps admin endpoint with
  expect_required_deps). Without it a half-published release still falls back
  to an unpinned older binding beside the new libraries. Dry run by default;
  --apply needs an admin token and is the registry owner's call.
…ed; --limit and --save

The registry's compare-and-set answers count.required_deps == 0, not an error, when a row's
stored deps differ from the catalog's copy, so a row it skipped was reported as pinned. It is
now reported UNCHANGED and fails the run. --limit N writes only the first N rows (a canary) and
--save FILE writes each row's old and new required_deps, from which the change can be reverted.

Applied to cvcpkg.org on 2026-11-19: 1,116 rows pinned, none unchanged or failed; a rerun finds
nothing.
transfix added a commit to CVC-Lab/GRL-SNAM that referenced this pull request Nov 20, 2026
…-deps (2.2.1) (#197)

ci.yml and publish-cvcpkg.yml installed the dependency closure with
transfix/libcvc-deps' cvcpkg-install action, which pip-installs the
libcvc-deps tree it checks out: cvcpkg 2.2.1, frozen since the repo was
archived on 2026-09-16.

While libcvc 4.0.1 was half-published, CI here got pycvc 4.0.0 beside
libcvc 4.0.1 and pycvc-gl 4.0.1 beside cvcgl 4.0.0 (#193). The published
libcvc rows now pin their own release (transfix/libcvc#1377 plus a
backfill of the 1,116 rows already on cvcpkg.org). But 2.2.1's resolver
checks a candidate only against the pins of packages already picked, so a
resolver simulation on the live catalog still mixes releases in two
half-published states. cvcpkg 2.5.1 and later check both ways
(cy-pca/cvcpkg#251) and resolve all twelve to one release.

Both now use cy-pca/cvcpkg's copy of the same action at cvcpkg-v2.5.15,
told to check out and pip-install cy-pca/cvcpkg at that tag. The
checkout still lands in _libcvc-deps, so ruff's --exclude stands.
publish-cvcpkg.yml's separate 'cvcpkg[publish]' installs are unchanged.
@transfix
transfix enabled auto-merge (squash) November 20, 2026 05:40
Written by recipe-family-pins.py --write after merging master.
AFleetIsLaidOutInTeamsAtRallyPoints (FL1a, #1384) stepped 240 times and
asked for the fleet to be 5 m east. On OW1's 1/120 s quantum (#1378)
those steps are 2.0 s, not the 2.4 s it was written at, and the fleet
starting from rest is 4.36 m east by then. Neither PR's CI saw the
other, so master has failed it since OW1 merged.

It now steps 3 s of the clock (3 / kSimQuantum), about 9 m east.

(cherry picked from commit 1cf1081)
@transfix
transfix merged commit d473c10 into master Nov 21, 2026
30 checks passed
@transfix
transfix deleted the fix/pin-binding-deps branch November 21, 2026 01:46
transfix added a commit that referenced this pull request Nov 21, 2026
…eleton branch

P4 added RealizedScene::pending_work, a probe per custom node that is true while its work
is in flight, for the golden harness to wait on: the same thing as P2's
RealizedScene::settling. The merge keeps master's name and drops settling:

- scene_realize.h: one pending_work, its comment covering both (a contour_lab's tile, a
  mesh_lab's skeleton, a result not drawn yet).
- mesh_lab registers its probe on pending_work; cvcgl_mesh_skeleton reads it there.
- cvcgl_ari_golden: one loop. It steps until no probe has said busy for kMinFrames frames
  after the one it went idle on (P2's "until done, then kMinFrames more", with P4's restart
  when a probe goes busy again), under P2's 180 s ceiling. The skeleton golden gets the
  frames it was taken with; the contour tiler two more, after its scene has settled.
- arigl-web and libcvc-examples-web recipes: clipper2, cdt and shewchuk-predicates, with
  one comment saying the predicates serve the tiler (P4) and the skeleton (P2).
- demos.json and arigl_web_smoke.mjs: both demos and both page cases.
- ARIADNE.md, the roadmap and skeleton.ari name pending_work.
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