Skip to content

Bring e2e/ back in sync, put it under CI, and drop the upgrade section - #19

Merged
ristik merged 2 commits into
mainfrom
e2e/sync-with-the-sdk
Aug 31, 2026
Merged

Bring e2e/ back in sync, put it under CI, and drop the upgrade section#19
ristik merged 2 commits into
mainfrom
e2e/sync-with-the-sdk

Conversation

@ristik

@ristik ristik commented Aug 31, 2026

Copy link
Copy Markdown
Member

The e2e/ directory declares its own [workspace], so the root cargo build, cargo clippy and cargo test never reach it and CI never compiled it. It had drifted on two counts, both invisible to every check the repo runs.

The lockfile was stale

e2e/Cargo.lock recorded unicity-token at 0.1.0 (the crate is 3.0.1) and still carried a num-traits dependency the SDK dropped some time ago. CI now builds the demo with --locked, so this fails rather than drifting.

The live test read a file that does not exist

tests/e2e.rs read connection parameters from e2e/unicity-service, a key: value file that

  • does not exist in the tree,
  • is not tracked,
  • is not matched by e2e/.gitignore (which covers .env, .env.*),
  • and is named in no README.

So the run instruction in the root README panicked with e2e/unicity-service, naming a file whose format was documented nowhere. Worse, anyone who guessed the format and created one would have had a testnet API key sitting in the working tree, untracked but not ignored, one git add -A from being committed.

Everything else in the repo already shares one convention: examples/mint.rs, examples/transfer.rs, examples/split.rs and the e2e/ demo crate all read e2e/.env through dotenvy with UNICITY_GATEWAY / UNICITY_API_KEY / UNICITY_TRUSTBASE, documented in e2e/.env.example, e2e/README.md and examples/README.md, and all let the process environment take precedence. The live test now does the same, so CI can supply a key without writing a file.

The trust base path follows UNICITY_TRUSTBASE rather than being hardcoded, matching examples/mint.rs, and a missing file now reports which path it tried.

The README carried an upgrade section for releases that never happened

This crate had never been released: it sat at 0.1.0, unpublished, and 3.0.1 is its first release. A section walking through migration from wire versions no consumer ever received is noise, and the parts of it that were corrections rather than protocol changes read as if they had once been shipped behaviour. It is dropped.

The migration story stays in the v3.0.1 release notes, where it is addressed to someone comparing this crate against the TypeScript and Java SDKs rather than against an earlier Rust release. The interop line near the top stays, because which SDK and aggregator versions a 3.0.1 client talks to is a current fact rather than a historical one.

CI

A step running fmt, clippy and a --locked build of the demo crate, since nothing else does.

Validation

  • cargo fmt --all --check, cargo clippy --all-targets --all-features -- -D warnings
  • cargo test --all-features: 122 unit, 19 transport, 10 cross-SDK, 1 ignored live
  • cargo fmt --manifest-path e2e/Cargo.toml --check, cargo clippy --manifest-path e2e/Cargo.toml --all-targets -- -D warnings, cargo build --manifest-path e2e/Cargo.toml --locked

No library code changes, so v3.0.1 as published is unaffected.

ristik added 2 commits August 31, 2026 13:41
`e2e/` declares its own `[workspace]`, so the root build, clippy and test runs
never reach it and CI never compiled it. It had drifted on two counts.

Its lockfile still recorded `unicity-token` at 0.1.0 and carried a `num-traits`
dependency the SDK dropped some time ago. Building with `--locked` now fails if
that happens again.

The live test read `e2e/unicity-service`, a `key: value` file that exists
nowhere in the tree, is not tracked, is not covered by `e2e/.gitignore`, and is
mentioned in no README. Anyone following the root README's run instruction got a
panic naming a file they had no way to know the format of, and anyone who
guessed and created one would have had an API key sitting untracked but
un-ignored. It now reads `e2e/.env` through `dotenvy` like the three examples
and the demo crate do, with the same `UNICITY_GATEWAY` / `UNICITY_API_KEY` /
`UNICITY_TRUSTBASE` names and the same "process environment wins" precedence, so
CI can supply a key without writing a file.

The trust base path follows `UNICITY_TRUSTBASE` rather than being hardcoded,
matching `examples/mint.rs`, and a missing file now says which path it tried.

CI gains an fmt, clippy and `--locked` build of the demo crate.
There is nothing to upgrade from. This crate had never been released: it sat at
0.1.0, unpublished, and 3.0.1 is its first release. A section walking through
migration from wire versions no consumer ever received is noise in the README,
and the parts of it that were corrections rather than protocol changes read as
if they had once been shipped behaviour.

The migration story belongs in the v3.0.1 release notes, where it is addressed to
someone comparing this crate against the TypeScript and Java SDKs rather than
against an earlier Rust release. The interop line near the top stays, because
which SDK and aggregator versions a 3.0.1 client talks to is a current fact
rather than a historical one.
@ristik ristik changed the title Bring e2e/ back in sync, and put it under CI Bring e2e/ back in sync, put it under CI, and drop the upgrade section Aug 31, 2026
@ristik
ristik merged commit d7d0c67 into main Aug 31, 2026
2 checks passed
@ristik
ristik deleted the e2e/sync-with-the-sdk branch August 31, 2026 10:53
ristik added a commit that referenced this pull request Aug 31, 2026
Bring e2e/ back in sync, put it under CI, and drop the upgrade section
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