GeezerVison is showing github.com — feat(pm-stack): wire the §4 escalation router into the watchdog tick (#9991) by dezren39 · Pull Request #13019 · developing-today/code
Conversation
dezren39
commented
Nov 23, 2026
•
edited by blacksmith-sh
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
What
The last named remainder of #9991: the §4 escalation router is now called from the server's watchdog tick with the real sinks. Until this PR, routeEscalations/deliverEscalations had no production caller — the router was only ever fed hand-built incidents in its own tests (PR #12125), and PR #12961's adapter joined it to the live shapes.
pm-stack/aggregator/src/escalation-tick.ts (new) — the per-tick pipeline: SLO summaries + remediation state → buildEscalationInput → routeEscalations → deliverEscalations, plus the two sink-shape builders (escalationJournalLine, escalationDelivery) and repeat suppression: an unchanged decision (facet + route + reason + attempt cap) is delivered once per incident, re-delivered when the decision changes or after a recovery + recurrence, and retried next tick when a delivery reports an error. Without suppression a stateful outage would page Drew every 5 minutes until fixed; the keying mirrors the stack's stable-key discipline (watchdog tier items, activity dedupe ids).
src/server.ts — the real sinks and the tick call, inside the scheduled (live-mode) watchdog run, in its own try/catch so an escalation failure never fails the watchdog pass:
src/slo-journal.ts — SloJournalLine gains the optional escalation field the journal lines carry; no SLO definition id matches the escalation:<facet> key, so budget summaries never read an escalation line as a sample.
src/escalation-input.ts — header comment updated: the wiring it announced as the next slice has landed.
The remediation-state seam (named, not hidden)
buildEscalationInput reads the remediation executor's state, but no executor host exists yet — remediation.ts is a pure module and nothing in the repo calls decideRemediation/recordAttempt in production (#9989 delivered it as a pure module whose state a host persists; no host exists). The ticker therefore takes the state from an injected reader, and the server passes one returning the empty state: the stack's actual condition (nothing attempted, nothing in flight, no breaker open), so phases read "detected" until an executor lands and the reader is pointed at its persisted state. The SLO side is fully live either way — stateful, correlated-failure and budget-exhausted pages all fire from the summaries alone.
Verification (laptop worktree off origin/main)
bun test test/escalation-tick.test.ts test/escalation.test.ts test/escalation-input.test.ts — 47 pass / 0 fail (10 new tick tests: stateful page fan-out, orchestrator route, suppression, decision-change re-delivery, recovery/recurrence, failed-delivery retry, journal round-trip through the real SloJournal, feed-delivery shape, decision-key sensitivity).
- Neighbouring suites (remediation, slo, slo-journal, slo-sampler, watchdog, watchdog-runner, watchdog-heartbeat) — 65 pass / 0 fail.
bun build src/server.ts --target=bun — clean.
- Also green: alerts/notifications/events 119/119, activity ×3 + slo-health-render 55/55, lib-deps + pool-state 19/19 — 305 tests total across every suite touching the changed modules.
- One full-suite
bun test run was attempted and produced no verdict: the laptop channel dropped mid-run under the lane floor's load (transport error, not a test failure). Every suite that imports a changed module was run individually instead, as itemised above.
Remaining on #9991 after this
None of the named slices: the sampler (#9988), executor module (#9989), adapter and router (PRs #12125/#12961) and this wiring complete the issue's scope. The neighbouring open work: #9990 (§3 verification + journal/feed mirroring) presupposes the same executor host this seam waits on, and Drew's §6 question 1 (page channel) can swap the push sink without touching the router.
This PR deliberately does not close #9991 in its merge wording — the closer's call on whether the executor-host gap keeps it open.

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
chatgpt-codex-connector[bot] reacted with thumbs up emoji
…9991)
The router (PR #12125) and its input adapter (PR #12961) had no
production caller. New escalation-tick.ts runs the pipeline on the
server's scheduled watchdog tick — SLO summaries + remediation state
-> buildEscalationInput -> routeEscalations -> deliverEscalations —
with repeat suppression keyed on the decision itself, and server.ts
supplies the real sinks: the append-only watchdog journal (SLO
journal file, escalation:<facet> lines), the activity stream #1148
reports into, and the page-health-push path over the alerts store's
incident-class subscriptions.
The remediation state is read through a named seam returning the
empty state: #9989's executor is a pure module with no production
host, so no attempts exist to report — the stack's actual condition.
Stateful, correlated and budget-exhausted pages fire from the live
summaries regardless.
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-23T07:13:26.911116Z |
3afabc6 |
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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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 42 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:
9f99c501-fdc0-4509-8dfd-58f5ad2b921c
Commits
-
Reviewing files that changed from the base of the PR and between 6f1ca33 and 3afabc6.
Files selected for processing: 5
-
pm-stack/aggregator/src/escalation-input.ts
pm-stack/aggregator/src/escalation-tick.ts
pm-stack/aggregator/src/server.ts
pm-stack/aggregator/src/slo-journal.ts
pm-stack/aggregator/test/escalation-tick.test.ts
- 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
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 23, 2026
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|