Uh oh!
There was an error while loading. Please reload this page.
fix(ci): use a block scalar so issue-remediation-bulk.yml parses - #1491
Conversation
The one-line run contained "Exit code: $?". A colon followed by a space inside an unquoted plain scalar is a YAML syntax error, so the whole workflow failed to load and policy checks could not evaluate it.
✅ Template check passed after update. Thanks for fixing the PR description. |
⏱️ Aging and SLA annotation
Maintained by project-meta-sync workflow. |
🔍 Reviewer Summary for PR #1491CI Status: ❌ Recommendations
|
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe workflow now runs the existing milestone assignment command in a multiline Bash script and logs its exit code. ChangesIssue remediation workflow
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Tick the box to add this pull request to the merge queue (same as
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/issue-remediation-bulk.yml:
- Around line 109-112: Update the “Assign milestones” workflow step around
assign-milestones-workflow.js to capture the Node script’s exit status, log that
captured value, and explicitly exit with the same status so failures remain
visible and prevent the later labeling step from running.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: a7c19a66-4eec-45df-808f-9bf6dec8c99d
📒 Files selected for processing (1)
.github/workflows/issue-remediation-bulk.yml
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
- GitHub Check: Mergify Merge Protections
- GitHub Check: Summary
⚠️ CI failures not shown inline (6)
GitHub Actions: Changelog • Management / 0_Validate changelog on PR.txt: fix(ci): use a block scalar so issue-remediation-bulk.yml parses
Conclusion: failure
##[group]Run actions/github-script@v7
with:
script: const cp = require("node:child_process");
const author = context.payload.pull_request?.user?.login || "";
const labels = (context.payload.pull_request?.labels || []).map((l) => l.name);
const has = (name) => labels.includes(name);
if (author === "dependabot[bot]" || author === "app/dependabot") {
core.info("Skipping changelog requirement for Dependabot pull requests.");
core.setOutput("run_validation", "false");
return;
}
if (has("meta:needs-changelog") && has("meta:no-changelog")) {
core.setFailed("PR cannot include both meta:needs-changelog and meta:no-changelog.");
return;
}
const restrictedTypes = new Set([
"type:feature",
"type:bug",
"type:performance",
"type:security",
"type:release",
"type:hotfix",
]);
if (has("meta:no-changelog") && labels.some((label) => restrictedTypes.has(label))) {
core.setFailed("meta:no-changelog is not allowed for high-impact release-related change types.");
return;
}
const baseSha = context.payload.pull_request?.base?.sha;
const headSha = context.payload.pull_request?.head?.sha;
const changed = cp
.execSync(`git diff --name-only ${baseSha} ${headSha}`, {
encoding: "utf8",
maxBuffer: 1024 * 1024 * 100,
})
.split("\n")
.filter(Boolean);
if (changed.includes("CHANGELOG.md")) {
core.info("CHANGELOG.md updated in PR diff.");
core.setOutput("run_validation", "true");
return;
}
if (has("meta:no-changelog")) {
core.info("Skipping changelog requirement due to meta:no-changelog label.");
core.setOutput("run_validation", "false");
return;
}
core.setFailed("PR requires a CHANGELOG.md update or the meta:no-changelog label.");
github-***REDACTED_SECRET_ASSIGNMENT***
debug: false
user-agent: actions/github-script
result-encoding: json
retries: 0
retry-exempt-status-codes: 400,401,403,404,422
##[endgroup]
##[error]PR requires a CHANGELOG.md update or the meta:no-changelog label.
GitHub Actions: Changelog • Management / Validate changelog on PR: fix(ci): use a block scalar so issue-remediation-bulk.yml parses
Conclusion: failure
##[group]Run actions/github-script@v7
with:
script: const cp = require("node:child_process");
const author = context.payload.pull_request?.user?.login || "";
const labels = (context.payload.pull_request?.labels || []).map((l) => l.name);
const has = (name) => labels.includes(name);
if (author === "dependabot[bot]" || author === "app/dependabot") {
core.info("Skipping changelog requirement for Dependabot pull requests.");
core.setOutput("run_validation", "false");
return;
}
if (has("meta:needs-changelog") && has("meta:no-changelog")) {
core.setFailed("PR cannot include both meta:needs-changelog and meta:no-changelog.");
return;
}
const restrictedTypes = new Set([
"type:feature",
"type:bug",
"type:performance",
"type:security",
"type:release",
"type:hotfix",
]);
if (has("meta:no-changelog") && labels.some((label) => restrictedTypes.has(label))) {
core.setFailed("meta:no-changelog is not allowed for high-impact release-related change types.");
return;
}
const baseSha = context.payload.pull_request?.base?.sha;
const headSha = context.payload.pull_request?.head?.sha;
const changed = cp
.execSync(`git diff --name-only ${baseSha} ${headSha}`, {
encoding: "utf8",
maxBuffer: 1024 * 1024 * 100,
})
.split("\n")
.filter(Boolean);
if (changed.includes("CHANGELOG.md")) {
core.info("CHANGELOG.md updated in PR diff.");
core.setOutput("run_validation", "true");
return;
}
if (has("meta:no-changelog")) {
core.info("Skipping changelog requirement due to meta:no-changelog label.");
core.setOutput("run_validation", "false");
return;
}
core.setFailed("PR requires a CHANGELOG.md update or the meta:no-changelog label.");
github-***REDACTED_SECRET_ASSIGNMENT***
debug: false
user-agent: actions/github-script
result-encoding: json
retries: 0
retry-exempt-status-codes: 400,401,403,404,422
##[endgroup]
##[error]PR requires a CHANGELOG.md update or the meta:no-changelog label.
GitHub Actions: CI • Unified Checks (Lint, Test, Validate) / Linting: fix(ci): use a block scalar so issue-remediation-bulk.yml parses
Conclusion: failure
unused-vars
/home/runner/work/.github/.github/scripts/agents/meta.agent.js
##[warning] 104:14 warning 'e' is defined but never used no-unused-vars
##[warning] 369:7 warning 'lines' is assigned a value but never used no-unused-vars
##[warning] 375:11 warning 'requiredSections' is assigned a value but never used no-unused-vars
/home/runner/work/.github/.github/scripts/agents/reporting.agent.js
##[warning] 20:7 warning '__dirname' is assigned a value but never used no-unused-vars
/home/runner/work/.github/.github/scripts/audit-branding-patterns.js
##[warning] 51:12 warning 'e' is defined but never used no-unused-vars
##[warning] 152:14 warning 'e' is defined but never used no-unused-vars
/home/runner/work/.github/.github/scripts/design-md-agent/__tests__/ciDesignMdCheck.test.js
##[warning] 4:9 warning 'execSync' is assigned a value but never used no-unused-vars
/home/runner/work/.github/.github/scripts/design-md-agent/validateDesignMd.js
##[warning] 5:38 warning 'searchRoots' is assigned a value but never used. Allowed unused args must match /^_/u no-unused-vars
/home/runner/work/.github/.github/scripts/identify-changed-markdown.js
##[warning] 45:10 warning 'err' is defined but never used no-unused-vars
/home/runner/work/.github/.github/scripts/remediation-wave-4f.js
##[warning] 110:45 warning 'config' is defined but never used. Allowed unused args must match /^_/u no-unused-vars
/home/runner/work/.github/.github/scripts/validate-markdown-lint.js
##[warning] 72:10 warning 'error' is defined but never used no-unused-vars
/home/runner/work/.github/.github/scripts/validate-reports-structure.js
##[warning] 39:14 warning 'err' is defined but never used no-unused-vars
/home/runner/work/.github/.github/scripts/validation/run-agent-handoff-audit.js
##[warning] 28:12 warning 'e' is defined but never used no-unused-vars
/home/runner/work/.github/.github/scripts/val...
GitHub Actions: CI • Unified Checks (Lint, Test, Validate) / 0_All Checks Passed.txt: fix(ci): use a block scalar so issue-remediation-bulk.yml parses
Conclusion: failure
##[group]Run test "failure" != "failure" -a "success" != "failure" -a "success" != "failure" && echo "✅ All checks passed" || (echo "❌ One or more checks failed" && exit 1)
�[36;1mtest "failure" != "failure" -a "success" != "failure" -a "success" != "failure" && echo "✅ All checks passed" || (echo "❌ One or more checks failed" && exit 1)�[0m
shell: /usr/bin/bash -e {0}
##[endgroup]
❌ One or more checks failed
##[error]Process completed with exit code 1.
GitHub Actions: CI • Unified Checks (Lint, Test, Validate) / All Checks Passed: fix(ci): use a block scalar so issue-remediation-bulk.yml parses
Conclusion: failure
##[group]Run test "failure" != "failure" -a "success" != "failure" -a "success" != "failure" && echo "✅ All checks passed" || (echo "❌ One or more checks failed" && exit 1)
�[36;1mtest "failure" != "failure" -a "success" != "failure" -a "success" != "failure" && echo "✅ All checks passed" || (echo "❌ One or more checks failed" && exit 1)�[0m
shell: /usr/bin/bash -e {0}
##[endgroup]
❌ One or more checks failed
##[error]Process completed with exit code 1.
GitHub Actions: CI • Unified Checks (Lint, Test, Validate) / 2_Linting.txt: fix(ci): use a block scalar so issue-remediation-bulk.yml parses
Conclusion: failure
unused-vars
/home/runner/work/.github/.github/scripts/agents/meta.agent.js
##[warning] 104:14 warning 'e' is defined but never used no-unused-vars
##[warning] 369:7 warning 'lines' is assigned a value but never used no-unused-vars
##[warning] 375:11 warning 'requiredSections' is assigned a value but never used no-unused-vars
/home/runner/work/.github/.github/scripts/agents/reporting.agent.js
##[warning] 20:7 warning '__dirname' is assigned a value but never used no-unused-vars
/home/runner/work/.github/.github/scripts/audit-branding-patterns.js
##[warning] 51:12 warning 'e' is defined but never used no-unused-vars
##[warning] 152:14 warning 'e' is defined but never used no-unused-vars
/home/runner/work/.github/.github/scripts/design-md-agent/__tests__/ciDesignMdCheck.test.js
##[warning] 4:9 warning 'execSync' is assigned a value but never used no-unused-vars
/home/runner/work/.github/.github/scripts/design-md-agent/validateDesignMd.js
##[warning] 5:38 warning 'searchRoots' is assigned a value but never used. Allowed unused args must match /^_/u no-unused-vars
/home/runner/work/.github/.github/scripts/identify-changed-markdown.js
##[warning] 45:10 warning 'err' is defined but never used no-unused-vars
/home/runner/work/.github/.github/scripts/remediation-wave-4f.js
##[warning] 110:45 warning 'config' is defined but never used. Allowed unused args must match /^_/u no-unused-vars
/home/runner/work/.github/.github/scripts/validate-markdown-lint.js
##[warning] 72:10 warning 'error' is defined but never used no-unused-vars
/home/runner/work/.github/.github/scripts/validate-reports-structure.js
##[warning] 39:14 warning 'err' is defined but never used no-unused-vars
/home/runner/work/.github/.github/scripts/validation/run-agent-handoff-audit.js
##[warning] 28:12 warning 'e' is defined but never used no-unused-vars
/home/runner/work/.github/.github/scripts/val...
🧰 Additional context used
📓 Path-based instructions (2)
**/.github/**
📄 CodeRabbit inference engine (CLAUDE.md)
Keep GitHub-native governance assets under
.github/; place reusable assets in the matching top-level portable folder instead.
Files:
.github/workflows/issue-remediation-bulk.yml
**/.github/workflows/*.yml
⚙️ CodeRabbit configuration file
**/.github/workflows/*.yml: Review GitHub Actions workflows for this governance repo:
- Security: check for least-privilege permissions (use
permissions:at job level, default to read-only).- Secret handling: ensure secrets are passed via env vars, not interpolated directly into run: steps to prevent injection.
- Action pinning: prefer SHA-pinned actions over mutable tags (e.g.
actions/checkout@v4is acceptable; SHA pins are better).- No
pull_request_targetwith untrusted code execution unless explicitly justified.- Avoid storing sensitive outputs as unmasked step outputs.
- Check for reusable workflow patterns and matrix strategies where appropriate.
- Validate
on:triggers: ensure branch/path filters are present to avoid unnecessary runs.- Confirm workflows are documented, DRY, and maintainable.
- Ensure agent-triggered workflows use
workflow_dispatchwith defined inputs.
Files:
.github/workflows/issue-remediation-bulk.yml
| run: | | ||
| set +e | ||
| node .github/scripts/workflows/assign-milestones-workflow.js | ||
| echo "Exit code: $?" |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Preserve the milestone assignment failure status.
Line 110 disables immediate exit. If the Node script exits with status 1, Line 112 logs the value but returns status 0. The Assign milestones step is then marked successful. The later Run labeling workflow step at Line 199 can run after milestone assignment failed.
Capture the status, log it, then exit with the same status.
Suggested fix
run: |
set +e
node .github/scripts/workflows/assign-milestones-workflow.js
- echo "Exit code: $?"+ status=$?+ echo "Exit code: $status"+ exit "$status"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| run: | | |
| set +e | |
| node .github/scripts/workflows/assign-milestones-workflow.js | |
| echo "Exit code: $?" | |
| run: | | |
| set +e | |
| node .github/scripts/workflows/assign-milestones-workflow.js | |
| status=$? | |
| echo "Exit code: $status" | |
| exit "$status" |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/issue-remediation-bulk.yml around lines 109 - 112, Update
the “Assign milestones” workflow step around assign-milestones-workflow.js to
capture the Node script’s exit status, log that captured value, and explicitly
exit with the same status so failures remain visible and prevent the later
labeling step from running.
Summary
.github/workflows/issue-remediation-bulk.yml:109was a single-linerun:ending inecho "Exit code: $?". A colon followed by a space inside an unquoted plain YAML scalar is a syntax error, so the whole workflow failed to load — it never ran, and policy checks could not evaluate it.One line becomes a block scalar. No behaviour change.
Verified with
yaml.safe_load: parses OK. Split out of #1456 so that PR stays a single-concern change.Linked issues
Changelog
Fixed
issue-remediation-bulk.ymlfailed to parse — a single-linerun:containingExit code: $?was invalid YAML, so the workflow never loaded. Converted to a block scalar. (PR #1491)Checklist (Global DoD / PR)
yaml.safe_loadruns-onor trust-boundary changes