GeezerVison is showing github.com — pm-stack watchdog: publish two-cycle NEEDS ORCHESTRATOR to orchestrator feed (#14005 item 2) · Issue #14410 · developing-today/code
pm-stack watchdog: publish two-cycle NEEDS ORCHESTRATOR to orchestrator feed (#14005 item 2) #14410DescriptionFollow-up to #14005 (item 2 of 2)
Decision recorded by oc-code-03 (queue task 23278, tracking #14158): #13019 does not supersede the two-cycle contract.
- feat(pm-stack): wire the §4 escalation router into the watchdog tick (#9991) #13019 wires the §4 escalation router into the aggregator's watchdog tick (
pm-stack/aggregator/src/server.ts, escalation-tick.ts) with in-process sinks. If the aggregator is down, no escalation fires.
check-watchdog-heartbeat.ts is deliberately independent: it reads the journal file directly and prints NEEDS_ORCHESTRATOR / PAGE_DREW for the external runner. Its trigger is heartbeat absence, not SLO-facet escalation.
So the two-cycle NEEDS ORCHESTRATOR publication to the orchestrator feed is still owed.
Scope
- Define the orchestrator-feed publication contract for the checker's two-cycle NEEDS_ORCHESTRATOR output.
- Implement it on the independent path (
post-alert.ts or the checker's stdout runner), with a test.
- Record the contract in
doc/fleet-schedule-registry.md if it adds a scheduled surface.
Out of scope: item 1 (checker schedule), tracked in #14388.
Done check
- A test shows a two-cycle NEEDS_ORCHESTRATOR reaches the orchestrator feed with the aggregator down.
Filed from queue task 23278 (oc-code-03).
{
"direct_parent": null,
"links": [],
"lineage": {
"design": null,
"roadmap_item": null,
"priority": null
},
"pm_meta": 1,
"provenance": {
"queue_id": null,
"scheduled_start": null,
"picked_up_at": null,
"work_started_at": null,
"created_at": "2026-11-24T14:11:40Z",
"session_id": "ses_e5df21b813effeAIn8E93bQWHV",
"lane": null,
"host": "amd",
"worktree": "/home/user/git/code",
"model": null,
"lane_start_issues": [],
"workspace_ref": {
"kind": "worktree",
"id": "/home/user/git/code",
"repo": "developing-today/code",
"branch": "main",
"sha": "6fd30c93b62a4b6fba19e6444c7d69f343fb93a1"
},
"auth_subject": "oc-code-03",
"stamped_by": "fleet 0.1.0 (native)"
}
}
Acceptance criteria
- After two consecutive watchdog cycles meeting the NEEDS ORCHESTRATOR condition, exactly one escalation item is published to the orchestrator feed.
- A single-cycle condition publishes nothing; recovery clears the pending state without publishing.
- The published item names the watchdog, the condition, and the cycles observed.
Activitydeveloping-today commented on Nov 24, 2026 dezren39 commented on Nov 24, 2026 developing-today-fleet commented on Nov 24, 2026 Intake review
Related: Follow-up to #14005 (item 2 of 2); decision recorded by oc-code-03 (task 23278, tracking #14158); #13019 wires the §4 router but does not supersede the two-cycle contract.
Notes: Contract is explicit in the body: two-cycle persistence before publishing.
Risks: Double-publishing on every tick would spam the orchestrator feed — publish-once semantics matter.
Suggested approach: State the cycle count in the watchdog tick, publish on the transition into the second qualifying cycle only, test both the publish and no-publish paths.
🤖 Agent note · state: filed
- Agent: fleet monitor (repo-fleet-monitor)
- Session / ID: repo-fleet-monitor run 2026-11-24 08:14 CST
- Found via: monitor reconciliation
- Task: intake enrichment (protocol §5) — acceptance criteria, label normalisation, related links
- Expectation: s — done when the issue carries criteria, normalised labels and this review
- Links: n/a
dezren39 commented on Nov 24, 2026 Sweep triage (not closed)
Checked on origin/main (0795b64ec21):
pm-stack/aggregator/scripts/check-watchdog-heartbeat.ts already prints NEEDS_ORCHESTRATOR: ... on stdout at two cycles, and posts a warning incident through post-alert.ts keyed watchdog-heartbeat-<outageSince>-needs-orchestrator (publish-once per outage; a new outage gets a new key).
pm-stack/aggregator/test/watchdog-heartbeat-runner.test.ts covers the two-cycle path, the single-cycle no-publish path, and recovery keying (test at lines 69-165 and 111-164).
What is not shown by that evidence, so the done check is not met yet:
post-alert.ts posts to the aggregator intake (ALERTS_INTAKE_URL), which is down in exactly the case this must cover. The only channel that survives the aggregator being down is the external page-health-push report, which is not configured in this repo (see pm-stack watchdog: record checker schedule and surface its stdout in the main-chat report (#14005 item 1) #14388). So "reaches the orchestrator feed with the aggregator down" is not verified end-to-end.
- The test stubs
post-alert as a fake command; no test drives the real delivery with the intake unreachable.
Remaining work, decision recorded for the next pass: add a test that runs the checker with ALERTS_INTAKE_URL pointing at a closed port and asserts the NEEDS_ORCHESTRATOR stdout line is still emitted with exit 0 and the post-alert failure is surfaced, and confirm the external runner is wired under #14388. Leaving open; #14388 owns the external schedule. dezren39 commented on Nov 26, 2026 Shepherd note (xaltha, queue task 24053, 2026-11-26): PR #14554, which also carried Closes #14410, has been closed as superseded — this issue was already closed by merged PR #14576 (stdout NEEDS_ORCHESTRATOR before post-alert, per the sweep triage remainder). #14554 conflicted with current main and carried an unresolved CodeRabbit major (feed failure suppressing the alert path). Full salvage note on the PR: #14554 (comment) — the JSONL feed module on branch xaltha/14410-watchdog-orchestrator-feed can be revived under a fresh issue if a file-based feed is wanted again. No further action on this issue.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|