Conversation
Automated sync from stranske/Workflows Template hash: 6adbaf966a8d Changes synced from sync-manifest.yml
🤖 Keepalive Loop StatusPR #317 | Agent: Codex | Iteration 0/5 Current State
🔍 Failure Classification| Error type | infrastructure | |
Keepalive Work Log (click to expand)
|
There was a problem hiding this comment.
Pull request overview
Syncs in updated GitHub Actions workflow templates from stranske/Workflows, adding an opt-in Claude Code review workflow and adjusting the PR health wrapper’s input passing to the reusable workflow.
Changes:
- Added
.github/workflows/maint-76-claude-code-review.ymlto run Claude Code review only when opted-in via label or manual dispatch. - Updated
.github/workflows/agents-pr-health.ymlto pass reusable-workflow inputs using explicit'true'/'false'string patterns and string defaults.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| .github/workflows/maint-76-claude-code-review.yml | New opt-in Claude Code Review workflow with label/manual dispatch gating, secret detection, and an integrity guard. |
| .github/workflows/agents-pr-health.yml | Adjusts with: values passed into the reusable PR health workflow (notably boolean/string coercions and defaults). |
| echo "workflow_unchanged=true" >>"$GITHUB_OUTPUT" | ||
| exit 0 |
There was a problem hiding this comment.
In the workflow-integrity guard, github.base_ref is empty for workflow_dispatch, so the step unconditionally sets workflow_unchanged=true and allows the secrets-gated jobs to run even when this workflow file was modified on the dispatched ref. This defeats the “workflow must match default branch to safely access secrets” intent for manual dispatch; consider comparing the file against the repository default branch for workflow_dispatch too (or failing closed unless github.ref_name is the default branch).
| echo "workflow_unchanged=true" >>"$GITHUB_OUTPUT" | |
| exit 0 | |
| echo "github.base_ref is empty; resolving repository default branch from origin/HEAD" | |
| # Ensure we have the remote HEAD reference so we can determine the default branch. | |
| git fetch --no-tags origin '+HEAD:refs/remotes/origin/HEAD' | |
| # Resolve default branch name (strip the leading "origin/"). | |
| default_remote_head="$(git symbolic-ref --short refs/remotes/origin/HEAD || true)" | |
| default_branch="${default_remote_head#origin/}" | |
| if [ -z "$default_branch" ]; then | |
| echo "Could not determine default branch; failing closed." | |
| echo "workflow_unchanged=false" >>"$GITHUB_OUTPUT" | |
| exit 0 | |
| fi | |
| base_ref="$default_branch" | |
| echo "Using default branch '${base_ref}' for workflow integrity check." |
| const labels = (pr.labels || []).map((label) => label.name); | ||
| if (labels.includes("claude-review")) { | ||
| shouldRun = "true"; | ||
| reason = "label_opt_in"; |
There was a problem hiding this comment.
resolve-target skips draft PRs for manual dispatch, but the pull_request path doesn’t check pr.draft. As written, adding the claude-review label to a draft PR will run the review (and spend tokens) on labeled/synchronize/reopened events; if drafts should be excluded, add the same pr.draft guard in the PR-event branch.
| const labels = (pr.labels || []).map((label) => label.name); | |
| if (labels.includes("claude-review")) { | |
| shouldRun = "true"; | |
| reason = "label_opt_in"; | |
| if (pr.draft) { | |
| reason = "pr_is_draft"; | |
| } else { | |
| const labels = (pr.labels || []).map((label) => label.name); | |
| if (labels.includes("claude-review")) { | |
| shouldRun = "true"; | |
| reason = "label_opt_in"; | |
| } |
| max_prs: ${{ inputs.max_prs || '10' }} | ||
| cron_interval_hours: ${{ vars.PR_HEALTH_INTERVAL_HOURS || '1' }} |
There was a problem hiding this comment.
max_prs is declared as a number input, but the expression ${{ inputs.max_prs || '10' }} returns a number when provided and a string when defaulting. If the called reusable workflow expects a consistent type (common when passing inputs across workflows), cast inputs.max_prs to string as well (or keep the value numeric by using a numeric default).
Sync Summary
Files Updated
Files Skipped
Review Checklist
Source: stranske/Workflows
Manifest:
.github/sync-manifest.yml