Skip to content

[P1][Health] /health/ready 判定门恒真:OLTP 不可达仍返回 ready #71

Description

@fxbin

Parent: #6(生命周期审计三路之一发现,先登记再修)

症状

GET /health/ready 的就绪判定 diagnostics.get("oltp") is not None 恒为 True:database_diagnostics(app/core/db_backend.py:67-81)是纯元数据构造、不做任何连通性探测,not_ready 分支不可达。

期望 vs 实际

  • 期望(DEPLOYMENT.md §3.1 契约):ready 是「深度就绪(DB + DuckDB + scheduler)」,DB 不可达应返回 not_ready/503。
  • 实际:OLTP 完全不可达时仍返回 "ready";唯一真实探测在 /health/live。

边界

health 路由 / 部署路由层 / db_backend 诊断。

严重度 / 复现性

P1 / always。

回归测试候选

路由级测试四态:正常、SCHEDULER_ENABLED=False(应仍 ready + scheduler.running=false)、DuckDB 降级(应仍 ready + duckdb.available=false)、OLTP 不可达(应 not_ready)。

日志/证据

main.py:603-605;db_backend.py:67-81;审计结论见 #6。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions