Skip to content

fix(news): keep briefing generation green when the Copilot CLI fails - #282

Draft
DevSecNinja with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-github-actions-job-failure-again
Draft

DevSecNinja with Copilot wants to merge 3 commits into
mainfrom
copilot/fix-github-actions-job-failure-again

Conversation

Copilot AI commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

The scheduled News job "Generate briefing state" has failed on every run since 10 Sep with task: Failed to run task "pipeline:generate": exit status 1 (step exit code 201 = go-task's CodeTaskRunError), so no state has been persisted and the site is stale.

Root cause

pipeline:generate aborts whenever the Copilot CLI subprocess fails. Running the pipeline against the real restored news-state release asset with AI_PROVIDER=fake succeeds, which isolates the failure to the Copilot CLI path; no functional commits landed in the failing window (Renovate bumps only).

Of the three Copilot CLI providers in src/wazzup/ai.py, only CopilotCliTransparencyReportProvider tolerated a CLI outage. The curator and writer still raised on a non-zero exit code, a missing output file, or unparsable JSON — killing the run before any state was persisted. Reproduced with a stub copilot that exits 1: the pipeline exits 1 before this change, 0 after.

Changes

  • src/wazzup/ai.py — curation and summary providers now degrade to their deterministic Fake* counterparts on CLI failure, recording provider.type: copilot-cli-fallback, fallbackFrom, and the CLI stdout/stderr as fallbackReason. This is the contract already used for invalid payloads and for the transparency report; the exception tuples of all three are now aligned.
  • warn_copilot_fallback — emits a ::warning:: per fallback so the degradation and the underlying CLI error surface in the workflow log instead of failing silently. Written to stderr to keep the pipeline's JSON stdout clean.
  • tests/test_ai.py — two tests mirroring test_copilot_cli_transparency_falls_back_on_runtime_failure for the curation and summary providers.
  • docs/github-actions.md — operational learning note.

With a CLI that exits non-zero, a run now looks like:

::warning::Copilot CLI curation fell back to deterministic output: Copilot CLI curation failed with exit code 1. ... stderr: premium request quota exhausted
::warning::Copilot CLI summary fell back to deterministic output: ...
::warning::Copilot CLI transparency report fell back to deterministic output: ...

and the published briefing carries the reason:

{
  "type": "copilot-cli-fallback",
  "fallbackFrom": "copilot-cli",
  "fallbackReason": "Copilot CLI failed with exit code 1. ...\nstderr: premium request quota exhausted"
}

Note

api.github.com is unreachable from the agent sandbox, so only the job annotations were retrievable — the precise Copilot CLI error (quota, model availability, or a CLI regression) is still unknown. The next run will print it as a warning and persist it in fallbackReason, which should pinpoint it. Until then briefings refresh with deterministic, non-AI summaries rather than not refreshing at all.

Copilot AI and others added 2 commits September 14, 2026 07:55
Co-authored-by: DevSecNinja <14926452+DevSecNinja@users.noreply.github.com>
Co-authored-by: DevSecNinja <14926452+DevSecNinja@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job Generate briefing state fix(news): keep briefing generation green when the Copilot CLI fails Sep 14, 2026
Copilot AI requested a review from DevSecNinja September 14, 2026 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants