Skip to content

Publish the first Epoch crate as epoch-journal 0.1.0 - #18

Merged
Shearerbeard merged 5 commits into
mainfrom
card/e23
Oct 2, 2026
Merged

Shearerbeard merged 5 commits into
mainfrom
card/e23

Conversation

@Shearerbeard

Copy link
Copy Markdown
Owner

Package Epoch's current Decider API as epoch-journal 0.1.0 while keeping epoch as the Rust import. The README has a compiled counter example and backend setup. The manifest adds crates.io metadata and Rust 1.88 CI checks. EventStoreDB moves to client 4.0 to remove vulnerabilities in its older dependency tree.

The branch also contains three earlier local main commits for the test environment. They add Compose services and require an explicit PostgreSQL test URL.

cargo test and cargo test --all-features passed against isolated services. The README doctest, cargo publish --dry-run, dependency audit, and archive leak scan passed locally. The audit records one user-approved exception for unmaintained rustls-pemfile through tonic. The streams and saga work stays on PR #17 for the later release.

The service-backed tests read three connection strings and nothing in
the repo said so, so a fresh checkout panics with "File .env or Env
Vars not found" and no way to learn the variable names. .env.example
documents all three and the README says how to run the suite.

Postgres had no compose service at all: the test helper falls back to a
hardcoded connection string pointing at a different project's database,
which only works on a machine that happens to be running it. The new
service publishes on 54321 to stay clear of both a system postgres and
that container, and the backend migrates its own schema onto it. The
obsolete compose version attribute goes too; it only ever printed a
warning.

The hardcoded fallback in the test helper is left alone: it is live on
this machine and changing it is a behavior call, not a packaging one.
Review of the previous commit found the env template documented a
variable that did nothing. The postgres helper reads EPOCH_PG_TEST_URL
through std::env::var while only the redis and esdb helpers load .env,
so a connection string set in .env was ignored and the hardcoded
fallback ran instead - silently pointing the suite at an unrelated
project's database. Proven before and after: with .env aimed at a dead
port the tests passed, and now they fail.

The service also bound to every interface with throwaway credentials
and carried a restart policy it has no business having as a test
fixture. It binds to loopback now and stays down until asked for.
The helper fell back to a hardcoded connection string naming another
project's database. These tests migrate schema and write events into
whatever they connect to, so an unset or misspelled variable was not a
harmless default - it silently pointed the suite at someone else's
data. There is no safe database to guess, so the variable is required
and the run stops without it.

Verified both ways: the suite passes driven by .env, and with .env
removed every postgres test fails with the message naming .env.example
rather than connecting anywhere.
Package the current Decider API for its first public release. Update
the backend dependencies and test checks to support the release gates.

Card: E17
Card: E23
Wait for EventStoreDB's asynchronous category projection only.
Other backends keep an immediate category assertion, and read
errors fail without retrying.

Card: E23
@Shearerbeard
Shearerbeard merged commit 9355187 into main Oct 2, 2026
4 checks passed
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