fix(news): keep briefing generation green when the Copilot CLI fails - #282
Draft
DevSecNinja with Copilot wants to merge 3 commits into
Draft
DevSecNinja with Copilot wants to merge 3 commits into
DevSecNinja with Copilot wants to merge 3 commits into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The scheduled
Newsjob "Generate briefing state" has failed on every run since 10 Sep withtask: Failed to run task "pipeline:generate": exit status 1(step exit code 201 = go-task'sCodeTaskRunError), so no state has been persisted and the site is stale.Root cause
pipeline:generateaborts whenever the Copilot CLI subprocess fails. Running the pipeline against the real restorednews-staterelease asset withAI_PROVIDER=fakesucceeds, 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, onlyCopilotCliTransparencyReportProvidertolerated 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 stubcopilotthat exits 1: the pipeline exits 1 before this change, 0 after.Changes
src/wazzup/ai.py— curation and summary providers now degrade to their deterministicFake*counterparts on CLI failure, recordingprovider.type: copilot-cli-fallback,fallbackFrom, and the CLI stdout/stderr asfallbackReason. 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 mirroringtest_copilot_cli_transparency_falls_back_on_runtime_failurefor the curation and summary providers.docs/github-actions.md— operational learning note.With a CLI that exits non-zero, a run now looks like:
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.