Skip to content

docs-source-sync: fail digest on API errors - #338

Open
reakaleek wants to merge 1 commit into
mainfrom
fix/source-sync-digest-api-errors
Open

reakaleek wants to merge 1 commit into
mainfrom
fix/source-sync-digest-api-errors

Conversation

@reakaleek

Copy link
Copy Markdown
Member

The source-sync digest step now fails when a GitHub API call errors or returns the wrong JSON shape. A lookback with no merged PRs or commits still succeeds, and the agent noops.

Prompt summary: A docs-eng-team source-sync run reported 0 changes for every source repo and still succeeded. Fail the digest on API errors so a token or search failure is not treated as an empty lookback.

Why

The digest step hid gh api failures behind empty JSON. The job printed total_changes=0 and the agent nooped. A token or Search API rejection then looks like a quiet week. See the docs-eng-team run.

What

Digest API calls

The search and commits calls fail the step when they exit non-zero. The step no longer substitutes an empty payload. A real empty lookback still writes empty.marker.

Payload shape

The step checks that search results have an items array and that commits are an array. A wrong shape prints the repo, the API, and a short payload snippet, then exits.

Caller docs

The source-sync README states that an API failure fails the digest step. A token or permission problem is not reported as no changes.

Verify

rg -n '2>/dev/null \|\| echo' .github/workflows/gh-aw-docs-source-sync.md
# The digest step must not substitute empty JSON on gh api failure

Out of scope This PR does not change which APIs the digest uses, or the caller TokenPolicy in docs-eng-team.

Made with Cursor

Swallowed gh api failures looked like an empty lookback, so the agent nooped instead of surfacing a token or search problem.

Co-Authored-By: Cursor Grok 4.6 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@reakaleek
reakaleek requested a review from a team as a code owner September 14, 2026 08:56
@reakaleek
reakaleek requested a review from akira28 September 14, 2026 08:56
@reakaleek reakaleek added the bug Something isn't working label Sep 14, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.


What is this? | From workflow: PR Review

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants