Skip to content

Capture the alias script's output before grepping it in CI - #848

Merged
alexeyzimarev merged 1 commit into
mainfrom
fix/ci-bundle-assert-stable-tag
Sep 10, 2026
Merged

alexeyzimarev merged 1 commit into
mainfrom
fix/ci-bundle-assert-stable-tag

Conversation

@alexeyzimarev

Copy link
Copy Markdown
Member

No tracker issue on either side: the failure surfaced on the v1.0.0 tag build (CI run 34466915928).

What & why

The bundle assertion pipes the alias-promotion script into grep -qx beta, and grep -q exits at its first match and closes the pipe. Every earlier tag was a beta, so the script printed one line and stopped. A stable tag prints beta then stable, and the second line hits the closed pipe: bash's echo returns 1 under set -e, and the step's pipefail fails the job that the Release workflow waits on. The output is now captured first, then grepped.

Verification

Reproduced against a one-version manifest with SIGPIPE ignored, as under the Actions runner:

old pipeline, 1.0.0         -> "line 38: echo: write error: Broken pipe", rc=1
old pipeline, 0.12.0-beta.3 -> rc=0
fixed lines,  1.0.0         -> rc=0 (aliases: beta stable)
fixed lines,  0.12.0-beta.3 -> rc=0 (aliases: beta)

bash scripts/run-shell-tests.sh: every suite reports ok.

🤖 Generated with Claude Code

grep -q closes the pipe at its first match. A stable tag prints beta then stable, so the second line hit EPIPE, exited the script with 1 and failed the bundle assertion on v1.0.0.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-10T11:30:13.464938Z 15211c9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Prevent stable-tag bundle assertions from failing on closed pipes

🐞 Bug fix ⚙️ Configuration changes 🕐 Less than 10 minutes

Grey Divider

AI Description

• Captures alias-promotion output before validating the expected beta alias.
• Prevents stable-tag assertions failing when grep -q closes the pipeline early.
Diagram

graph TD
  A["Bundle assertion"] -->|"runs"| B["Alias script"] -->|"captures stdout"| C["Alias output"] -->|"validates beta"| D["Exact grep"]
Loading
High-Level Assessment

Capturing the small alias list before validation is the simplest and safest approach. A temporary file would add unnecessary lifecycle handling, while retaining a direct pipeline without grep -q would process all output but obscure the closed-pipe failure mode this change explicitly prevents.

Files changed (1) +5 / -2

Bug fix (1) +5 / -2
ci.ymlCapture alias output before the bundle assertion grep +5/-2

Capture alias output before the bundle assertion grep

• Stores the alias-promotion script's complete output in a shell variable before checking for an exact 'beta' line. This prevents stable releases from failing under 'pipefail' when 'grep -q' exits before the script emits its subsequent 'stable' alias.

.github/workflows/ci.yml

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (2) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Merge subject omits its issue link 📘 Rule violation ⚙ Maintainability
Description
The commit subject Capture the alias script's output before grepping it in CI does not end with
the required (#<digits>) suffix. When this commit enters repository history under that subject,
readers and automation cannot associate it with the required GitHub issue from the subject alone.
Code

.github/workflows/ci.yml[R223-224]

+          aliases="$(bash scripts/promote-desktop-aliases.sh releases/releases.osx-arm64.json "${{ steps.version.outputs.VERSION }}")"
+          grep -qx beta <<<"$aliases"
Relevance

●●● Strong

Active commit-subject compliance requires issue suffixes; repository guidance changes show
issue-reference enforcement is accepted.

PR-#659

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
PR Compliance ID 2897961 requires the merge subject to end with a parenthesized GitHub issue
reference, while the supplied commit subject has no such suffix.

Rule 2897961: Enforce single-clause imperative commit subject with GitHub issue reference and 80-char limit

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The commit subject does not end with the required GitHub issue reference in `(#<digits>)` form.

## Fix Focus Areas
- .github/workflows/ci.yml[223-224]

## Recommended Fix
Amend the commit subject to a single imperative clause of at most 80 characters ending in the actual GitHub issue reference. Do not add that reference to the pull request title.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Pull request lacks required issue links 📘 Rule violation § Compliance
Description
The description begins with No tracker issue on either side and contains neither a GitHub closing
reference nor a Linear issue key. Without one reference line containing both identifiers, the change
cannot be connected to the tracker records required for review and audit.
Code

.github/workflows/ci.yml[R223-224]

+          aliases="$(bash scripts/promote-desktop-aliases.sh releases/releases.osx-arm64.json "${{ steps.version.outputs.VERSION }}")"
+          grep -qx beta <<<"$aliases"
Relevance

●●● Strong

Repository guidance explicitly requires GitHub and Linear references in PR descriptions, and recent
compliance changes were accepted.

PR-#659

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
PR Compliance ID 2897991 requires a single description line containing both a GitHub closing
reference and a Linear issue key; the supplied description explicitly states that neither tracker
has an issue.

Rule 2897991: PR description must contain both GitHub and Linear issue references; PR title must not contain issue IDs

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The pull request description lacks the required reference line containing both a GitHub closing reference and a Linear issue key.

## Fix Focus Areas
- .github/workflows/ci.yml[223-224]

## Recommended Fix
Establish the required tracker records, then add one description line such as `Closes #123 AI-456` using the actual identifiers. Do not invent identifiers or place them in the pull request title.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
✅ Compliance rules (platform): 64 rules
✅ Cross-repo context — repo relationships
Review mode: ⚖️ Balanced: This is a localized CI behavior fix, but it changes release-validation shell semantics in a workflow whose result gates releases, so a careful standard review is warranted.

Grey Divider

Tip of the day
💡 Did you know, you can turn these tips off under Display preferences

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread .github/workflows/ci.yml
Comment on lines +223 to +224
aliases="$(bash scripts/promote-desktop-aliases.sh releases/releases.osx-arm64.json "${{ steps.version.outputs.VERSION }}")"
grep -qx beta <<<"$aliases"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

1. Merge subject omits its issue link 📘 Rule violation ⚙ Maintainability

The commit subject Capture the alias script's output before grepping it in CI does not end with
the required (#<digits>) suffix. When this commit enters repository history under that subject,
readers and automation cannot associate it with the required GitHub issue from the subject alone.
Agent Prompt
## Issue description
The commit subject does not end with the required GitHub issue reference in `(#<digits>)` form.

## Fix Focus Areas
- .github/workflows/ci.yml[223-224]

## Recommended Fix
Amend the commit subject to a single imperative clause of at most 80 characters ending in the actual GitHub issue reference. Do not add that reference to the pull request title.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment thread .github/workflows/ci.yml
Comment on lines +223 to +224
aliases="$(bash scripts/promote-desktop-aliases.sh releases/releases.osx-arm64.json "${{ steps.version.outputs.VERSION }}")"
grep -qx beta <<<"$aliases"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

2. Pull request lacks required issue links 📘 Rule violation § Compliance

The description begins with No tracker issue on either side and contains neither a GitHub closing
reference nor a Linear issue key. Without one reference line containing both identifiers, the change
cannot be connected to the tracker records required for review and audit.
Agent Prompt
## Issue description
The pull request description lacks the required reference line containing both a GitHub closing reference and a Linear issue key.

## Fix Focus Areas
- .github/workflows/ci.yml[223-224]

## Recommended Fix
Establish the required tracker records, then add one description line such as `Closes #123 AI-456` using the actual identifiers. Do not invent identifiers or place them in the pull request title.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@alexeyzimarev
alexeyzimarev merged commit 99128af into main Sep 10, 2026
7 checks passed
@alexeyzimarev
alexeyzimarev deleted the fix/ci-bundle-assert-stable-tag branch September 10, 2026 11:41
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