Skip to content

fix(ci): use a block scalar so issue-remediation-bulk.yml parses - #1491

Merged
eleshar merged 1 commit into
developfrom
fix/irb-yaml-block-scalar
Aug 4, 2026
Merged

fix(ci): use a block scalar so issue-remediation-bulk.yml parses#1491
eleshar merged 1 commit into
developfrom
fix/irb-yaml-block-scalar

Conversation

@eleshar

@eleshareleshar commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

.github/workflows/issue-remediation-bulk.yml:109 was a single-line run: ending in echo "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.

run: | set +e node .github/scripts/workflows/assign-milestones-workflow.js echo "Exit code: $?"

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.yml failed to parse — a single-line run: containing Exit code: $? was invalid YAML, so the workflow never loaded. Converted to a block scalar. (PR #1491)

Checklist (Global DoD / PR)

  • Single-concern, minimal change
  • YAML validated with yaml.safe_load
  • No behaviour change to the workflow's commands
  • No secrets, credentials or tokens added
  • No permission, runs-on or trust-boundary changes
  • CHANGELOG entry included above
  • Linked issues recorded

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.
@github-actions

github-actionsBot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

✅ Template check passed after update. Thanks for fixing the PR description.

@github-actions

github-actionsBot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

⏱️ Aging and SLA annotation

  • Age: 0 day(s)
  • SLA state: Within SLA
  • Thresholds: warn at 7 days, breach at 14 days
  • Last updated: 2026-08-04T12:58:40.469Z

Maintained by project-meta-sync workflow.

@github-actionsgithub-actionsBot added status:needs-review Awaiting code review type:bug Bug or defect priority:normal Default priority area:ci Build and CI pipelines type:chore Chore / small hygiene change meta:needs-changelog Requires a changelog entry before merge and removed type:chore Chore / small hygiene change labels Aug 4, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #1491

CI Status:pending
Files changed: 1
Risk Distribution: 1 critical, 0 high, 0 medium, 0 low

Recommendations

  • CI checks not green
  • ⚠️ 1 critical-risk file(s) modified (workflows, secrets)
  • ⚠️ Security-sensitive files modified (review carefully)

@coderabbitai

coderabbitaiBot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Improved logging for the automated milestone assignment process.
    • The workflow now records the assignment script’s exit status while preserving its existing behaviour.

Walkthrough

The workflow now runs the existing milestone assignment command in a multiline Bash script and logs its exit code.

Changes

Issue remediation workflow

Layer / File(s)Summary
Milestone assignment command handling
.github/workflows/issue-remediation-bulk.yml
The workflow disables immediate Bash error handling, runs the existing Node script, and logs its exit code.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers:ashleyshaw

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check nameStatusExplanation
Title check✅ PassedThe title clearly identifies the YAML block scalar change that fixes parsing of the issue-remediation workflow.
Description check✅ PassedThe description explains the parsing fix, testing, impact, linked issue, and changelog, but omits the template's risk assessment and detailed test sections.
Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/irb-yaml-block-scalar

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai
coderabbitaiBot requested a review from ashleyshawAugust 4, 2026 12:59
@eleshar
eleshar merged commit 3126164 into developAug 4, 2026
43 of 51 checks passed
@eleshar
eleshar deleted the fix/irb-yaml-block-scalar branch August 4, 2026 13:00
@mergify

mergifyBot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between a140faa and 1472681.

📒 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

View job details

##[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

View job details

##[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

View job details

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

View job details

##[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

View job details

##[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

View job details

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@v4 is acceptable; SHA pins are better).
  • No pull_request_target with 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_dispatch with defined inputs.

Files:

  • .github/workflows/issue-remediation-bulk.yml

Comment on lines +109 to +112
run: |
set +e
node .github/scripts/workflows/assign-milestones-workflow.js
echo "Exit code: $?"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 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.

Suggested change
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.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ciBuild and CI pipelinesmeta:needs-changelogRequires a changelog entry before mergepriority:normalDefault prioritystatus:needs-reviewAwaiting code reviewtype:bugBug or defect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@eleshar