Repository navigation
Conversation
An unpolled write or removal future keeps its store current until it is dropped, so a write waiting behind another of its key is counted. Verified: RUSTFLAGS="--cfg vss_test" cargo build --lib --tests
Verified: ./bindgen.sh built the Android libraries and the Swift xcframework; shasum -a 256 of LDKNodeFFI.xcframework.zip matches Package.swift
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
talosmachina
left a comment
There was a problem hiding this comment.
No findings. Bumps the fork to 0.7.0-rc.82 to ship the VSS write fence from #140, and adds vss_a_write_counts_from_its_call. Reviewed 7af8c7e, full tier, static: the build helper could not verify the author's permission on this repo and fails closed, so I did not compile or run anything.
What I checked, and 4 candidates I ruled out
Read in full: the diff; in src/io/vss_store.rs, StoreFences, WriteGuard, StoreFence, VssStore::new, KVStore::write/remove, write_internal/remove_internal and the vss_test module.
Version checklist (AGENTS.md): Cargo.toml, Cargo.lock, both gradle.properties, pyproject.toml, Package.swift tag and checksum, and the CHANGELOG.md heading all move from rc.81 to rc.82. No rc.81 is left outside the changelog.
CI: no checks ran on this head. Every workflow here is workflow_dispatch only, so the vss-integration job did not run the new test.
Ruled out
- The test passes without exercising the guard:
KVStore::writeandremovecallbegin_write()before they return the boxed future, and the guard moves into theasync move. A future that is never polled still holds the guard until it is dropped, so the 20 msstart_generationtimes out whileremoveis alive and succeeds after it is dropped. The assertions match that. - Leak between tests through the global
STORE_FENCES: the test uses a random store id, so its fence entry is its own. block_in_placeinVssStore::newunder a plain#[test]: outside a runtime it runs the closure inline. The neighbouringvss_testtests already build stores the same way.- Runtime shutdown while a future is alive: both futures are dropped before
store, soVssStore::dropshuts down a runtime with nothing pending from this test.
Not verified here: the tag v0.7.0-rc.82 and its release do not exist yet, so I could not check the Package.swift checksum against the uploaded LDKNodeFFI.xcframework.zip.
Merge confidence: 4/5, the new test was not built or run on this head (no CI on PRs here, and not built here).
coreyphillips
left a comment
There was a problem hiding this comment.
Two independent reviews.
worth doing, does not block
- New test passes even if KVStore::write stops counting from its call site (src/io/vss_store.rs:1613-1622)
- The regression test misses delayed write accounting (src/io/vss_store.rs:1616)
- The new test fails the formatting check (src/io/vss_store.rs:1608-1610)
the reviewers disagree, your call
- Package.swift points at a v0.7.0-rc.82 release that does not exist (Package.swift:6-8)
The write was dropped before the first check, so only the removal was asserted. Each now holds the fence on its own. Also formats the test. Verified: RUSTFLAGS="--cfg vss_test" cargo test --lib io::vss_store against a local VSS server
coreyphillips
left a comment
There was a problem hiding this comment.
Rechecked after 1 new commit (1dd2f42). 1 blocking finding the reviewers disagree about.
addressed
- New test passes even if KVStore::write stops counting from its call site (src/io/vss_store.rs:1613-1622). Fixed: At src/io/vss_store.rs:1613-1618 the test now checks
start_generationtimes out while onlywriteis alive, then again while onlyremoveis alive. I confirmed this by mutation in a scratch copy with the schema I/O bypassed. HEAD passes. MovingKVStore::write'sbegin_write()into the returned future fails at the firstunwrap_err(line 1614). The same change inKVStore::removefails at the second (line 1618). - The regression test misses delayed write accounting (src/io/vss_store.rs:1616). Fixed: Same change and same check as point 2. The write is now checked on its own at src/io/vss_store.rs:1613-1615, before it is dropped. Delaying the write's
begin_write()until the future is polled now makes the test fail at line 1614. - The new test fails the formatting check (src/io/vss_store.rs:1608-1610). Fixed: The constructor call at src/io/vss_store.rs:1608-1609 is reformatted, and
cargo fmt --all -- --checknow exits 0 on this checkout.
still open
- Package.swift points at a v0.7.0-rc.82 release that does not exist (Package.swift:6-8).
Package.swiftnow downloadshttps://github.com/synonymdev/ldk-node/releases/download/v0.7.0-rc.82/LDKNodeFFI.xcframework.zip, but that URL returns 404. If this merges as is, SwiftPM fails to resolve any checkout ofmainthat includes this commit. What I checked: -gh release view v0.7.0-rc.82returnsrelease not found. -git ls-remote --tags origin 'v0.7.0-rc.8*'lists nov0.7.0-rc.82tag. -curl -sILon the URL above returns 404. The repo's release workflow says to tag and publish the release on the PR branch before merge, and to end the PR body with a### Releaselink. The rc.81 PR (#139) did this: its release was published 10 minutes before the merge. This PR's body has no Release section. Until the zip is uploaded, nobody else can confirm that the checksumabb06ea3...inPackage.swiftmatches the artifact. Publish the release from the final head commit with the zip whoseshasum -a 256matches, then add the link to the PR body. Nothing has changed for this yet.gh release view v0.7.0-rc.82still says release not found, andgit ls-remote --tags originlists no rc.82 tag. The zip URL from Package.swift:6-8 returns 404, while the same request for rc.81 succeeds. The PR body still has no### Releasesection. Your reply says the release will be published from the approved head before merge, which is the fix itself, not a reason the point is wrong. It closes once that release exists with a zip matchingabb06ea3.... 1dd2f42 only touches acfg(vss_test)test, so the zip built at 7af8c7e is still the right artifact for a tag on 1dd2f42.
coreyphillips
left a comment
There was a problem hiding this comment.
Rechecked after replies, with no new commit since 1dd2f42. 1 blocking finding the reviewers disagree about.
still open
- Package.swift points at a v0.7.0-rc.82 release that does not exist (Package.swift:6-8).
Package.swiftnow downloadshttps://github.com/synonymdev/ldk-node/releases/download/v0.7.0-rc.82/LDKNodeFFI.xcframework.zip, but that URL returns 404. If this merges as is, SwiftPM fails to resolve any checkout ofmainthat includes this commit. What I checked: -gh release view v0.7.0-rc.82returnsrelease not found. -git ls-remote --tags origin 'v0.7.0-rc.8*'lists nov0.7.0-rc.82tag. -curl -sILon the URL above returns 404. The repo's release workflow says to tag and publish the release on the PR branch before merge, and to end the PR body with a### Releaselink. The rc.81 PR (#139) did this: its release was published 10 minutes before the merge. This PR's body has no Release section. Until the zip is uploaded, nobody else can confirm that the checksumabb06ea3...inPackage.swiftmatches the artifact. Publish the release from the final head commit with the zip whoseshasum -a 256matches, then add the link to the PR body. Codex still sees it: The localv0.7.0-rc.82tag resolves to1dd2f42e, and the supplied description contains the release link. I could not verify the archive required byPackage.swift:6-8or its checksum because GitHub was unreachable.
piotr-iohk
left a comment
There was a problem hiding this comment.
QA review
Scope: full PR diff against its merge base, at 1dd2f42.
No new actionable code findings.
No actionable code findings. The PR releases 0.7.0-rc.82 (shipping the VSS write fence from #140) and adds the cfg(vss_test) test vss_a_write_counts_from_its_call.
- Release: every file in the
AGENTS.mdversion checklist moves from rc.81 to rc.82. The changelog keeps its single combined section and only the heading changes, which is the fork's documented convention. The v0.7.0-rc.82 release is published and its annotated tag resolves to the reviewed head. GitHub reports theLDKNodeFFI.xcframework.zipdigest assha256:abb06ea3…, which matchesPackage.swift. - New test:
KVStore::writeandKVStore::removecallfence.begin_write()before they return the boxed future. The guard moves into that future, so a future that has never been polled blocksstart_generationuntil it is dropped. The test now checks the write and the removal separately (each 20 msstart_generationtimes out), then confirms the store is replaced once both are dropped. Moving eitherbegin_write()into the deferred part would fail it. It uses a random store id, so it is isolated from other users of the globalSTORE_FENCES.
Earlier review threads: all four are marked resolved, and each fix holds at this head. The missing-release concern is fixed (the release exists with a matching zip). The write half of the test is now checked on its own. cargo fmt --all -- --check exits 0.
Validation: cargo fmt --all -- --check and rustfmt --check on src/io/vss_store.rs pass at the head. I could not compile or run the vss_test module: the sandbox proxy blocked the crates.io registry (403). No build, test or Rust CI workflow ran on this head; rust.yml and vss-integration.yml only run when started by hand. The only check on the head is the release-triggered Android Publish run, which does not compile cfg(vss_test) code. The author reports the io::vss_store tests passed against a local VSS server built without auth. That is their result, not one I observed. The remaining check is to run RUSTFLAGS="--cfg vss_test" cargo test io::vss_store against a VSS server, for example through the vss-integration workflow on this head.
Reviewer model: claude-opus-5-5
Reasoning effort: high
Description
vss_a_write_counts_from_its_call(vss_test): an unpolled write or removal future keeps its store current until it is dropped, so a write waiting behind another of its key is counted from its call site, as asked in review on fix: fence a replaced vss store's writes #140.Cargo.toml,Cargo.lock, bothgradle.properties,bindings/python/pyproject.tomlandPackage.swift(tag and the newLDKNodeFFI.xcframework.zipchecksum), and updates the changelog heading.Out of Scope
Node::startrefusing a replaced store before it waits on detached work: it needs a node whose detached work is stuck in a VSS write.vss_replaced_node_refuses_to_startcovers the refusal itself.QA Notes
io::vss_storetests,vss_testincluded, passed against a local VSS server built without auth../bindgen.shbuilt the Android libraries and the Swift xcframework;shasum -a 256ofLDKNodeFFI.xcframework.zipmatches the checksum inPackage.swift.Models used
Claude Opus 5.5(reasoning:medium)Claude Opus 5.5(reasoning:medium),Claude Sonnet 5.5(reasoning:high)Claude Sonnet 5.5(reasoning:high)Release