Skip to content

fix(ci): avoid SIGPIPE in bump-platform-submodule first-line extraction#423

Merged
NiveditJain merged 1 commit into
mainfrom
luv-424
Jun 9, 2026
Merged

fix(ci): avoid SIGPIPE in bump-platform-submodule first-line extraction#423
NiveditJain merged 1 commit into
mainfrom
luv-424

Conversation

@NiveditJain

@NiveditJain NiveditJain commented Jun 9, 2026

Copy link
Copy Markdown
Member

Summary

SUBJECT_LINE=${COMMIT_SUBJECT:-Manual trigger}
SUBJECT_LINE=${SUBJECT_LINE%%$'\n'*}

Test plan

  • Verified the expansion on four inputs (multi-line, single-line, unset, empty) — each returns the correct first line / default fallback.
  • yaml.safe_load parses the updated workflow.
  • Verify on a real run: this workflow only triggers on push to main, so the next merge into main will exercise the fix.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved reliability of internal platform synchronization processes to prevent potential workflow failures.

`printf '%s\n' "$COMMIT_SUBJECT" | head -n 1` races under `set -o pipefail`:
on a long commit body, `head` closes the pipe after the first line, `printf`
dies with SIGPIPE on the next write, and the pipeline propagates the
non-zero exit. The merge of #397 (squash body several KB) triggered it and
blocked the platform-submodule bump (run 27208748580).

Replace the pipe with pure bash parameter expansion — no subprocess, no
pipe, nothing for pipefail to fail on.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4202a731-3af8-4cc1-9ac3-3a870b1fe9c9

📥 Commits

Reviewing files that changed from the base of the PR and between 0feacb6 and c061cfe.

📒 Files selected for processing (2)
  • .github/workflows/bump-platform-submodule.yml
  • CHANGELOG.md

📝 Walkthrough

Walkthrough

The PR fixes a broken-pipe failure in the bump-platform-submodule workflow by replacing a printf | head -n 1 pipeline with pure bash parameter expansion for extracting the commit subject line. The changelog documents this correction.

Changes

Bump Workflow Broken Pipe Fix

Layer / File(s) Summary
Subject line extraction fix and changelog
.github/workflows/bump-platform-submodule.yml, CHANGELOG.md
Subject-line extraction now uses bash parameter expansion (defaulting COMMIT_SUBJECT to Manual trigger and truncating at first newline) instead of printf piped to head, eliminating broken-pipe failures under set -euo pipefail. Changelog documents this specific fix.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • FailproofAI/failproofai#394: Prior work on the bump-platform-submodule workflow that established the subject-line extraction logic now being fixed.

Poem

A pipeline burst in the dark of night,
But bash expansion set things right,
No more SIGPIPE to break the spell—
Parameter tricks work just as well! 🐰✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description is comprehensive and includes the problem statement, root cause analysis, solution, and test plan, but does not follow the required template structure with Type of Change and Checklist sections. Restructure the description to follow the template with Type of Change (Bug fix) and Checklist sections to ensure consistency with repository standards.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: fixing a SIGPIPE issue in the bump-platform-submodule workflow's first-line extraction logic.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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 and usage tips.

@NiveditJain NiveditJain merged commit 09d517f into main Jun 9, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant