KB-666A

P3D — B3-F1c-e dot-dot-health Reuse Viability Design Note

2 min read Revision 1
p3dbirth-systemb3f1c-edot-dot-healthreusedesign

P3D — B3-F1c-e dot-dot-health Reuse Viability Design Note

Date: 2026-05-13 Author: Opus Status: Design note — pending probe confirmation

Context

B3-F1c-d (Agent Data API bridge) PAUSED after discovering dot-dot-health v2.0.0 — a generic health check executor that already dispatches PG functions from system_health_checks table. If viable, the entire dispatch bridge problem reduces to 1 INSERT row.

Candidate path

BEFORE (B3-F1c-d): Directus Flow → new Agent Data endpoint → PG function
AFTER (B3-F1c-e):  system_health_checks row → dot-dot-health → PG function (existing infra)

Why this is better

  • Zero new services/endpoints/routes
  • Zero new dependencies
  • Zero new secrets/config
  • Already DOT-governed and table-driven
  • Already has generic dispatch for sql/builtin/function types
  • Adding check = INSERT 1 row, no code change (proven by S178 Fix25)
  • Existing observability (rollup, TSV summary, exit codes)

3 unknowns requiring probe

# Question If OK If NOT OK
1 Function executor signature compatible? 1 INSERT row Need thin wrapper function
2 Function executor uses RW (can write system_issues)? Works as-is Need executor extension or separate write step
3 dot-dot-health already scheduled automatically? Just add row Need to also set up scheduling (but for dot-dot-health, not a new path)

Decision tree

Probe Phase 1-2: signature + RW?
  ├─ Compatible + RW → REUSE_DOT_DOT_HEALTH_INSERT_ROW (best case)
  ├─ Incompatible signature → REUSE_WITH_WRAPPER_FUNCTION (1 thin PG wrapper + 1 INSERT)
  ├─ RO only → EXTEND_DOT_DOT_HEALTH_EXECUTOR or resume B3-F1c-d
  └─ Fundamental block → DOT_DOT_HEALTH_NOT_VIABLE_CONTINUE_AGENT_DATA_BRIDGE

Probe Phase 4: scheduled?
  ├─ Yes → done, row auto-picked up
  └─ No → schedule dot-dot-health itself (one-time, benefits ALL checks)

B3-F1c-e Design Note | Opus | 2026-05-13

Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/design/p3d-birth-system-b3f1c-e-dot-dot-health-reuse-viability-design.md