Skip to content

C3 — Health hooks: failure-triggered checks that troubleshoot and report #9571

Open

Description

@dezren39

C3 — Health hooks: failure-triggered checks that troubleshoot and report

Component of the reporting-architecture program (starter epic #9568).
Source: Drew's directive, Reports chat, 2026-11-13 09:11 CST.
Statements: S1.3.

Scope

Checks like "PM stack reachable" and "OpenCode working" stop being
interval polls and become hook scripts that fire on failure-to-connect:

  • On a failed connect (from any caller: PM stack surfaces, lane launches,
    aggregator ticks), the hook fires immediately, runs a bounded
    troubleshoot sequence (reachability, service state, auth/credential
    health, recent changes), and reports what occurred — a note to the
    queues/PM-health category chat, escalating to Reports when it is an
    exception and to the main chat when Drew is blocked.
  • The hook records the incident into the PM-stack event store so C6 can
    render an incident page and C8 can ingest it (first-appearance data for
    error strings starts here).
  • Recovery is also an event: the same hook reports the recovery (the
    watchdog's new-alert/recovery pattern, event-driven).

Boundaries / collisions

  • This is the successor to the disabled opencode-session-minder's
    detection role — hooks, not a revived cron (the Fleet CA coordinator's
    finding stands: no durable monitor covered sessions after 2026-11-08;
    this component closes that gap by trigger, not by schedule).
  • fleet-watchdog / fleet-minder keep their current duties until the hooks
    prove out; the design names the overlap and the cutover test.
  • Troubleshoot actions are bounded and named in design (read-only probes
    first; any state-changing remediation is a separate, gated step).

Acceptance

  • Merged design: trigger surface (who calls, what counts as
    failure-to-connect), probe sequence per check, report format,
    escalation rules.
  • PM-stack-reachable and OpenCode-working hooks live, with one real
    failure + recovery cycle each recorded end-to-end.
  • Incident records land in the event store in the shape C6/C8 consume.

Acceptance criteria

  • Failure-to-connect hooks fire from any caller (PM-stack surfaces, lane launches, aggregator ticks), run the bounded troubleshoot sequence, and report the incident to the queues/PM-health category chat, escalating to Reports / main chat per the body.
  • Incidents are recorded into the PM-stack event store for C6/C8 ingestion, and recovery is reported as an event by the same hook.

Activity

  1. added
    app/pm-stack
    on Nov 13, 2026
  2. developing-today commented on Nov 13, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triaged — task 19037 (lane code-c)

  4. added
    task/small-fix
    priority/normal
    effort/l
    kind/design
    queue/queued
    work/assigned
    queue/claimed
    and removed
    queue/queued
    on Nov 17, 2026
  5. 422 remaining items

  6. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    Progress from felix: still working

  7. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: slice-d-validation-landed
    by: agent felix (kind muse, Muse sandbox seat; queue task 20918, worker felix)
    at: 2026-11-22

    Slice D moved from "parked on Slice C" to validated-at-the-hook-level. PR #12600 carries the full record (doc/2026-11-22T14-55-23Z_c3-health-hooks_slice-d-validation/, with drill harness + raw evidence). Summary:

    Real failure + recovery cycles — done for both hooks (shipped runner on main 9794191, sandbox, disposable stand-ins; no production service touched):

    • pm-stack-reachable: hard down (connection refused) -> down/critical, incident d50ada41; /board 503 with intake up -> down again with the SAME incidentId (open-outage reuse); /board 200 -> up, recoveryOf lineage, recoveryDelivered true; steady state -> transient, no record. All throat POSTs captured.
    • opencode-working: nothing on the production port 13420 (verified free on this seat) -> down/warning, incident 295e4e8b; stand-in /global/health 200 -> up with lineage; steady state -> transient, no record.
    • Runner suite on main: 22 passed.

    C6/C8 shape verification — done, one real gap found. Hook-local JSONL record conforms to the design contract. PR #12226's AuditEvent mapping conforms to the design's append section (its tests run against the real EventsStore: 3 pass). BUT the full incident record never reaches the events stream: the throat POST is a reduced body and the stream's closed StreamEvent shape cannot carry evidence — C6 cannot pair recovery with down from the stream, and C8's first-appearance error strings never arrive. Filed as #12599 (design decision needed), triage packet enqueued same pass (task 21050), three minor diffs included. Acceptance bullet 3 is therefore only partially satisfiable until #12599 is decided; bullet 2 stays open until a production cycle lands in the production stream.

    Cutover — honestly not started (day 0 of 14). Read-only laptop checks: sentinel/aggregator/opencode active, all services up, hookDispatchedStates unset, no health-hook-incidents.jsonl on the laptop, zero health-hook-incident events — no hook has ever fired in production. The drill cycles validate the hooks but do not count toward the cutover (condition 3 requires cycles in the production events stream). Day 0 = first full day after PR #12226 merges AND the laptop runs the merged code with hooks firing from production callers. Nothing retired; fleet-watchdog/fleet-minder keep all duties.

    Remaining, in order: merge #12226 -> production failure/recovery cycle per hook in the production stream -> #12599 decision -> start the 14-day clock. Claim released free.

  8. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    Released by felix (outcome: free). Slice D hook-level validation landed in PR #12600: real failure/recovery cycles for both hooks, C6/C8 shape verified (gap filed as #12599, task 21050). Production cycles await PR #12226 merge; 14-day cutover not started (day 0 defined on the issue).

  9. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: merged
    by: agent felix (kind muse, Muse sandbox seat; queue task 20918, worker felix)
    at: 2026-11-22

    The Slice D validation record is merged: #12600
    (doc/2026-11-22T14-55-23Z_c3-health-hooks_slice-d-validation/ — record, drill harness, and raw evidence.)

    What it establishes: both hooks ran a real failure-plus-recovery cycle end-to-end through the shipped runner against disposable stand-ins — pm-stack-reachable through down (same incidentId reused across the open outage) to a delivered recovery with correct lineage, opencode-working from a genuine down on the production port to up; steady state produces no record in both. Runner suite on main: 22 passed. Felix spot-checked the committed evidence before merge: no credential values in any artifact (the captures record authorization presence only).

    C6/C8 verdict: the hook-local record and PR #12226's AuditEvent mapping conform to the design; the one real gap — the full incident record never reaches the events stream, so C6 cannot pair a recovery with its down event from the stream — is filed as #12599 with its triage packet (task 21050) enqueued.

    Cutover: day 0 of 14, honestly. No hook has ever fired in production (read-only laptop checks: no incident JSONL, zero health-hook-incident events in the stream), and drill cycles do not count toward condition 3. Day 0 is defined in the record: the first full day after #12226 merges and the laptop runs the merged code with hooks firing from production callers. Remaining Slice D chain: merge #12226 -> one production cycle per hook in the stream -> #12599 decision -> start the clock. Nothing retired.

  10. dezren39 commented on Nov 22, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    event: decision — #12599 decided; acceptance bullet 3 unblocked in its amended form
    by: agent felix (kind muse, Muse sandbox seat; queue task 21050)
    at: 2026-11-22

    The #12599 design decision is recorded: #12599 (comment)

    Decision (option b, specified): the events stream stays the thin audit index exactly as the C3 design's append section specifies (PR #12226's projection is the whole stream contract); the alerts ledger becomes the incident record of detail — the throat POST gains a validated healthHook extension carrying the full incident record, stored in the ledger against the incident; C6 reads detail from the alerts read surface; C8 reaches the evidence through C6's incident pages/blobs. The C3 design note is amended to state the two-store contract.

    Effect on this issue: acceptance bullet 3 ("incident records land in the event store in the shape C6/C8 consume") is satisfiable as amended — the audit projection lands in the stream (via #12226), the incident record itself lands in the ledger (via the implementation issues below). The three Slice D minor diffs are dispositioned in the same decision.

    Implementation, filed and enqueued in the same pass:

    Remaining on Slice D is unchanged otherwise: merge #12226 → production cycles in the stream → these two issues → the 14-day cutover clock can start per the day-0 definition in the Slice D record.

  11. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: verified
    actor: oc-code-02 (openchamber scheduled Fleet lane)
    task: 21985 (second-pass verify-and-route)

  12. developing-today-fleet commented on Nov 26, 2026

    @developing-today-fleet
    Contributor

    Triage recheck (code-h, task 24342, 2026-11-26): still live, no state change since the 2026-11-24 second-pass. Landed slices stand (design #12077, wiring #12226, Slice D validation #12600; gap #12599 closed). No new PR references #9571. Remaining acceptance (production failure/recovery cycles, 14-day cutover) is multi-slice effort/l work owned by the pm-stack lane, not one packet, so nothing routed here. Issue stays OPEN with status:in-review.

  13. developing-today-fleet commented on Nov 27, 2026

    @developing-today-fleet
    Contributor

    agent-note:v1
    state: verified
    actor: oc-code-05 (OpenChamber scheduled Fleet lane)
    task: 24484

    Fresh recheck: #9571 remains OPEN. PRs #12226 and #12600 are merged; implementation issues #12602 and #12603 are closed/status:done. The remaining acceptance is production failure/recovery evidence and the 14-day cutover; the latest recorded cutover note says day 0 had not started. This is continuing effort/l work, not a bounded small fix. No new implementation, production injection, or duplicate follow-up packet was created. Parking this task pending a fresh production-cutover checkpoint; keep fleet-watchdog and fleet-minder active.

  14. dezren39 commented on Nov 27, 2026

    @dezren39
    MemberAuthor

    Lane 2122-B (agent work loop PRESS delta, 2026-11-26) — triage verdict for task 24484: still live, NOT resolved, parked on a concrete production condition.

    Fresh verification this run (gh CLI, 2026-11-27):

    Disposition: parking queue task 24484. Ready condition: a production cutover checkpoint exists — day 0 of the 14-day cutover is recorded on #9571 or a production failure+recovery cycle for either hook is recorded in the PM-stack event store; then re-triage the remaining acceptance.

  15. developing-today-fleet commented on Nov 27, 2026

    @developing-today-fleet
    Contributor

    Fresh recheck — Lane oc-code-06, task 24484, 2026-11-27 ~04:05 UTC. No state change since the 03:40 UTC verdict on this same task: #9571 OPEN (labels status:in-review + status/parked + queue/queued + queue/parked, effort/l); slices #12077, #12226, #12600 all MERGED (re-verified); parent #9568 OPEN; no cutover day-0 or production failure/recovery evidence in the last hour. Parking on the same external condition: production cutover checkpoint (day 0 recorded or a failure+recovery cycle in the event store), then re-triage remaining acceptance.

  16. developing-today-fleet commented on Nov 28, 2026

    @developing-today-fleet
    Contributor

    Fresh recheck — Lane oc-code-06, task 24484, 2026-11-28 ~07:05 UTC. No state change since the 11-27 parked verdicts on this same task: #9571 OPEN (labels status:in-review + status/parked + queue/queued + queue/parked, effort/l, 142 comments, none newer than 11-27T04:04Z); design note + Slice D validation record present on current main; #12602/#12603/#12599 CLOSED; parent #9568 OPEN; no new merged or open PR references #9571 since #12600; no cutover day-0 or production failure/recovery evidence. Remaining acceptance (production cycles + 14-day cutover) is continuing effort/l work owned by the pm-stack lane. Parking on the same external condition: production cutover checkpoint (day 0 recorded or a failure+recovery cycle in the event store), then re-triage.

  17. developing-today-fleet commented on Nov 28, 2026

    @developing-today-fleet
    Contributor

    Lane 1722-L triage (queue task 26345, delta PRESS 2026-11-28) — still live, parked on the production cutover checkpoint.

    Fresh verification this run (gh CLI only, premise + ALL 143 comments read):

    Disposition: queue task 26345 parked. Resume condition: a production cutover checkpoint is recorded (cutover day 0, or a failure+recovery cycle in the PM-stack event store), then re-triage the remaining acceptance. No code changed.

  18. dezren39 commented on Nov 29, 2026

    @dezren39
    MemberAuthor

    🤖 Census note — 2026-11-29 (lane CEN-C09, full issue census)

    State verified today: C3 design + initial runner (PR #12077), lane-launcher/aggregator wiring and slices #12226/#12600 are MERGED; #12602/#12603/#12599 are closed. Repeated fresh rechecks (2026-11-27, 2026-11-28) found no state change.
    Blocker: the production cutover checkpoint — the supervised cutover (the #5769 window) has not happened; there is no day-0 or production failure/recovery evidence yet. That window is a Drew-scheduled event, not lane work.
    Next step: after the cutover window runs, collect the failure/recovery evidence and close against the acceptance items.
    Census fixes: removed task/small-fix (mislabel on an effort/l design component) and queue/queued (queue/parked + status/parked are the live state).
    Verdict: blocked — implementation landed; parked on the cutover checkpoint.

  19. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Census 2026-11-29 (Felix): full recheck of this issue — details, labels, blockers, priority (rechecked from scratch; prior detail did not exempt it).

    STRENGTHS:

    GAPS FOUND:

    • no concrete file/module pointers in the body

    FIXES I APPLIED:

    • none needed

    PICKUP NOTES (added by this census so the next agent can resolve this cold):

    REMAINS: nothing — ready for pickup

  20. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Issue census — 2026-11-29 (wave 2 residual pass)

    This issue already carries full census notes from parallel lanes today (CEN-C08/C09 and a Felix seat). I skimmed those notes, re-verified the live state, labels, and body firsthand, and do not duplicate their verdicts — this note records only my residual check and anything I changed.

    Residual check: component C3 of #9568; labels complete (kind/design, effort/l, priority/normal; status/parked + queue/parked consistent). Body had scope but no acceptance section; appended.

    Actions taken by this pass: appended ## Acceptance criteria (original body text unchanged above it).

    Priority: priority/normal — stands; no band change by this pass.

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

    app/pm-stackeffort/lepic/pm-stackkind/designprimary-parent/pm-stackpriority/normalqueue/parkedstatus/parkedstray-work

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions