feat: Actions Fleet Monitor — pure telemetry, shim interface, docs, lint#197
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThis PR removes the legacy daily PR review health check (workflow and script) and replaces it with a new fleet monitoring system. The fleet monitor discovers org repositories and workflows, computes failure rates and percentile durations from recent runs, and generates a markdown report. A new shellcheck linting workflow validates shell scripts on pull requests. ChangesFleet Monitoring System
Shell Script Linting
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Pull request overview
Refactors the existing daily PR-review health check into a pure gh/jq telemetry script (removing the Claude/Node analysis path) and renames the workflow from daily-pr-review-health to actions-fleet-monitor. The new script computes failure rate and duration percentiles and emits a structured markdown report to GITHUB_STEP_SUMMARY and a file consumed by the existing issue-creation step.
Changes:
- Replaces Claude-based log analysis with a deterministic
gh/jqaggregation (totals, failure rate, duration percentiles, per-run table). - Drops Node setup, Claude CLI install, and the 60 KB report-truncation step from the workflow.
- Renames workflow file/
name:/concurrency group toactions-fleet-monitorand tightenstimeout-minutesfrom 20 → 5.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
scripts/pr_review_health.sh |
Rewrites the script as pure telemetry: computes counts, failure rate, min/p50/p95/max durations, and renders a markdown report. |
.github/workflows/actions-fleet-monitor.yml |
Renames workflow, removes Node/Claude install and post-truncation steps, lowers timeout to 5 minutes. |
Comments suppressed due to low confidence (9)
.github/workflows/actions-fleet-monitor.yml:13
- The PR description claims this change "Adds
on: workflow_callso any repo can invoke this as a shared reusable workflow", but the workflow only definesscheduleandworkflow_dispatchtriggers — there is noworkflow_call:section. As written, this workflow cannot be invoked as a reusable workflow from other repos. Either add theworkflow_call:trigger (with appropriate inputs/secrets) or update the PR description.
.github/workflows/actions-fleet-monitor.yml:1 - The PR description also lists "Adds example caller stub for org-wide rollout", "Adds
shellchecklint workflow", and "Addsdocs/actions-fleet-monitor.md", but none of those files appear in this diff (verified: nodocs/actions-fleet-monitor.md, no shellcheck workflow under.github/workflows/, no caller stub). Either include those files or trim the PR description so it accurately reflects what is being merged.
This issue also appears on line 3 of the same file.
scripts/pr_review_health.sh:157
duration_sis computed asupdated_at - created_atfor every run, including runs whoseconclusionis stillnull(queued/in_progress). Those rows are then included in the "Runs" table (line 155–157 does not filter by conclusion) with a duration that is really "time since the run started", not actual run time. The aggregate percentiles correctly filterconclusion != null, but the per-run table will surface misleading numbers (e.g. an in-progress run that started 23h ago will show as a ~23h run). Consider filtering in-progress runs out of the table or rendering their duration as—/in progress.
fi
printf '\n## Runs\n\n'
printf '| Run | Status | Date | Duration | Link |\n|---|---|---|---|---|\n'
while IFS=$'\t' read -r run_num conclusion created_at dur_s url; do
icon=$(conclusion_icon "$conclusion")
date_short="${created_at%%T*}"
printf '| #%s | %s %s | %s | %s | [view](%s) |\n' \
"$run_num" "$icon" "$conclusion" "$date_short" "$(fmt_dur "$dur_s")" "$url"
done < <(echo "$runs_json" | jq -r '
scripts/pr_review_health.sh:124
- The "WARNING" bucket is only reachable when
failed_runs > 0andfailure_rate ≤ 20%. As soon as there is at least one failure, the overall status jumps fromHEALTHYtoWARNINGeven iffailure_raterounds to0.0%(e.g. 1 failure in 1000 runs). The naming/severity threshold is a judgment call, but the gap betweenHEALTHY(0 failures) andWARNING(any single failure) is worth documenting explicitly in the report or near these thresholds — otherwise readers can't tell whatWARNINGmeans.
}
if [ "$failed_runs" -eq 0 ]; then
overall="HEALTHY"
elif [ "$(echo "$failure_rate > 50" | bc)" -eq 1 ]; then
overall="CRITICAL"
elif [ "$(echo "$failure_rate > 20" | bc)" -eq 1 ]; then
overall="DEGRADED"
else
scripts/pr_review_health.sh:154
fmt_duris called with unquoted argument (e.g.$(fmt_dur $dur_min)). Althoughdur_min/dur_p50/dur_p95/dur_max/dur_sare produced byjqand should be plain integers, if jq ever emits an unexpected value (empty string, float, decimal) the[ "$s" -ge 60 ]test or$((s / 60))arithmetic will exit the script underset -euo pipefail. Quoting the argument ("$dur_min") and/or adding a numeric-guard fallback would make the report resilient to upstream API quirks. Same concern for the value passed in thewhile readloop at line 154.
printf '| Failure rate | %s%% |\n' "$failure_rate"
if [ "$total_runs" -gt 0 ]; then
printf '| Duration min | %s |\n' "$(fmt_dur "$dur_min")"
printf '| Duration p50 | %s |\n' "$(fmt_dur "$dur_p50")"
printf '| Duration p95 | %s |\n' "$(fmt_dur "$dur_p95")"
printf '| Duration max | %s |\n' "$(fmt_dur "$dur_max")"
fi
printf '\n## Runs\n\n'
printf '| Run | Status | Date | Duration | Link |\n|---|---|---|---|---|\n'
while IFS=$'\t' read -r run_num conclusion created_at dur_s url; do
icon=$(conclusion_icon "$conclusion")
date_short="${created_at%%T*}"
scripts/pr_review_health.sh:92
- The percentile expression uses integer-index
$d[$n * 50 / 100 | floor]. For$n = 1both p50 and p95 resolve to index 0, which is also the min/max — so all four columns show the same number. That's mathematically defensible but visually confusing in the Step Summary. Consider hiding the percentile rows (or just min/max) whenlength < 2(or some other small-N threshold) to avoid implying meaningful percentile data when there isn't any.
# Duration percentiles across all completed runs
read -r dur_min dur_p50 dur_p95 dur_max < <(echo "$runs_json" | jq -r '
[.[] | select(.conclusion != null and .duration_s > 0) | .duration_s] | sort |
if length == 0 then "0 0 0 0"
else . as $d | ($d | length) as $n |
scripts/pr_review_health.sh:158
- When
total_runs == 0the report still emits the Summary table without duration rows but withFailure rate | 0.0%. The "Runs" section header is also printed with an empty table body, which renders as an invalid/empty markdown table on GitHub. Consider rendering an explicit "No runs in lookback window" message in both Summary and Runs sections whentotal_runs == 0, and skipping the issue-creation path entirely.
# 4. Build report
# ---------------------------------------------------------------------------
{
printf '# Actions Fleet Monitor — %s\n\n' "$TODAY"
printf '**Workflow:** `%s` in `%s` | **Status:** `%s` | **Lookback:** %s day(s)\n\n' \
"$WORKFLOW_FILE" "$WORKFLOW_REPO" "$overall" "$LOOKBACK_DAYS"
printf '## Summary\n\n'
printf '| Metric | Value |\n|---|---|\n'
printf '| Total runs | %s |\n' "$total_runs"
printf '| Successful | %s |\n' "$success_runs"
printf '| Failed | %s |\n' "$failed_runs"
printf '| Cancelled | %s |\n' "$cancelled_runs"
printf '| Failure rate | %s%% |\n' "$failure_rate"
if [ "$total_runs" -gt 0 ]; then
printf '| Duration min | %s |\n' "$(fmt_dur "$dur_min")"
printf '| Duration p50 | %s |\n' "$(fmt_dur "$dur_p50")"
printf '| Duration p95 | %s |\n' "$(fmt_dur "$dur_p95")"
printf '| Duration max | %s |\n' "$(fmt_dur "$dur_max")"
fi
printf '\n## Runs\n\n'
printf '| Run | Status | Date | Duration | Link |\n|---|---|---|---|---|\n'
while IFS=$'\t' read -r run_num conclusion created_at dur_s url; do
icon=$(conclusion_icon "$conclusion")
date_short="${created_at%%T*}"
printf '| #%s | %s %s | %s | %s | [view](%s) |\n' \
"$run_num" "$icon" "$conclusion" "$date_short" "$(fmt_dur "$dur_s")" "$url"
done < <(echo "$runs_json" | jq -r '
sort_by(.run_number) | reverse[] |
.github/workflows/actions-fleet-monitor.yml:26
timeout-minuteswas tightened from 20 to 5. The remaining work is a singlegh apicall plus jq processing, which is normally well under a minute — butgh apican occasionally retry on transient 5xx/abuse-rate-limit responses, and the previousbashstep also occasionally pulled per-run data. 5 minutes leaves very little headroom for tail latency or for someone bumpingLOOKBACK_DAYSto a large value (which can produce a larger paginated response in the future). 10 minutes would be a safer floor.
scripts/pr_review_health.sh:53- The
gh apiURL embeds the unsanitised${CUTOFF}viacreated=>=${CUTOFF}.CUTOFFis produced bydate -uso it should always be a valid ISO-8601 string, but the>=characters are not URL-encoded.gh apitypically forwards the path as-is; the GitHub Actions Search API accepts the literal>=, so this works today. Worth a brief inline comment so a future maintainer doesn't try to "fix" it by URL-encoding (which would break the operator).
echo "Fetching runs since: $CUTOFF"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Code Review
This pull request refactors the pr_review_health.sh script, shifting its focus from log analysis via Claude to telemetry-based health monitoring. Key changes include the removal of log-downloading logic, the addition of aggregate statistics calculation (such as failure rates and duration percentiles), and the generation of a structured markdown report for the GitHub Actions step summary. Feedback suggests improving the script's reusability by defaulting to the current repository environment variable and recommends using API pagination to ensure all workflow runs are captured for accurate metrics.
|
❌ The last analysis has failed. |
|
No description provided. |
|
|
@donpetry-bot - please review |
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: MEDIUM
Reviewed commit: e9538100cbaf1c809407bd25f239c2a2a9d18b79
Review mode: triage-approved (single reviewer)
Summary
This PR refactors the daily PR-review health check into a generalized, org-wide Actions Fleet Monitor delivered as a reusable workflow. The Claude/Node analysis path is replaced with pure gh/jq telemetry — discovering all non-archived repos in the org, collecting per-workflow run metrics, and producing a tiered scorecard (HEALTHY / WARNING / DEGRADED / CRITICAL), Mermaid pie + bar charts, per-repo rollup, systemic-failure detection, and an ASCII bar visualization. New scripts/fleet_report.sh is unit-tested with 40 bats cases; shellcheck runs in CI on the new scripts.
Triage flagged this as low-risk auto-approve. Confirmation review agrees: the change is additive (new scripts replacing an obsolete one), covered by tests and a lint job, and properly reviewed by automated reviewers.
Linked issue analysis
No closingIssuesReferences are set, but the PR body cites Discussion #193 as the design RFC and the commit history reflects an iterative implementation against that discussion. No action item appears unaddressed.
Findings
No blocking issues.
Notes (non-blocking):
- The reusable-workflow checkout step in
.github/workflows/actions-fleet-monitor.ymlpinsref: mainforpetry-projects/.github-private(intentional per inline comment, soworkflow_callcallers always run the agent'smain-branch code). An earlier commit (9ed164d) attempted to pin togithub.workflow_sha; the final form usesmain, which is consistent with the documented usage pattern (@main) indocs/actions-fleet-monitor.md. This is a reasonable trade-off — worth being aware of if you later want immutable-per-call versioning. - The script uses
DON_PETRY_BOT_GH_PATfor cross-orgactions:read. This is documented in the script header and indocs/actions-fleet-monitor.md, with rationale (defaultGITHUB_TOKENlacks org-wideactions:read). AGH_PAT_FALLBACKis also wired up for graceful degradation. - Shellcheck is scoped to
fleet_monitor.shandfleet_report.shand runs with--severity=warning(info-level SC2016 from literal markdown backticks suppressed); justification is in the workflow comment. - Issue creation on failure uses
github.token+context.repo, which means caller-invoked runs create issues in the caller's repo — explicitly documented in the "Issue destination" section of the docs.
CI status
All required checks green:
agent-shield / AgentShield✅Analyze (actions)(CodeQL) ✅dependency-audit / Detect ecosystems✅ (per-ecosystem children skipped — none present)dispatch(Dev-Lead Agent) ✅shellcheck(Lint) ✅bats(Lint) ✅unit-tests✅SonarCloud✅,SonarCloud Code Analysis✅CodeRabbit✅
Mergeable: MERGEABLE / CLEAN. Review decision: APPROVED.
Reviewed automatically by the PR-review agent (single-reviewer mode: opus 4.7). Reply if you need a human review.
Integrate the squash-merged Actions Fleet Monitor changes (PR #197) with the PR #102 review findings fixes. Kept main's actions-fleet-monitor.yml (which has fleet_monitor.sh, org-wide scope, and workflow_call interface) over the PR branch's intermediate rename-only state. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…int (#197) * refactor: replace Claude analysis with pure gh/jq telemetry in health check * refactor: drop Node/Claude steps from daily-pr-review-health workflow * rename: daily-pr-review-health → actions-fleet-monitor * rename: daily-pr-review-health → actions-fleet-monitor * feat: add workflow_call interface with workflow_repo/workflow_file inputs * refactor: use WORKFLOW_REPO/WORKFLOW_FILE env vars; generalize header * ci: add shellcheck lint workflow for scripts and workflows * docs: add example caller stub for fleet monitor reusable workflow * docs: Actions Fleet Monitor — inputs, thresholds, extension guide * feat: discover all workflows in repo; drop workflow_file input * ci: update shellcheck to cover fleet_monitor.sh * docs: remove workflow_file from caller stub; monitor all workflows * docs: update inputs table and description for all-workflow scope * feat: fleet_monitor.sh — discover and report all workflows in repo * refactor: remove pr_review_health.sh, replaced by fleet_monitor.sh * feat: expand fleet monitor to all org repos; fix shellcheck; sort by severity * feat: replace workflow_repo input with org; bump timeout to 30m * docs: update for org-wide scope; remove caller stub section * docs: remove per-repo caller stub; monitor is now org-wide * fix: truncate issue body at 65k; link to run summary for full report * fix: use echo-to-bc for failure rate calc; printf without newline produced no output * fix: remove bc; paginate API calls; surface errors; document GH_PAT_FALLBACK * fix: add permissions block; scope shellcheck to fleet_monitor.sh * fix: pin checkout to .github-private for workflow_call callers * docs: add bash language tag to fenced CLI code block (MD040) * feat(tdd): add fleet_report.sh — scorecard, rollup, systemic, bar, Mermaid * refactor: source fleet_report.sh; add rate_int field; use generate_report * test: 40 bats tests for fleet_report.sh visualization functions * test: fixture data covering all status tiers and edge cases * ci: add bats job; extend shellcheck to fleet_report.sh * ci: trigger lint check suite on branch * ci: trigger lint+bats check suite * ci: add workflow_dispatch to lint for manual triggering * fix: suppress SC2016 info-level in shellcheck (markdown backticks in printf) * docs: fix broken fences; add workflow_call issue-context note and 1k-cap warning * fix: clarify GH_TOKEN intent; document 1,000-run API cap near paginated query * fix: pin checkout ref to github.workflow_sha for correct versioning in workflow_call * fix: move 1k-cap comment above gh api call (SC2215 mid-continuation comment) * fix: filter completed runs; count timed_out; exact label thresholds; ERROR sentinel rows * fix: printf -- to prevent dash-as-flag for systemic bullet lines (SC2215 / printf -) * chore: remove claude.yml from branch (already deleted in main via PR#196)
…int (#197) * refactor: replace Claude analysis with pure gh/jq telemetry in health check * refactor: drop Node/Claude steps from daily-pr-review-health workflow * rename: daily-pr-review-health → actions-fleet-monitor * rename: daily-pr-review-health → actions-fleet-monitor * feat: add workflow_call interface with workflow_repo/workflow_file inputs * refactor: use WORKFLOW_REPO/WORKFLOW_FILE env vars; generalize header * ci: add shellcheck lint workflow for scripts and workflows * docs: add example caller stub for fleet monitor reusable workflow * docs: Actions Fleet Monitor — inputs, thresholds, extension guide * feat: discover all workflows in repo; drop workflow_file input * ci: update shellcheck to cover fleet_monitor.sh * docs: remove workflow_file from caller stub; monitor all workflows * docs: update inputs table and description for all-workflow scope * feat: fleet_monitor.sh — discover and report all workflows in repo * refactor: remove pr_review_health.sh, replaced by fleet_monitor.sh * feat: expand fleet monitor to all org repos; fix shellcheck; sort by severity * feat: replace workflow_repo input with org; bump timeout to 30m * docs: update for org-wide scope; remove caller stub section * docs: remove per-repo caller stub; monitor is now org-wide * fix: truncate issue body at 65k; link to run summary for full report * fix: use echo-to-bc for failure rate calc; printf without newline produced no output * fix: remove bc; paginate API calls; surface errors; document GH_PAT_FALLBACK * fix: add permissions block; scope shellcheck to fleet_monitor.sh * fix: pin checkout to .github-private for workflow_call callers * docs: add bash language tag to fenced CLI code block (MD040) * feat(tdd): add fleet_report.sh — scorecard, rollup, systemic, bar, Mermaid * refactor: source fleet_report.sh; add rate_int field; use generate_report * test: 40 bats tests for fleet_report.sh visualization functions * test: fixture data covering all status tiers and edge cases * ci: add bats job; extend shellcheck to fleet_report.sh * ci: trigger lint check suite on branch * ci: trigger lint+bats check suite * ci: add workflow_dispatch to lint for manual triggering * fix: suppress SC2016 info-level in shellcheck (markdown backticks in printf) * docs: fix broken fences; add workflow_call issue-context note and 1k-cap warning * fix: clarify GH_TOKEN intent; document 1,000-run API cap near paginated query * fix: pin checkout ref to github.workflow_sha for correct versioning in workflow_call * fix: move 1k-cap comment above gh api call (SC2215 mid-continuation comment) * fix: filter completed runs; count timed_out; exact label thresholds; ERROR sentinel rows * fix: printf -- to prevent dash-as-flag for systemic bullet lines (SC2215 / printf -) * chore: remove claude.yml from branch (already deleted in main via PR#196)
…int (#197) * refactor: replace Claude analysis with pure gh/jq telemetry in health check * refactor: drop Node/Claude steps from daily-pr-review-health workflow * rename: daily-pr-review-health → actions-fleet-monitor * rename: daily-pr-review-health → actions-fleet-monitor * feat: add workflow_call interface with workflow_repo/workflow_file inputs * refactor: use WORKFLOW_REPO/WORKFLOW_FILE env vars; generalize header * ci: add shellcheck lint workflow for scripts and workflows * docs: add example caller stub for fleet monitor reusable workflow * docs: Actions Fleet Monitor — inputs, thresholds, extension guide * feat: discover all workflows in repo; drop workflow_file input * ci: update shellcheck to cover fleet_monitor.sh * docs: remove workflow_file from caller stub; monitor all workflows * docs: update inputs table and description for all-workflow scope * feat: fleet_monitor.sh — discover and report all workflows in repo * refactor: remove pr_review_health.sh, replaced by fleet_monitor.sh * feat: expand fleet monitor to all org repos; fix shellcheck; sort by severity * feat: replace workflow_repo input with org; bump timeout to 30m * docs: update for org-wide scope; remove caller stub section * docs: remove per-repo caller stub; monitor is now org-wide * fix: truncate issue body at 65k; link to run summary for full report * fix: use echo-to-bc for failure rate calc; printf without newline produced no output * fix: remove bc; paginate API calls; surface errors; document GH_PAT_FALLBACK * fix: add permissions block; scope shellcheck to fleet_monitor.sh * fix: pin checkout to .github-private for workflow_call callers * docs: add bash language tag to fenced CLI code block (MD040) * feat(tdd): add fleet_report.sh — scorecard, rollup, systemic, bar, Mermaid * refactor: source fleet_report.sh; add rate_int field; use generate_report * test: 40 bats tests for fleet_report.sh visualization functions * test: fixture data covering all status tiers and edge cases * ci: add bats job; extend shellcheck to fleet_report.sh * ci: trigger lint check suite on branch * ci: trigger lint+bats check suite * ci: add workflow_dispatch to lint for manual triggering * fix: suppress SC2016 info-level in shellcheck (markdown backticks in printf) * docs: fix broken fences; add workflow_call issue-context note and 1k-cap warning * fix: clarify GH_TOKEN intent; document 1,000-run API cap near paginated query * fix: pin checkout ref to github.workflow_sha for correct versioning in workflow_call * fix: move 1k-cap comment above gh api call (SC2215 mid-continuation comment) * fix: filter completed runs; count timed_out; exact label thresholds; ERROR sentinel rows * fix: printf -- to prevent dash-as-flag for systemic bullet lines (SC2215 / printf -) * chore: remove claude.yml from branch (already deleted in main via PR#196)
…int (#197) * refactor: replace Claude analysis with pure gh/jq telemetry in health check * refactor: drop Node/Claude steps from daily-pr-review-health workflow * rename: daily-pr-review-health → actions-fleet-monitor * rename: daily-pr-review-health → actions-fleet-monitor * feat: add workflow_call interface with workflow_repo/workflow_file inputs * refactor: use WORKFLOW_REPO/WORKFLOW_FILE env vars; generalize header * ci: add shellcheck lint workflow for scripts and workflows * docs: add example caller stub for fleet monitor reusable workflow * docs: Actions Fleet Monitor — inputs, thresholds, extension guide * feat: discover all workflows in repo; drop workflow_file input * ci: update shellcheck to cover fleet_monitor.sh * docs: remove workflow_file from caller stub; monitor all workflows * docs: update inputs table and description for all-workflow scope * feat: fleet_monitor.sh — discover and report all workflows in repo * refactor: remove pr_review_health.sh, replaced by fleet_monitor.sh * feat: expand fleet monitor to all org repos; fix shellcheck; sort by severity * feat: replace workflow_repo input with org; bump timeout to 30m * docs: update for org-wide scope; remove caller stub section * docs: remove per-repo caller stub; monitor is now org-wide * fix: truncate issue body at 65k; link to run summary for full report * fix: use echo-to-bc for failure rate calc; printf without newline produced no output * fix: remove bc; paginate API calls; surface errors; document GH_PAT_FALLBACK * fix: add permissions block; scope shellcheck to fleet_monitor.sh * fix: pin checkout to .github-private for workflow_call callers * docs: add bash language tag to fenced CLI code block (MD040) * feat(tdd): add fleet_report.sh — scorecard, rollup, systemic, bar, Mermaid * refactor: source fleet_report.sh; add rate_int field; use generate_report * test: 40 bats tests for fleet_report.sh visualization functions * test: fixture data covering all status tiers and edge cases * ci: add bats job; extend shellcheck to fleet_report.sh * ci: trigger lint check suite on branch * ci: trigger lint+bats check suite * ci: add workflow_dispatch to lint for manual triggering * fix: suppress SC2016 info-level in shellcheck (markdown backticks in printf) * docs: fix broken fences; add workflow_call issue-context note and 1k-cap warning * fix: clarify GH_TOKEN intent; document 1,000-run API cap near paginated query * fix: pin checkout ref to github.workflow_sha for correct versioning in workflow_call * fix: move 1k-cap comment above gh api call (SC2215 mid-continuation comment) * fix: filter completed runs; count timed_out; exact label thresholds; ERROR sentinel rows * fix: printf -- to prevent dash-as-flag for systemic bullet lines (SC2215 / printf -) * chore: remove claude.yml from branch (already deleted in main via PR#196)
…int (#197) * refactor: replace Claude analysis with pure gh/jq telemetry in health check * refactor: drop Node/Claude steps from daily-pr-review-health workflow * rename: daily-pr-review-health → actions-fleet-monitor * rename: daily-pr-review-health → actions-fleet-monitor * feat: add workflow_call interface with workflow_repo/workflow_file inputs * refactor: use WORKFLOW_REPO/WORKFLOW_FILE env vars; generalize header * ci: add shellcheck lint workflow for scripts and workflows * docs: add example caller stub for fleet monitor reusable workflow * docs: Actions Fleet Monitor — inputs, thresholds, extension guide * feat: discover all workflows in repo; drop workflow_file input * ci: update shellcheck to cover fleet_monitor.sh * docs: remove workflow_file from caller stub; monitor all workflows * docs: update inputs table and description for all-workflow scope * feat: fleet_monitor.sh — discover and report all workflows in repo * refactor: remove pr_review_health.sh, replaced by fleet_monitor.sh * feat: expand fleet monitor to all org repos; fix shellcheck; sort by severity * feat: replace workflow_repo input with org; bump timeout to 30m * docs: update for org-wide scope; remove caller stub section * docs: remove per-repo caller stub; monitor is now org-wide * fix: truncate issue body at 65k; link to run summary for full report * fix: use echo-to-bc for failure rate calc; printf without newline produced no output * fix: remove bc; paginate API calls; surface errors; document GH_PAT_FALLBACK * fix: add permissions block; scope shellcheck to fleet_monitor.sh * fix: pin checkout to .github-private for workflow_call callers * docs: add bash language tag to fenced CLI code block (MD040) * feat(tdd): add fleet_report.sh — scorecard, rollup, systemic, bar, Mermaid * refactor: source fleet_report.sh; add rate_int field; use generate_report * test: 40 bats tests for fleet_report.sh visualization functions * test: fixture data covering all status tiers and edge cases * ci: add bats job; extend shellcheck to fleet_report.sh * ci: trigger lint check suite on branch * ci: trigger lint+bats check suite * ci: add workflow_dispatch to lint for manual triggering * fix: suppress SC2016 info-level in shellcheck (markdown backticks in printf) * docs: fix broken fences; add workflow_call issue-context note and 1k-cap warning * fix: clarify GH_TOKEN intent; document 1,000-run API cap near paginated query * fix: pin checkout ref to github.workflow_sha for correct versioning in workflow_call * fix: move 1k-cap comment above gh api call (SC2215 mid-continuation comment) * fix: filter completed runs; count timed_out; exact label thresholds; ERROR sentinel rows * fix: printf -- to prevent dash-as-flag for systemic bullet lines (SC2215 / printf -) * chore: remove claude.yml from branch (already deleted in main via PR#196)
…int (#197) * refactor: replace Claude analysis with pure gh/jq telemetry in health check * refactor: drop Node/Claude steps from daily-pr-review-health workflow * rename: daily-pr-review-health → actions-fleet-monitor * rename: daily-pr-review-health → actions-fleet-monitor * feat: add workflow_call interface with workflow_repo/workflow_file inputs * refactor: use WORKFLOW_REPO/WORKFLOW_FILE env vars; generalize header * ci: add shellcheck lint workflow for scripts and workflows * docs: add example caller stub for fleet monitor reusable workflow * docs: Actions Fleet Monitor — inputs, thresholds, extension guide * feat: discover all workflows in repo; drop workflow_file input * ci: update shellcheck to cover fleet_monitor.sh * docs: remove workflow_file from caller stub; monitor all workflows * docs: update inputs table and description for all-workflow scope * feat: fleet_monitor.sh — discover and report all workflows in repo * refactor: remove pr_review_health.sh, replaced by fleet_monitor.sh * feat: expand fleet monitor to all org repos; fix shellcheck; sort by severity * feat: replace workflow_repo input with org; bump timeout to 30m * docs: update for org-wide scope; remove caller stub section * docs: remove per-repo caller stub; monitor is now org-wide * fix: truncate issue body at 65k; link to run summary for full report * fix: use echo-to-bc for failure rate calc; printf without newline produced no output * fix: remove bc; paginate API calls; surface errors; document GH_PAT_FALLBACK * fix: add permissions block; scope shellcheck to fleet_monitor.sh * fix: pin checkout to .github-private for workflow_call callers * docs: add bash language tag to fenced CLI code block (MD040) * feat(tdd): add fleet_report.sh — scorecard, rollup, systemic, bar, Mermaid * refactor: source fleet_report.sh; add rate_int field; use generate_report * test: 40 bats tests for fleet_report.sh visualization functions * test: fixture data covering all status tiers and edge cases * ci: add bats job; extend shellcheck to fleet_report.sh * ci: trigger lint check suite on branch * ci: trigger lint+bats check suite * ci: add workflow_dispatch to lint for manual triggering * fix: suppress SC2016 info-level in shellcheck (markdown backticks in printf) * docs: fix broken fences; add workflow_call issue-context note and 1k-cap warning * fix: clarify GH_TOKEN intent; document 1,000-run API cap near paginated query * fix: pin checkout ref to github.workflow_sha for correct versioning in workflow_call * fix: move 1k-cap comment above gh api call (SC2215 mid-continuation comment) * fix: filter completed runs; count timed_out; exact label thresholds; ERROR sentinel rows * fix: printf -- to prevent dash-as-flag for systemic bullet lines (SC2215 / printf -) * chore: remove claude.yml from branch (already deleted in main via PR#196)
…int (#197) * refactor: replace Claude analysis with pure gh/jq telemetry in health check * refactor: drop Node/Claude steps from daily-pr-review-health workflow * rename: daily-pr-review-health → actions-fleet-monitor * rename: daily-pr-review-health → actions-fleet-monitor * feat: add workflow_call interface with workflow_repo/workflow_file inputs * refactor: use WORKFLOW_REPO/WORKFLOW_FILE env vars; generalize header * ci: add shellcheck lint workflow for scripts and workflows * docs: add example caller stub for fleet monitor reusable workflow * docs: Actions Fleet Monitor — inputs, thresholds, extension guide * feat: discover all workflows in repo; drop workflow_file input * ci: update shellcheck to cover fleet_monitor.sh * docs: remove workflow_file from caller stub; monitor all workflows * docs: update inputs table and description for all-workflow scope * feat: fleet_monitor.sh — discover and report all workflows in repo * refactor: remove pr_review_health.sh, replaced by fleet_monitor.sh * feat: expand fleet monitor to all org repos; fix shellcheck; sort by severity * feat: replace workflow_repo input with org; bump timeout to 30m * docs: update for org-wide scope; remove caller stub section * docs: remove per-repo caller stub; monitor is now org-wide * fix: truncate issue body at 65k; link to run summary for full report * fix: use echo-to-bc for failure rate calc; printf without newline produced no output * fix: remove bc; paginate API calls; surface errors; document GH_PAT_FALLBACK * fix: add permissions block; scope shellcheck to fleet_monitor.sh * fix: pin checkout to .github-private for workflow_call callers * docs: add bash language tag to fenced CLI code block (MD040) * feat(tdd): add fleet_report.sh — scorecard, rollup, systemic, bar, Mermaid * refactor: source fleet_report.sh; add rate_int field; use generate_report * test: 40 bats tests for fleet_report.sh visualization functions * test: fixture data covering all status tiers and edge cases * ci: add bats job; extend shellcheck to fleet_report.sh * ci: trigger lint check suite on branch * ci: trigger lint+bats check suite * ci: add workflow_dispatch to lint for manual triggering * fix: suppress SC2016 info-level in shellcheck (markdown backticks in printf) * docs: fix broken fences; add workflow_call issue-context note and 1k-cap warning * fix: clarify GH_TOKEN intent; document 1,000-run API cap near paginated query * fix: pin checkout ref to github.workflow_sha for correct versioning in workflow_call * fix: move 1k-cap comment above gh api call (SC2215 mid-continuation comment) * fix: filter completed runs; count timed_out; exact label thresholds; ERROR sentinel rows * fix: printf -- to prevent dash-as-flag for systemic bullet lines (SC2215 / printf -) * chore: remove claude.yml from branch (already deleted in main via PR#196)
…int (#197) * refactor: replace Claude analysis with pure gh/jq telemetry in health check * refactor: drop Node/Claude steps from daily-pr-review-health workflow * rename: daily-pr-review-health → actions-fleet-monitor * rename: daily-pr-review-health → actions-fleet-monitor * feat: add workflow_call interface with workflow_repo/workflow_file inputs * refactor: use WORKFLOW_REPO/WORKFLOW_FILE env vars; generalize header * ci: add shellcheck lint workflow for scripts and workflows * docs: add example caller stub for fleet monitor reusable workflow * docs: Actions Fleet Monitor — inputs, thresholds, extension guide * feat: discover all workflows in repo; drop workflow_file input * ci: update shellcheck to cover fleet_monitor.sh * docs: remove workflow_file from caller stub; monitor all workflows * docs: update inputs table and description for all-workflow scope * feat: fleet_monitor.sh — discover and report all workflows in repo * refactor: remove pr_review_health.sh, replaced by fleet_monitor.sh * feat: expand fleet monitor to all org repos; fix shellcheck; sort by severity * feat: replace workflow_repo input with org; bump timeout to 30m * docs: update for org-wide scope; remove caller stub section * docs: remove per-repo caller stub; monitor is now org-wide * fix: truncate issue body at 65k; link to run summary for full report * fix: use echo-to-bc for failure rate calc; printf without newline produced no output * fix: remove bc; paginate API calls; surface errors; document GH_PAT_FALLBACK * fix: add permissions block; scope shellcheck to fleet_monitor.sh * fix: pin checkout to .github-private for workflow_call callers * docs: add bash language tag to fenced CLI code block (MD040) * feat(tdd): add fleet_report.sh — scorecard, rollup, systemic, bar, Mermaid * refactor: source fleet_report.sh; add rate_int field; use generate_report * test: 40 bats tests for fleet_report.sh visualization functions * test: fixture data covering all status tiers and edge cases * ci: add bats job; extend shellcheck to fleet_report.sh * ci: trigger lint check suite on branch * ci: trigger lint+bats check suite * ci: add workflow_dispatch to lint for manual triggering * fix: suppress SC2016 info-level in shellcheck (markdown backticks in printf) * docs: fix broken fences; add workflow_call issue-context note and 1k-cap warning * fix: clarify GH_TOKEN intent; document 1,000-run API cap near paginated query * fix: pin checkout ref to github.workflow_sha for correct versioning in workflow_call * fix: move 1k-cap comment above gh api call (SC2215 mid-continuation comment) * fix: filter completed runs; count timed_out; exact label thresholds; ERROR sentinel rows * fix: printf -- to prevent dash-as-flag for systemic bullet lines (SC2215 / printf -) * chore: remove claude.yml from branch (already deleted in main via PR#196)
…cks #845) Replace the synthetic seed corpus with 20 real merged PRs from this repo, pinned by their true headRefOid, so the LSP go/no-go rests on real generalization. Stratified by navigation intensity — the metric the pilot actually measures — rather than the original defect-archetype slots: - 12 high-nav cross-file: a shared scripts/lib/*.sh helper changed → review must follow it to callers in other files ("breaks N callers") - 3 medium-nav: self-contained helper logic, bounded caller set - 1 diagnostics: PR #196's 5x SC2086 in pr_review_health.sh (info-level, so it slipped the --severity=warning gate) — a genuine publishDiagnostics hit - 4 no-navigation controls: docs-only PRs (token wins can't be a skip artefact) Why not the original archetypes: an exhaustive sweep of real history (300 merged + all closed-unmerged shell PRs) found no organic unused-symbol removal and no clean cross-file rename in-window, and the blocking shellcheck --severity=warning CI gate (since ~2026-05-16, #197) keeps every PR head free of syntax/SC2154/SC2046 defects. Defect-verification is therefore intentionally minimal; the token-reduction signal comes from the cross-file navigation strata. Retire the synthetic LSP-off baseline + candidate runs to empty (they were keyed to the removed #701-706); the live A/B runner (lsp_pilot_run.sh) captures both legs on the same real PRs, so the comparison no longer depends on a pre-committed frozen baseline. Mark the rendered report as superseded. Repoint dev smoke cases to real single-file PRs. README + scoping doc updated to record the reframe. Holdout guard passes (human/donpetry-bot author); validate-cases green (43 cases, no cross-split id overlap); lsp_pilot_compare/report bats suites pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>



Summary
gh/jqtelemetry (failure rate, duration percentiles, per-run table written to Step Summary + Issue)name:fromdaily-pr-review-health→actions-fleet-monitoron: workflow_callso any repo can invoke this as a shared reusable workflowshellchecklint workflowdocs/actions-fleet-monitor.mdCommits
fcedcc7041f3180a8c7323b50d87Remaining work items completed in follow-up commits on this branch.
Test plan
shellcheckpasses onscripts/pr_review_health.shworkflow_dispatchsmoke run onactions-fleet-monitor.ymlcompletes and produces a Step SummaryHAS_FAILURES=true; no issue on clean run🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
scripts/and workflows.Chores