fix(weekly-digest): truncate activity payload to stay within gpt-4.1-mini's 8000-token limit - #47
Merged
Merged
Conversation
The weekly_digest job was failing with HTTP 413 "Request Entity Too Large" because the activity JSON sent to gpt-4.1-mini exceeded its 8000-token request-body limit. Fix the jq filter in the "Generate digest" step to: - Extract plain strings from nested objects: repository.nameWithOwner and author.login (instead of embedding the full objects) - Cap counts: issues ≤15, PRs ≤15, releases ≤10 - Drop the events key entirely (was already empty [])
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions job weekly_digest
fix(weekly-digest): truncate activity payload to stay within gpt-4.1-mini's 8000-token limit
Jul 28, 2026
alexlovelltroy
approved these changes
Jul 28, 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
weekly_digestjob was failing with HTTP 413 becausegh searchreturns full nested objects forrepositoryandauthor, and collects unbounded results — pushing the JSON payload overgpt-4.1-mini's 8000-token request body limit.Changes
.repository.nameWithOwnerand.author.loginas plain strings instead of embedding the full gh-search objects (which includeid,isPrivate,isFork, etc.)eventskey: was already hardcoded to[]; removed entirely