06 — Heartbeat substrate live; silent gap unchanged (Phase 2 must close it)
06 — Heartbeat & Silent-Gap Status
Substrate now live
queue_heartbeattable — 1-row-per-executor UPSERT model.fn_queue_heartbeat_tick(executor_name, executor_kind, status, current_job_id, lease_owner, metadata) RETURNS jsonb— gated byqueue.heartbeat.enabled.fn_queue_stale_check(threshold_seconds) RETURNS jsonb— passive read, returns stale executors but emits NO event in Phase 1.v_queue_health— exposes per-executorstatus_hint ∈ {fresh, warning, stale}based on age vsqueue.heartbeat.stale_threshold_seconds(default 300s; warning band = 300–600s; stale = >600s).
This generalises the proven dot_config.hc_executor_last_run cadence pattern ([[feedback-hc-executor-last-run-is-proven-heartbeat-pattern]]) from one global key to one row per executor.
Silent gap NOT closed in Phase 1
| Cursor | last_run_at | Age at apply |
|---|---|---|
iu_outbound_default (domain=iu) |
2026-05-22 11:31:41 UTC | ~95.6 hours |
Phase 1 explicitly does not touch iu_route_worker_cursor, does not start any worker process, and does not wire the legacy worker into the new queue_heartbeat.
queue.heartbeat.enabled is false at Phase 1 exit. No executor is yet sending ticks.
This is consistent with the prompt's USER DECISION 4 ("minimal heartbeat is mandatory in Phase 1") interpreted as substrate-mandatory, activation-deferred: the building blocks are live and verified in proof, but no caller is wired up. Activation is a Phase-2 task.
Why the gap remains a §15.5 violation
Per [[feedback-dieu45-silent-gap-violation-post-enactment]]: §20.4 exempts only retroactively; continuation = fresh §15.5 violation. Phase 1's design choice is to land the substrate first so Phase 2 can close the gap with a real heartbeat writer rather than backfilling under live traffic.
Phase 2 closure path
- Flip
queue.heartbeat.enabledtotrue(singleUPDATE dot_config). - Either:
- Add a 1-line
fn_queue_heartbeat_tick('iu_outbound_default', 'PG_worker', ...)call insidefn_iu_route_worker_run, OR - Have Hermes/host-cron call
fn_queue_heartbeat_tickfrom the external orchestrator on the existing iu_outbound_default cadence.
- Add a 1-line
- Confirm
v_queue_health.status_hint='fresh'for that executor withinstale_threshold_seconds. - (Phase 3) emit
system/queue_worker_silentevent fromfn_queue_heartbeat_tickon thefresh→staletransition so D31/D43 can observe.
Diagnostic now available
Even with queue.heartbeat.enabled=false, the read-only views are queryable:
SELECT * FROM v_queue_health;
→ returns executors_fresh=0, executors_warning=0, executors_stale=0, dlq_pending_count=0, … until the first tick is written. Reflects the Phase-1 reality: the substrate exists, but no executor is registered yet.
Cross-links
- [[feedback-hc-executor-last-run-is-proven-heartbeat-pattern]]
- [[feedback-dieu45-silent-gap-violation-post-enactment]]
- [[project-dieu45-v1-0-enacted-2026-05-26]] §15.5