Goal
Confirm that the backend health checks validate the correct database/table availability semantics instead of accidentally checking table contents.
The checks should prove that required tables/schema are reachable and usable without depending on rows being present.
Suggested branch name
backend/verify-health-schema-checks
Expected task size
Small: one focused session
Scope
- Review existing backend health check queries.
- Confirm they check table/schema availability, not row contents.
- Replace any content-dependent checks such as broad
SELECT * FROM ... probes with minimal schema/table checks where appropriate.
- Document the intended health-check semantics in nearby code or module docs if needed.
Explicit non-goals / boundaries
- Do not redesign the full health model.
- Do not add frontend health UI work here.
- Do not change medication-domain schema decisions.
- Do not require seeded table contents for a healthy state.
Files / areas likely affected
- backend health modules
- SQLite/persistence health helpers
- dev-notes health checks
- backend tests or smoke checks
- docs near health/persistence modules
Definition of done
Validation
- Run the backend health checks against an empty but migrated database.
- Run existing backend smoke/integration checks.
- Confirm health output stays healthy when required tables exist but contain zero rows.
Follow-up ideas
- Add dedicated schema migration validation later.
- Add deeper readiness diagnostics after the M1 foundation is stable.
Goal
Confirm that the backend health checks validate the correct database/table availability semantics instead of accidentally checking table contents.
The checks should prove that required tables/schema are reachable and usable without depending on rows being present.
Suggested branch name
backend/verify-health-schema-checksExpected task size
Small: one focused session
Scope
SELECT * FROM ...probes with minimal schema/table checks where appropriate.Explicit non-goals / boundaries
Files / areas likely affected
Definition of done
SELECT * FROM ...-style content probe is either removed or justified.Validation
Follow-up ideas