chore: prune unused deps, undocumented env vars, and stale recipes - #117
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 usesTwelve dependency declarations that no source file references:
async-trait,base64,tokio-utilaxum-extra,thiserror,tower,tower-httpserde_jsontokio-utilclassnamespresscarriedthiserrorwithout defining a single error type —Errorappears nowhere under
press/src.Three more sat in
[workspace.dependencies]that no member ever picked up:hyperandhyper-util, which were never referenced by anything even beforethis change, and
base64, orphaned by the backend removal.Found by grep, then confirmed the only way that counts — removing them and
rebuilding. Only
async-traitactually leaves the dependency graph; the reststay 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 crateSCRIBE_COVERS_DIR,STATIC_DIRandSHELF_COVERS_DIRare read at boot butwere in no
.env.example— the only way to find them was readingconfig.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
e2ecrate from the layout entirely.chore(justfile): make check cover the shim, and stop implying test runs e2eTwo recipes promised more than they delivered:
checkcalled itself "lint + format + typecheck everything" but skippedthe Python shim, though the hook and CI both run ruff over it.
testcalled itself "run all tests", butcargo test --workspacewalksstraight past the e2e suite — it's
#[ignore]d, so no filter short of--ignoredreaches it. Nothing local ran it, so checking that the stackstill boots meant hand-copying the command out of
ci.yaml.Added
just e2ewith CI's exact invocation and rewordedtest. Longer prosemoved into the recipe bodies, because
just --listshows only the lastcomment line above a recipe — a multi-line doc comment renders as a dangling
fragment.
chore(frontend): regenerate routeTree.gen.tsThe committed generated output predated the pinned
@tanstack/router-plugin,so any
yarn dev/yarn buildleft the working tree dirty. Ordering-only:same four routes, emitted ascending instead of reversed.
ci: correct the stale crate list in the cache commentThe rust-cache comment named three workspace members and "all three crates";
there are five.
shelfande2ejoined later and the comment never caught up.Comment only.
Verification
cargo build --workspace --all-targets— cleancargo clippy --workspace --all-targets -- -D warnings— cleancargo test --workspace— 43 passedjust e2e— stack boots, 1 test passes in 3.3 syarn validateandyarn build— cleanjust --listrenders every description correctlyjust checkpasses end to end on this branch, shim ruff step includedNote
Separately, and not a repo problem: my local
frontend/node_moduleshaddrifted 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 plainyarn installfixed it, andthe lockfile needed no change.