Skip to content

Commit bc29bc8

Browse files
authored
Add PR 674 review reliability observability (#693)
1 parent 8bc5e3a commit bc29bc8

16 files changed

Lines changed: 2540 additions & 30 deletions
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Observe review reliability
2+
3+
on:
4+
workflow_run:
5+
workflows: [ClawSweeper]
6+
types: [completed]
7+
8+
permissions:
9+
actions: read
10+
contents: read
11+
12+
concurrency:
13+
group: review-reliability-observer-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}
14+
cancel-in-progress: false
15+
16+
jobs:
17+
observe:
18+
name: Observe terminal ClawSweeper review run
19+
runs-on: ubuntu-latest
20+
timeout-minutes: 5
21+
steps:
22+
- uses: actions/checkout@v7
23+
# workflow_run may expose secrets, so execute observer code only from the trusted default branch.
24+
with:
25+
ref: ${{ github.event.repository.default_branch }}
26+
persist-credentials: false
27+
28+
- name: Record terminal review wave
29+
env:
30+
CLAWSWEEPER_WEBHOOK_SECRET: ${{ secrets.CLAWSWEEPER_WEBHOOK_SECRET }}
31+
GH_TOKEN: ${{ github.token }}
32+
QUEUE_URL: ${{ vars.CLAWSWEEPER_EXACT_REVIEW_QUEUE_URL || 'https://clawsweeper.openclaw.ai' }}
33+
run: node scripts/review-run-observer.mjs --event-file "$GITHUB_EVENT_PATH"

‎dashboard/dashboard-health.ts‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,19 @@ export function summarizeDashboardHealth(snapshot: Record<string, unknown>): Das
4545
else if (reviewTelemetryStatus !== "healthy") {
4646
raise("amber", "review_telemetry_unavailable");
4747
}
48+
49+
if (queue.review_execution_health != null) {
50+
const reviewExecution = objectValue(queue.review_execution_health);
51+
const reviewExecutionStatus = String(reviewExecution.health || "");
52+
// Passive mode is a deliberate pre-producer rollout state and must not page operators
53+
// before PR 674 turns enforcement on.
54+
if (reviewExecutionStatus === "critical") raise("red", "review_execution_critical");
55+
else if (reviewExecutionStatus === "degraded") {
56+
raise("amber", "review_execution_degraded");
57+
} else if (!["healthy", "passive"].includes(reviewExecutionStatus)) {
58+
raise("amber", "review_execution_degraded");
59+
}
60+
}
4861
}
4962

5063
const operationalStatus = String(objectValue(snapshot.operational_health).status || "");

0 commit comments

Comments
 (0)