Foundation follow-up cleanups #4

Closed
opened 2026-06-02 04:26:53 +00:00 by logaritmisk · 0 comments
Owner

Minor, non-blocking items noted during the Foundation (Plan 0) reviews. Group as low-priority cleanups.

  • Lock in the inward dependency on domain. domain is currently an unused island — wire db/api to its types when the first real entity lands (Plan 1+), so the "everything points inward to domain" rule is exercised, not just aspirational.
  • Keep SQL in db. When repository modules arrive, place them inside the db crate (consuming pool() internally) and consider making Db::pool() pub(crate), rather than letting api/server hold &PgPool.
  • Remove dead .clone() in server::runconfig.app_name is the last use of config, so it can be moved instead of cloned (crates/server/src/lib.rs).
  • Smoke-test robustness — in crates/server/tests/serve.rs the spawned serve(...).unwrap() swallows server errors as a task panic; propagate/await the handle so a server failure surfaces clearly instead of as a confusing reqwest error.

Source: Foundation (Plan 0) per-task + final reviews.

Minor, non-blocking items noted during the Foundation (Plan 0) reviews. Group as low-priority cleanups. - [ ] **Lock in the inward dependency on `domain`.** `domain` is currently an unused island — wire `db`/`api` to its types when the first real entity lands (Plan 1+), so the "everything points inward to `domain`" rule is exercised, not just aspirational. - [ ] **Keep SQL in `db`.** When repository modules arrive, place them *inside* the `db` crate (consuming `pool()` internally) and consider making `Db::pool()` `pub(crate)`, rather than letting `api`/`server` hold `&PgPool`. - [ ] **Remove dead `.clone()`** in `server::run` — `config.app_name` is the last use of `config`, so it can be moved instead of cloned (`crates/server/src/lib.rs`). - [ ] **Smoke-test robustness** — in `crates/server/tests/serve.rs` the spawned `serve(...).unwrap()` swallows server errors as a task panic; propagate/await the handle so a server failure surfaces clearly instead of as a confusing `reqwest` error. _Source: Foundation (Plan 0) per-task + final reviews._
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: logaritmisk/biggus-dickus#4