[Phase 9] Report object-storage reachability in the readiness check

Aperta
#367 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
76/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
node.js, postgresql, typescript

Direzione di ricerca

Start with backend/src/health/readiness.ts and backend/tests/unit/readiness.test.ts to see how existing checks are cached and tested, then read backend/src/utils/object-storage.ts for the storage interface and local/test behavior. Add a cheap bucket HEAD check without creating or listing objects, decide and document how unavailable storage affects readiness, and test it with a fake driver. Done when the new status is cached, covered by unit tests, and the required documentation and changelog updates are present.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Phase: 9 — Deploy & CI (see ROADMAP.md)

Description

/health/ready checks configuration, database, migrations and payments RPC, but not the S3 bucket that lab results depend on (ADR 0014). If credentials expire or the bucket is misconfigured, an instance reports ready while every lab-result upload and download fails.

Requirements & context

What to do:

  • Add an objectStorage check (disabled | reachable | unavailable) that does a cheap HEAD on the bucket through utils/object-storage.ts, cached like the others.
  • Decide whether unavailable makes the instance not-ready or is reported only; document the choice.
  • Unit tests with a fake storage driver, matching the existing readiness tests.

Files likely involved:

  • backend/src/health/readiness.ts
  • backend/src/utils/object-storage.ts
  • backend/tests/unit/readiness.test.ts

Edge cases / constraints:

  • The local/test storage driver should report disabled or always reachable.
  • The check must not create or list objects.
  • Follow the ARCHITECTURE_ESSENTIALS.md hard rules (module boundaries, append-only orders, DB-level booking guarantees, no invented schema fields without documenting them for ARCHITECTURE.md §4 in a docs.d/ fragment).

Suggested execution

  1. Fork the repo and branch off main: git checkout -b feat/report-object-storage-reachability-in-the-readin
  2. Implement the changes above. If you hit a design question the issue doesn't answer, comment here before guessing.
  3. Run npm run typecheck, npm test and npm run test:integration in backend/. Booking, referral, order and payment flows need integration tests, not only unit tests (AGENTS.md).
  4. Commit with a clear message, for example: feat(health): Report object-storage reachability in the readiness check
  5. Open a PR against main with Closes #<this issue number> in the description.

Definition of done

  • New readiness field
  • Cached, cheap check
  • Unit tests
  • A changelog.d/<issue-number>-<short-slug>.md fragment (see changelog.d/README.md), and, if models or endpoints changed, the new ARCHITECTURE.md §4 / docs/api/README.md lines in a docs.d/<issue-number>-<short-slug>.md fragment (see docs.d/README.md)
  • CI green

How this will be reviewed

Reviewer checks the probe is a single cheap request and stays within the readiness cache window.

Guidelines

  • Claiming: comment to claim before you start, and check nobody else is assigned.
  • PR description: say what changed and why, include Closes #<issue>, and paste test output (plus screenshots for UI work).
  • Timeframe: open a PR within 7 days of assignment. If you get stuck, say so in the issue early rather than going quiet.

Not blocked by: any other open issue.

Lingua principale
TypeScript
Stelle
11
Fork
57
Merge medio
20h 41m
PR unite (30g)
67

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di DocForum/docforum-core

Tutte le issue di DocForum/docforum-core

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.