Fix populate script workflow and add error handling#6
Merged
Conversation
Agent-Logs-Url: https://github.com/28pins/CLIWordGames/sessions/94601ad7-7aea-4d77-8b08-d49f1b5f1aad Co-authored-by: 28pins <262898015+28pins@users.noreply.github.com>
…rror messages Agent-Logs-Url: https://github.com/28pins/CLIWordGames/sessions/94601ad7-7aea-4d77-8b08-d49f1b5f1aad Co-authored-by: 28pins <262898015+28pins@users.noreply.github.com>
…dling Agent-Logs-Url: https://github.com/28pins/CLIWordGames/sessions/94601ad7-7aea-4d77-8b08-d49f1b5f1aad Co-authored-by: 28pins <262898015+28pins@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
28pins
May 25, 2026 20:39
View session
28pins
approved these changes
May 25, 2026
There was a problem hiding this comment.
Pull request overview
This PR updates the scheduled “daily words & puzzles” population automation by improving workflow robustness (retry + notification) and tightening the populate script’s failure handling so the workflow can fail fast when upstream fetching is consistently broken.
Changes:
- Add a failure threshold and error propagation in
scripts/populate_dailyWords.js, and coordinate both Wordle + Connections runs viaPromise.allSettled(). - Fix and harden the GitHub Actions workflow by adding a 2-attempt retry, unified commit/push, and an email notification step on failure.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| scripts/populate_dailyWords.js | Adds failure threshold checks + consolidated top-level execution/exit behavior for Wordle and Connections population. |
| .github/workflows/update-daily-words.yml | Adds retry logic, fixes execution flow, commits once, and sends an email on job failure. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+175
to
+177
| // Run both functions and check results. Allow both to complete even if one fails. | ||
| Promise.allSettled([main(), mainConnections()]) | ||
| .then(results => { |
Comment on lines
+71
to
+73
| console.error(`\nERROR: ${failedDates.length} dates failed to fetch Wordle solutions (threshold: ${FAILURE_THRESHOLD})`); | ||
| console.error(`Failed dates: ${failedDates.slice(0, 20).join(', ')}${failedDates.length > 20 ? '...' : ''}`); | ||
| throw new Error(`Wordle fetch failed for ${failedDates.length} dates`); |
Comment on lines
+149
to
+151
| console.error(`ERROR: ${failed.length} Connections dates failed to fetch (threshold: ${FAILURE_THRESHOLD})`); | ||
| console.error(`Failed dates: ${failed.slice(0, 20).join(', ')}${failed.length > 20 ? '...' : ''}`); | ||
| throw new Error(`Connections fetch failed for ${failed.length} dates`); |
Comment on lines
+54
to
+57
| - name: Notify on failure | ||
| if: failure() | ||
| uses: dawidd6/action-send-mail@v3 | ||
| with: |
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.
git pus->git push