Repository navigation
chore(wasm-probe): lock the engine's dependencies, risc0-zkvm 3.0.6 included - #2478
Conversation
…ncluded The probe's lockfile did not list the dependencies the erasure crate brought in, so every CI run resolved them afresh. risc0-zkvm 3.0.6, which fluree-db-erasure pins exactly, has since been yanked, and a fresh resolution refuses it. Locked, it still resolves. The lockfile now holds those packages at the versions the workspace lockfile has; no version it already held changes.
aaj3f
left a comment
There was a problem hiding this comment.
@bplatz locking the probe from the workspace's entries is the right fix for a yanked exact pin, and the lock checks out: nothing it already held moves, and the wasm32 job at this head runs the runtime smoke green. The one thing I'd want in before merging is testsuite-shacl/Cargo.lock: it reaches the erasure crate the same way, and on next it can't resolve at all (same yank error); there's just no CI job to show it.
This is also the third PR in a row to meet excluded lockfiles drifting with no --locked gate (#2421, #2473), so I'd suggest a cargo metadata --locked step per excluded directory in ci.yml. More below.
Full review below:
✅ Approving to unblock: please get testsuite-shacl/Cargo.lock in before merging. Locking the probe from the workspace's own entries is the right fix for a yanked exact pin, and it puts next's wasm32 job back to green at this head; the sibling lockfile has the same gap and fails the same way.
Before merging:
wasm-probe/Cargo.lock:2959: givetestsuite-shacl/Cargo.lockthe same 87 entries; onnextit fails to resolve with this yank.
Notes:
- The class: lockfiles in workspace-excluded directories track workspace crates, but no gate resolves them with
--locked, so they drift: #2421 (smallvecfrom my #2214, shipped stale in 4.2.8), #2473 (uuid,smallvec,hashbrownonmain), this PR and testsuite-shacl here, plus the hand refreshes614801118,f674becd6,65ce8d6a9and1d80ac0f6. The yank is what turned the drift from a dirty lockfile into a red wasm32 job on everynextPR. Acargo metadata --lockedstep per excluded directory inci.yml(resolution only, seconds each), plus--lockedon testsuite-sparql'scargo testand-- --lockedthroughwasm-pack buildinrun-node.mjs, would have failed #2214 and #2280 in their own CI instead. It wants to land onmainand merge intonext; if you'd rather fold the CI step in here, the must and testsuite-sparql'suuidline are exactly what it needs to pass onnext. Either way the point fixes belong in this PR. #2454 is the next one in waiting: it addsfsst-rstofluree-db-binary-indexand refreshes only the root lockfile. - Merge order: #2477's wasm32 job is red on this yank alone (the runtime smoke fails with the same error; both clippy steps pass), so it goes green once this lands.
merge-treewith #2477, #2454 and #2436 is clean. When 4.2.9 comes in frommain, the same seven files conflict on version lines as on every release merge, with or without this PR. - On leaving the pin alone: agreed, moving it is the prover's change rather than the probe's (
fluree-db-erasure/src/verify.rs:13ties the accepted image id to 3.0.6). I'll follow up with you directly on the prover side.
Adherence: Patterns ✔ · Performance ✔ · Deployment targets ✔ · Testing ⚠️ · Conventions ✔ · verification
- Patterns/abstractions: ✔ locks from the workspace's own entries, the same mechanism that keeps the root workspace resolving the yanked version.
- Performance (speed first, memory second): ✔ lockfile only. No performance-degradation risk.
- Deployment targets: ✔ wasm32: the added packages sit behind
fluree-db-api'scfg(not(target_arch = "wasm32"))dependencies, so the wasm32 build compiles none of them (no risc0, ark or erasure compile lines in the job log at this head), and its runtime smoke passes. - Testing:
⚠️ the wasm32 job (both clippy steps and the runtime smoke) is green at this head; testsuite-shacl has no CI job, which is how its identical failure stayed invisible. - Conventions: ✔ multi-line commit message; the body's "610" and "at the versions the workspace lockfile holds" want small corrections (inline).
Verified at e41ba5eaa: Claude diffed the probe lockfile's package set against origin/next (308 → 395 entries: 87 added, none removed, no held version or checksum changed, 85 of the 87 identical to the workspace lockfile), ran cargo metadata --locked across next's lockfile directories (testsuite-shacl fails with the yank error, testsuite-sparql needs one line), rebuilt testsuite-shacl's lockfile the same way to confirm the fix resolves under --locked, and confirmed CI run 44814130711 on this exact SHA is green, including the wasm32 runtime smoke.
Approving so you can merge once testsuite-shacl's lockfile is in.
| ] | ||
|
|
||
| [[package]] | ||
| name = "risc0-zkvm" |
There was a problem hiding this comment.
Blocking: testsuite-shacl/Cargo.lock has the same gap, and on next it can't resolve at all.
testsuite-shacl depends on fluree-db-api (features native, shacl), and fluree-db-api takes fluree-db-erasure under [target.'cfg(not(target_arch = "wasm32"))'.dependencies] (fluree-db-api/Cargo.toml:1024-1029). Cargo locks every target, so any lockfile that reaches fluree-db-api needs this entry and its 86 neighbours, exactly as the probe does. On next, the root lockfile and testsuite-sparql's carry them; testsuite-shacl's (309 packages) doesn't.
Claude ran cargo metadata --locked and plain cargo metadata in testsuite-shacl at this head: both exit 101 with the same failed to select a version for the requirement risc0-zkvm = "=3.0.6" / version 3.0.6 is yanked. So cargo test in testsuite-shacl on next fails before it compiles anything. No CI job runs testsuite-shacl, which is why nothing went red.
The fix is the same lock change. Claude seeded testsuite-shacl's lockfile with the workspace lockfile's missing entries and let cargo prune it offline: it adds the same 87 packages, changes none it already holds, and resolves under --locked. While you're there, testsuite-sparql's lock on next is missing one line ("uuid", under fluree-db-api); it resolves without --locked but not with it, so it's worth the same commit.
Commenting here because testsuite-shacl/Cargo.lock is not in this diff.
| ] | ||
|
|
||
| [[package]] | ||
| name = "rand" |
There was a problem hiding this comment.
Optional: two of the 87 aren't at the workspace's versions, and the body's count is off.
This rand 0.10.4 and winnow 1.0.5 (line 3979) are newer than the workspace lockfile's 0.10.2 and 1.0.3. The other 85 match it entry for entry: Claude rebuilt the probe's lockfile from the workspace's entries and it came out identical to this one except for these two. Both come in as build/test-side dependencies of the risc0 stack (proptest; toml_edit via proc-macro-crate) behind the non-wasm32 gate, so nothing compiled changes, but the body says "at the versions the workspace lockfile holds".
Either align them (Claude ran both in wasm-probe; --locked still passes, a 14-line diff):
cargo update -p [email protected] --precise 0.10.2
cargo update -p [email protected] --precise 1.0.3
or adjust that sentence. The body's "610 packages" is 87 too (308 → 395 [[package]] entries). Minor and non-blocking, but if you're regenerating for testsuite-shacl anyway, I'd rather it ride along than leave the body and the lockfile disagreeing.
There was a problem hiding this comment.
Addressed in 4b6f09d, which aligns both. The body's count and wording are corrected too.
…rql suites testsuite-shacl depends on fluree-db-api, which takes fluree-db-erasure on non-wasm32 targets, and cargo locks every target. Its lockfile lacked that stack, so cargo resolved it fresh and refused the exact risc0-zkvm = "=3.0.6" pin, yanked from crates.io: the suite failed to resolve before compiling anything. No CI job runs it, so nothing showed it. The lockfile gains the 87 packages it lacked, each at the version and checksum the workspace lockfile holds, and none it held changes. testsuite-sparql's lockfile lacked fluree-db-api's uuid dependency line; it resolved without --locked but not with it. Both now resolve with --locked.
Two of the 87 packages the probe's lockfile gained were resolved fresh rather than taken from the workspace lockfile: rand 0.10.4 and winnow 1.0.5, where the workspace holds 0.10.2 and 1.0.3. The probe already held other versions of both, so seeding by name passed over the workspace's. Seeding by compatible series takes them, and every added package now matches the workspace lockfile. Both sit behind the non-wasm32 gate, so nothing the probe compiles changes.
Directories outside the root workspace (the excluded crates, the wasm probe, the prover and its guest) keep their own lockfiles, which track workspace crates, and no job resolved them with --locked. They drifted: a dependency added to the workspace left them stale, which went unnoticed, and when risc0-zkvm 3.0.6 was yanked the ones lacking it stopped resolving, which turned wasm32 red on every PR into next. A lockfiles job runs cargo metadata --locked in the directory of every tracked Cargo.lock, resolution only, and names each one that fails. It finds the lockfiles with git ls-files, so a new one is covered as it is added.
|
From the review summary:
|
CI's wasm32 job fails on
next:wasm-packresolveswasm-probe's dependencies and refusesrisc0-zkvm = "=3.0.6", whichfluree-db-erasurepins exactly and which has been yanked from crates.io sincenext's last green run.wasm-probe/Cargo.locknever listed the packages the erasure crate brought in, so every run resolved them afresh. A yanked version still resolves once it is in a lockfile, as it is in the workspace's.wasm-probe/Cargo.lockgains the 87 packages it lacked (308 → 395 entries), each at the version and checksum the workspace lockfile holds. No package it already held changes, andcargo check --locked --target wasm32-unknown-unknownpasses inwasm-probe.testsuite-shacl/Cargo.lockhad the same gap and onnextfailed to resolve at all, with the same error. No CI job runs that suite, so nothing showed it. It gains the same 87 packages (309 → 396), also at the workspace's versions, with nothing it held changing.testsuite-sparql/Cargo.locklacked one line,fluree-db-api'suuiddependency. It resolved without--lockedbut not with it.lockfilesCI job runscargo metadata --lockedin the directory of every trackedCargo.lock(resolution only) and names each one that fails. These lockfiles track workspace crates but nothing resolved them with--locked, so they drifted until the yank made the drift fail. It finds them withgit ls-files, so a new one is covered as it is added. A PR that adds a dependency to a workspace crate now has to refresh them too.The pin itself is left alone: moving
risc0-zkvmpast 3.0.6 is a change to the prover, not to this probe.