Repository navigation
feat(autograder): add workflow_run watchdog for silent runner failures - #6
accesswatch wants to merge 1 commit into
Conversation
Challenge 10: Local commit verified!Found 2 commit(s) on branch |
Content Validation ReportAccessibility
Learning ResourcesAutomated validation by Learning Room. Questions? Check the guides or mention @Facilitator. |
PR Validation ReportValidation Needs Attention [ACTION REQUIRED] Required Checks
Learning ResourcesBased on your changes, these guides might help: Automated validation by Learning Room Bot. Aria generated this review. Last updated: 2026-05-04T18:58:37.519Z |
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions “watchdog” workflow that runs after specific autograder workflows complete, and posts a fallback PR comment when an autograder run ends in a hard failure (intended to cover cases where the in-job posting step never executes, e.g., runner abandonment).
Changes:
- Introduces a new
.github/workflows/autograder-watchdog.ymlworkflow triggered viaworkflow_runon selected autograder workflows. - Implements PR discovery + duplicate-prevention logic, and posts a standardized “check could not complete” comment when needed.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const headBranch = run.head_branch; | ||
| const runCreatedAt = new Date(run.created_at); | ||
|
|
||
| const { data: prs } = await github.rest.pulls.list({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| state: 'open', | ||
| head: `${context.repo.owner}:${headBranch}` | ||
| }); | ||
|
|
||
| if (prs.length === 0) { | ||
| console.log('No open PR found for branch:', headBranch); |
| const challengeMarkers = [ | ||
| '## Challenge 7:', | ||
| '## Challenge 10:', | ||
| '## Challenge 14:', | ||
| '## Challenge 16:' | ||
| ]; | ||
|
|
||
| const alreadyPosted = comments.some(c => | ||
| c.user.type === 'Bot' && | ||
| new Date(c.updated_at) > runCreatedAt && | ||
| challengeMarkers.some(m => c.body.includes(m)) | ||
| ); |
| const { data: comments } = await github.rest.issues.listComments({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| issue_number: pr.number |
|
Superseded by source-aligned template sync in PR #13, which includes these grading reliability updates. |
Adds autograder-watchdog.yml -- fires when any autograder concludes with failure. If the in-job fallback step already posted, this is a no-op. Covers runner-abandonment where no in-job step can run.