Skip to content

fix(tests): build the test harness against ant-node's ChunkStore - #196

Merged
jacderida merged 1 commit into
mainfrom
fix/v2-1033-chunkstore-test-harness
Sep 8, 2026
Merged

fix(tests): build the test harness against ant-node's ChunkStore#196
jacderida merged 1 commit into
mainfrom
fix/v2-1033-chunkstore-test-harness

Conversation

@jacderida

@jacderida jacderida commented Sep 8, 2026

Copy link
Copy Markdown
Member

Linear issue

Closes V2-1033

What this fixes

ant-node #216 replaced the LMDB chunk store with one file per chunk, changing AntProtocol::new to take Arc<ChunkStore> instead of Arc<LmdbStorage>. ant-core/tests/support/mod.rs still constructs the LMDB type, so all seven e2e test binaries fail to compile:

ant-core/tests/support/mod.rs:369
    expected `Arc<ChunkStore>`, found `Arc<LmdbStorage>`

e2e_merkle, e2e_payment, e2e_file, e2e_security, e2e_upload_costs, e2e_huge_file, e2e_cost_estimate.

Why nobody saw it. ant-client's CI compiles against the published ant-node 0.18.1, which predates #216, so the API change never reached this repo. It surfaced at the rc-2026.9.2 cut, where ant-core's dev-dep points at ant-node's rc branch and cargo check --all-targets --all-features went red. The shipped ant binary is unaffected — it never links ant-node.

Risk tier

  • T0 — docs / tooling / CI / pure UX-output. Repo CI only.
  • T1 — client-only, no network-facing behavior change. CI + prod compat smoke.
  • T2 — node/client logic with behavioral surface, no protocol/format/economics change. Dev testnet + ADR.
  • T3 — protocol / storage format / payments / routing. T2 evidence + adversarial testing.

Test-harness code and two dependency pins. No shipped code path changes.

Compatibility

  • Wire: none.
  • Storage: none in this repo. The harness's nodes now start on the file-per-chunk store rather than LMDB, which is what ant-node 0.19.0 does anyway.
  • API: none. No public item added, changed or removed.

Semver impact

  • breaking
  • feature
  • fix

No version bump is taken here; the release train owns that.

The dependency pins

ant-node = "0.18.1" has no ChunkStore — it exports only LmdbStorage, with StorageStats still under storage::lmdb. So the harness cannot compile against a published ant-node until 0.19.0 exists.

Both pins (the optional devnet dep and the [dev-dependencies] one) move to rev 31fcbae — #216's merge commit on ant-node main. A rev rather than a branch, so the pin is immutable and the build stays reproducible. Both revert to ant-node = "0.19.0" when the train publishes it; release_one_crate.sh does that rewrite at promotion.

Verified single lineage after the change — one ant-node, one ant-protocol, one saorsa-core in the lock, no registry/git duplicates.

Test evidence

Run on this branch:

  • cargo check --all-targets --all-features — clean (this is what was red)
  • cargo fmt --all -- --check — clean
  • cargo clippy --workspace --all-targets --all-features -- -D warnings — clean
  • cargo test --lib645 passed, 0 failed

The e2e suites compile again; they are left to CI to run, since the merkle suite alone takes ~55–65 min.

New dependency

None. Two existing ant-node pins change form from a version to a git rev.

ADR

n/a — T1 test-harness fix.

Mitigation / rollback

Revert the single commit. That restores the LmdbStorage harness and the
ant-node = "0.18.1" pins, which is a consistent, compiling state — it is
exactly what main is today. The cost of reverting is that the e2e suites
stop compiling again the moment ant-core points at an ant-node carrying #216,
so the rc branch would need the fix carried some other way.

Nothing here is reachable from the shipped ant binary, so a revert has no
runtime blast radius.

Note for reviewers

These nodes start with no legacy environment, so the store comes up directly on the file backend and the migration never runs. This harness therefore gives no LMDB-to-file migration coverage — it did not before either, but it is worth stating out loud given #216 is the release this is unblocking. Migration evidence has to come from the staging run and the beta soak.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RAfH7vssjtvHycmbLCr5ov

Closes V2-1033

ant-node #216 replaced the LMDB chunk store with one file per chunk and
changed `AntProtocol::new` to take `Arc<ChunkStore>` instead of
`Arc<LmdbStorage>`. `ant-core/tests/support/mod.rs` still constructs the
LMDB type, so all seven e2e test binaries fail to compile against it with
`error[E0308]: mismatched types`.

This was invisible until now because ant-client's CI compiles against the
published ant-node 0.18.1, which predates #216. It surfaced at the
rc-2026.9.2 cut, where ant-core's dev-dep points at ant-node's rc branch
and `cargo check --all-targets --all-features` broke.

`ChunkStoreConfig` is `LmdbStorageConfig` plus a `migration` field and
`ChunkStore::new` has the same shape, so the harness change is mechanical.

The ant-node pins move to rev 31fcbae (#216's merge on ant-node `main`)
because 0.18.1 has no `ChunkStore` and the harness cannot compile against
it. A rev rather than a branch, so the pin is immutable. Both pins revert
to `ant-node = "0.19.0"` when the release train publishes it.

Note for reviewers: these nodes start with no legacy environment, so the
store comes up directly on the file backend and the migration never runs.
This harness gives no LMDB-to-file migration coverage, and did not before.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RAfH7vssjtvHycmbLCr5ov

@dirvine dirvine left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick review at exact head b73854d: the test-harness migration from LmdbStorage to ChunkStore is mechanical and consistent with the pinned ant-node revision. Locally verified cargo check --all-targets --all-features and cargo fmt --all -- --check; both passed with a clean worktree. Current completed CI checks are green; long-running E2E jobs remain pending. No blocking issues found.

@jacderida
jacderida merged commit 9cfae67 into main Sep 8, 2026
14 of 18 checks passed
jacderida added a commit to jacderida/ant-client that referenced this pull request Sep 11, 2026
Closes V2-1033

Formatting only — the dependency is unchanged. The release tooling's
rewrite_dep.py handles single-line inline tables only, so the multi-line
form introduced in WithAutonomi#196 aborts the RC cut with:

  multi-line inline table for 'ant-node' at line 108 — not supported

Collapsing it lets `--rewrite-on ant-core/Cargo.toml#dev-dependencies=ant-node`
retarget the pin at cut time, and lets release_one_crate.sh rewrite it back
to a published version at promotion.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RAfH7vssjtvHycmbLCr5ov
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.

2 participants