Skip to content

health-hooks runner: post the full incident record (healthHook extension), one record shape, recovery title 'recovered' (#12603) - #12647

Merged
dezren39 merged 1 commit into
mainfrom
archer-lane-v/12603-runner-healthhook
Nov 22, 2026
Merged

dezren39 merged 1 commit into
mainfrom
archer-lane-v/12603-runner-healthhook

Conversation

@dezren39

@dezren39 dezren39 commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Implements #12603, the runner half of the #12599 decision-b pair. Ordering held: the aggregator half (#12602, PR #12646, merge 167b8b1dfd) landed first — this branch is based on that merge — because the old intake silently ignored unknown fields and would have dropped the extension without an error.

What lands

  • One record shape — the incident record is built once in main, in the full design shape including its stackHealth member (serviceId / name / state / since / detail, exactly as post_to_throat used to construct it inline). post_to_throat now reuses record["stackHealth"] instead of rebuilding it.
  • Full record posted as the healthHook extension — alongside the existing envelope members (source / key / severity / title / body / stackHealth), unchanged. The JSONL record, the POST body, and the ledger-bound extension are the same shape. Failure discipline unchanged: best-effort inside the 60 s sequence deadline; a failed post never changes the verdict or the JSONL record (the recoveryDelivered re-post loop is untouched).
  • Recovery title — Health hook: <display name> recovered for a recovery (state up with recoveryOf set); down / transient / plain-up titles unchanged. Dedupe is by key, not title, so the wording cannot split an incident. The wording is design-exact — the C3 note's evidence line records it (C3 aggregator: throat healthHook extension — store the full incident record in the alerts ledger + read projection (#12599 decision b) #12602's amendment round).

Tests (oracle: the #12599 record shape)

  • pm-stack/health-hooks/test_run.py: 25 passed (22 pre-existing + 3 new): JSONL record ≡ posted record with the built-once stackHealth member; posted body carries the full record as healthHook, with a sentinel detail proving stackHealth is reused, not rebuilt; recovery title reads … recovered with recoveryOf lineage and an up stackHealth member.
  • End-to-end seam drill (temporary harness, run against this branch's aggregator = merged C3 aggregator: throat healthHook extension — store the full incident record in the alerts ledger + read projection (#12599 decision b) #12602 intake): bodies generated by the real runner code path (down + recovery, mocked probes/intake) validate via validateHealthHook, store through the route's store path, and read back from listIncidentEvents with lineage (recoveryOf → down incidentId) and full evidence (incl. the probe-evolved confirmFailure member) intact — 6/6 green.

One storage note, carried from #12602: the ledger-stored record holds the design's stored shape (target / state / caller / firedAt / observedAt / incidentId / recoveryOf / evidence / stackHealth); the envelope duplicates ride the POST and live on the incident row / audit stream, per #12602's text ("envelope duplicates are fine — the ledger copy is the record").

Closes #12603


See it in action
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…extension (#12603)

Implements #12603, the runner half of the #12599 decision-b pair,
on top of the aggregator half (#12602, PR #12646 — landed first per
the ordering constraint: the intake had to accept the extension
before the runner could post it without silent drops).

One record shape: the incident record is built once in main, in
the full design shape including its stackHealth member (serviceId /
name / state / since / detail). post_to_throat reuses
record["stackHealth"] instead of rebuilding it, and posts the full
record as the healthHook extension alongside the existing envelope
members — so the JSONL record, the POST body, and the ledger-bound
extension are the same shape. Failure discipline unchanged:
best-effort inside the sequence deadline; a failed post never
changes the verdict or the JSONL record (the recoveryDelivered
re-post loop is untouched).

Recovery title: "Health hook: <display name> recovered" for a
recovery (up with recoveryOf set); down/transient/plain-up titles
unchanged. Dedupe is by key, not title, so the wording cannot
split an incident.

Tests (test_run.py, 25 passed — 22 pre-existing + 3 new; oracle:
the #12599 record shape): the JSONL record and the record handed
to post_to_throat are identical and carry the built-once
stackHealth member; the posted body carries the full record as
healthHook with a sentinel proving stackHealth reuse-not-rebuild;
a recovery's title reads "recovered" with recoveryOf lineage and
an "up" stackHealth member. End-to-end seam verified against the
merged #12602 intake: runner-generated down + recovery bodies
validate, store, and read back from the ledger with lineage and
evidence intact.

Closes #12603
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T18:12:11.769032Z 7d8b25c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39
dezren39 merged commit 390c374 into main Nov 22, 2026
1 check passed
@dezren39
dezren39 deleted the archer-lane-v/12603-runner-healthhook branch November 22, 2026 18:11
@coderabbitai

coderabbitai Bot commented Nov 22, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 27 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a71772fe-c217-4c66-bc1f-f600495f3275
Commits

Reviewing files that changed from the base of the PR and between df657d1 and 7d8b25c.

Files selected for processing: 2

  • pm-stack/health-hooks/run.py
  • pm-stack/health-hooks/test_run.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

C3 runner: post the full incident record (healthHook extension), one record shape, recovery title 'recovered' (#12599 decision b)

1 participant