From 58907fe16125a75f7a67ccfe0a9e85fa44022017 Mon Sep 17 00:00:00 2001 From: Justn Date: Mon, 20 Apr 2026 22:47:37 +0900 Subject: [PATCH] fix(ci): provider-health workflow shouldn't fail on missing .ca/ (#487) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The weekly provider-health cron was creating spurious "bug" issues every run because \`doctor --live\` treats a missing .ca/ directory and config file as failures. Those checks are meaningful for user environments but not in CI — the workspace legitimately ships without .ca/ (it's gitignored). Write a minimal stub config before invoking doctor so the env checks pass. The workflow's exit code now reflects only the live provider pings — which is what the cron is actually supposed to measure. Config mirrors the Groq-based shape already used by review.yml's fallback branch. --- .github/workflows/provider-health.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/provider-health.yml b/.github/workflows/provider-health.yml index 840bbc6..0115533 100644 --- a/.github/workflows/provider-health.yml +++ b/.github/workflows/provider-health.yml @@ -24,6 +24,28 @@ jobs: - run: pnpm install --frozen-lockfile - run: pnpm build + # doctor --live runs its base environment checks first (.ca/ dir, + # config file, API keys, CLIs). Those checks are meaningful for + # user environments but not in CI — the workspace is intentionally + # missing .ca/ (gitignored) and most CLIs. Write a minimal config + # so the env checks pass and the run's exit code reflects only the + # live provider pings we actually care about. + - name: Generate stub config for doctor + run: | + mkdir -p .ca + cat > .ca/config.json << 'CONF' + { + "mode": "pragmatic", + "language": "en", + "reviewers": [ + { "id": "r1", "model": "llama-3.3-70b-versatile", "backend": "api", "provider": "groq", "enabled": true, "timeout": 120 } + ], + "moderator": { "model": "llama-3.3-70b-versatile", "backend": "api", "provider": "groq" }, + "head": { "backend": "api", "model": "llama-3.3-70b-versatile", "provider": "groq", "enabled": true }, + "errorHandling": { "maxRetries": 1, "forfeitThreshold": 0.7 } + } + CONF + - name: Ping Tier 1 providers id: health continue-on-error: true