Skip to content

chore: prune unused deps, undocumented env vars, and stale recipes - #117

Merged
eetu merged 5 commits into
mainfrom
chore/prune-drift
Jul 29, 2026
Merged

chore: prune unused deps, undocumented env vars, and stale recipes#117
eetu merged 5 commits into
mainfrom
chore/prune-drift

Conversation

@eetu

@eetu eetu commented Jul 29, 2026

Copy link
Copy Markdown
Owner

A second pass over accumulated drift, after the formatting one in #116. Five
commits, each independent — nothing here changes runtime behaviour.

chore: drop dependencies nothing uses

Twelve dependency declarations that no source file references:

crate unused
backend async-trait, base64, tokio-util
press axum-extra, thiserror, tower, tower-http
shared serde_json
shelf tokio-util
frontend classnames

press carried thiserror without defining a single error type — Error
appears nowhere under press/src.

Three more sat in [workspace.dependencies] that no member ever picked up:
hyper and hyper-util, which were never referenced by anything even before
this change, and base64, orphaned by the backend removal.

Found by grep, then confirmed the only way that counts — removing them and
rebuilding. Only async-trait actually leaves the dependency graph; the rest
stay as transitive deps of other crates, so this is mostly manifest honesty
rather than a build-time win.

docs: document three env vars, and the e2e crate

SCRIBE_COVERS_DIR, STATIC_DIR and SHELF_COVERS_DIR are read at boot but
were in no .env.example — the only way to find them was reading config.rs.
The other ~30 vars are all documented, so these three were oversights rather
than a convention.

The covers pair earns a real comment: backend and shelf must point at the
same directory, because shelf only serves cover art backend has already
cached and never writes any of its own. Their defaults disagree — backend
falls back to a relative covers, shelf to the container path /data/covers
— so a shared-host dev setup that leaves both unset gets silently missing
artwork rather than an error. Both files now say so and cross-reference.

README also claimed four workspace members (there are five) and omitted the
e2e crate from the layout entirely.

chore(justfile): make check cover the shim, and stop implying test runs e2e

Two recipes promised more than they delivered:

  • check called itself "lint + format + typecheck everything" but skipped
    the Python shim, though the hook and CI both run ruff over it.
  • test called itself "run all tests", but cargo test --workspace walks
    straight past the e2e suite — it's #[ignore]d, so no filter short of
    --ignored reaches it. Nothing local ran it, so checking that the stack
    still boots meant hand-copying the command out of ci.yaml.

Added just e2e with CI's exact invocation and reworded test. Longer prose
moved into the recipe bodies, because just --list shows only the last
comment line above a recipe — a multi-line doc comment renders as a dangling
fragment.

chore(frontend): regenerate routeTree.gen.ts

The committed generated output predated the pinned @tanstack/router-plugin,
so any yarn dev/yarn build left the working tree dirty. Ordering-only:
same four routes, emitted ascending instead of reversed.

ci: correct the stale crate list in the cache comment

The rust-cache comment named three workspace members and "all three crates";
there are five. shelf and e2e joined later and the comment never caught up.
Comment only.

Verification

  • cargo build --workspace --all-targets — clean
  • cargo clippy --workspace --all-targets -- -D warnings — clean
  • cargo test --workspace — 43 passed
  • just e2e — stack boots, 1 test passes in 3.3 s
  • yarn validate and yarn build — clean
  • just --list renders every description correctly
  • just check passes end to end on this branch, shim ruff step included

Note

Separately, and not a repo problem: my local frontend/node_modules had
drifted to prettier 3.9.5 against a lockfile pinning 3.9.6, which made
yarn format — and therefore the pre-commit hook on any frontend commit —
fail with command not found: prettier. A plain yarn install fixed it, and
the lockfile needed no change.

eetu added 5 commits July 29, 2026 17:44
Twelve declarations that no source file references. Found by grepping each
declared dep for its crate path in that crate's own sources, then confirmed
the only way that counts: removing them and rebuilding.

  backend   async-trait, base64, tokio-util
  press     axum-extra, thiserror, tower, tower-http
  shared    serde_json
  shelf     tokio-util
  frontend  classnames

press carried thiserror without defining a single error type -- "Error"
appears nowhere under press/src.

Three more sat in [workspace.dependencies] that no member ever picked up:
hyper and hyper-util, never referenced by anything even before this change,
and base64, orphaned by the backend removal above.

async-trait leaves the dependency graph outright; the rest remain as
transitive deps of other crates, so this is mostly manifest honesty rather
than a build-time win.

cargo build --workspace --all-targets: clean.
cargo clippy --workspace --all-targets -- -D warnings: clean.
cargo test --workspace: 43 passed.
yarn validate && yarn build: clean.
SCRIBE_COVERS_DIR, STATIC_DIR and SHELF_COVERS_DIR are all read at boot but
appeared in no .env.example, so the only way to discover them was to read
config.rs. The other ~30 vars are documented, several as commented-out
examples, so these three were oversights rather than a convention.

The covers pair is worth the words: backend and shelf must point at the same
directory, since shelf only serves cover art that backend has already cached
and never writes any of its own. Their defaults disagree -- backend falls
back to a relative "covers", shelf to the container path /data/covers -- so a
shared-host dev setup that leaves both unset gets silently missing artwork,
not an error. Both files now say so and point at each other.

README listed four workspace members; there are five. Added the e2e crate to
the layout as well, which was missing from the tree entirely.
…ns e2e

Two recipes promised more than they delivered.

`check` called itself "lint + format + typecheck everything" but skipped the
Python shim, even though the pre-commit hook and CI both run ruff over it. It
now runs the same `uv run ruff check src`.

`test` called itself "run all tests" while `cargo test --workspace` walks
straight past the e2e smoke suite -- the tests are #[ignore]d, so no filter
short of --ignored reaches them. Nothing in the repo ran them except CI, so
locally there was no way to check the stack still boots without hand-copying
the command out of ci.yaml. Added `just e2e` with CI's exact invocation, and
reworded `test` to say what it actually covers.

Longer prose moved inside the recipe bodies: `just --list` shows only the last
comment line above a recipe, so a multi-line doc comment renders as a dangling
fragment ("3003-3006 free. Same invocation CI uses.").

Verified: `just --list` reads correctly, the new ruff step passes, and
`just e2e` boots the stack and passes (1 test, 3.3s).
Committed output predated the pinned @tanstack/router-plugin, so any yarn dev or yarn build left the working tree dirty. Ordering-only change: same four routes, same content, emitted ascending instead of reversed.
The comment named three members and "all three crates"; the workspace has five (shelf and e2e joined later). Comment only.
@eetu
eetu force-pushed the chore/prune-drift branch from 8192730 to 77909ce Compare July 29, 2026 14:44
@eetu
eetu merged commit f293533 into main Jul 29, 2026
9 checks passed
@eetu
eetu deleted the chore/prune-drift branch July 29, 2026 14:47
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