[P0] F07: Replace startup-only readiness with dependency-aware health and safe telemetry #12

Open
opened 2026-10-21 20:29:24 +02:00 by amiryahaya · 0 comments
Owner

Backlog ID: F07 | Priority: P0 | Phase: M1 — Secure build and persistence foundation

Outcome and scope

Keep the existing minimal liveness response, wire real readiness dependencies, and establish request correlation and structured redacted logs/traces/phase-timing interfaces used by later modules.

Dependencies and gates

Engineering prerequisites: #6 (F01), #8 (F03)

Synthetic-data development may proceed. Production use remains subject to the decision gates in the SRS.

Starting points

crates/api/src/health/; crates/api/tests/health_endpoints.rs; crates/api/src/telemetry/; docs/operations/

These are current files or proposed responsibility boundaries; finalize a focused implementation plan before coding. Existing local scaffolding is uncommitted and is not evidence of completion.

Acceptance criteria

  • Liveness remains available during downstream outage; readiness reflects configured critical database/index/identity/policy/model dependencies as capabilities are enabled.
  • Public probes return only status/generic reason; detailed health, metrics and traces require operator authorization.
  • JSON logs carry UTC time, severity, component, event code, build and random request ID; telemetry excludes sensitive/high-cardinality identifiers and payloads.
  • Startup/warmup/draining states and bounded inexpensive dependency probes are covered; workers and Engine adopt the same contract when added.

Verification

Extend existing health tests to real dependency loss/recovery, unauthorized diagnostics and draining; use sentinels to verify logs/traces do not contain request content.

Behavior changes follow Red → Green → Refactor. Run affected Rust shared contract/unit tests and real PostgreSQL/Qdrant/runtime integration tests where applicable; frontend changes run typecheck/build and the relevant browser tests. Record exact commands/results in the implementation PR. Documentation/decision tasks use recorded review evidence.

Requirements and design

FR-OPS-001–003, 005; FR-ADMIN-002; NFR-OPS-003, NFR-PERF-002; architecture §13

Sources: SRS, system design. Local planning context: docs/implementation-plan.md and docs/development-backlog.md (not published by this task).

Security impact: Use synthetic fixtures until approved for operational data. Preserve current authorization, markings, provenance and default-deny behavior; exclude protected payloads/secrets from operational telemetry. No classified-deployment or PQC-compliance claim is implied by closing this issue.

Parent roadmap: #1

**Backlog ID:** F07 | **Priority:** P0 | **Phase:** M1 — Secure build and persistence foundation ## Outcome and scope Keep the existing minimal liveness response, wire real readiness dependencies, and establish request correlation and structured redacted logs/traces/phase-timing interfaces used by later modules. ## Dependencies and gates **Engineering prerequisites:** #6 (F01), #8 (F03) Synthetic-data development may proceed. Production use remains subject to the decision gates in the SRS. ## Starting points crates/api/src/health/; crates/api/tests/health_endpoints.rs; crates/api/src/telemetry/; docs/operations/ These are current files or proposed responsibility boundaries; finalize a focused implementation plan before coding. Existing local scaffolding is uncommitted and is not evidence of completion. ## Acceptance criteria - [ ] Liveness remains available during downstream outage; readiness reflects configured critical database/index/identity/policy/model dependencies as capabilities are enabled. - [ ] Public probes return only status/generic reason; detailed health, metrics and traces require operator authorization. - [ ] JSON logs carry UTC time, severity, component, event code, build and random request ID; telemetry excludes sensitive/high-cardinality identifiers and payloads. - [ ] Startup/warmup/draining states and bounded inexpensive dependency probes are covered; workers and Engine adopt the same contract when added. ## Verification Extend existing health tests to real dependency loss/recovery, unauthorized diagnostics and draining; use sentinels to verify logs/traces do not contain request content. Behavior changes follow Red → Green → Refactor. Run affected Rust shared contract/unit tests and real PostgreSQL/Qdrant/runtime integration tests where applicable; frontend changes run typecheck/build and the relevant browser tests. Record exact commands/results in the implementation PR. Documentation/decision tasks use recorded review evidence. ## Requirements and design FR-OPS-001–003, 005; FR-ADMIN-002; NFR-OPS-003, NFR-PERF-002; architecture §13 Sources: [SRS](https://forgejo.primatekun.tech/primatekuntech/rag-rust/src/branch/main/docs/SRS.md), [system design](https://forgejo.primatekun.tech/primatekuntech/rag-rust/src/branch/main/docs/architecture.md). Local planning context: `docs/implementation-plan.md` and `docs/development-backlog.md` (not published by this task). **Security impact:** Use synthetic fixtures until approved for operational data. Preserve current authorization, markings, provenance and default-deny behavior; exclude protected payloads/secrets from operational telemetry. No classified-deployment or PQC-compliance claim is implied by closing this issue. **Parent roadmap:** #1
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
primatekuntech/rag-rust#12
No description provided.