Skip to content

fix: remove --ignore-scripts for crush install and add crush --version step#29735

Merged
pelikhan merged 2 commits intomainfrom
copilot/remove-ignore-scripts-crush-installation
May 2, 2026
Merged

fix: remove --ignore-scripts for crush install and add crush --version step#29735
pelikhan merged 2 commits intomainfrom
copilot/remove-ignore-scripts-crush-installation

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 2, 2026

Summary

Crush, like Claude Code, requires post-install scripts to download native binaries. With --ignore-scripts, these scripts are skipped and the binary is never downloaded, causing the crush command to fail at runtime.

Changes

  • pkg/workflow/crush_engine.go: Changed GetInstallationSteps to call GenerateNpmInstallSteps directly with runInstallScripts=true (removing --ignore-scripts), mirroring how the Claude engine handles its install. Also added a crush --version step after installation to force any deferred binary downloads.
  • pkg/workflow/crush_engine_test.go: Updated TestCrushEngineInstallation/standard_installation to assert:
    • No --ignore-scripts flag in the install command
    • A crush --version step is present
    • Tests use search loops instead of fragile hardcoded step indices
  • .github/workflows/smoke-crush.lock.yml: Recompiled — now shows npm install -g @charmland/crush@... (no --ignore-scripts) followed by crush --version

Copilot AI and others added 2 commits May 2, 2026 10:03
…n step

Crush, like Claude Code, requires post-install scripts to download
native binaries. Remove --ignore-scripts from the crush npm install
command and add a `crush --version` step to force deferred binary
download.

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/b1b42986-fd30-44bf-b8fd-6902520ce31d

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan pelikhan marked this pull request as ready for review May 2, 2026 10:05
Copilot AI review requested due to automatic review settings May 2, 2026 10:05
Copilot AI requested a review from pelikhan May 2, 2026 10:05
@pelikhan pelikhan added the smoke label May 2, 2026
@github-actions github-actions Bot mentioned this pull request May 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2026

🧪 Test Quality Sentinel Report

Test Quality Score: 100/100

Excellent test quality

Metric Value
New/modified tests analyzed 2 scenarios
✅ Design tests (behavioral contracts) 2 (100%)
⚠️ Implementation tests (low value) 0 (0%)
Tests with error/edge cases 2 (100%)
Duplicate test clusters 0
Test inflation detected No (ratio: 1.08:1)
🚨 Coding-guideline violations None

Test Classification Details

Test File Classification Issues Detected
TestCrushEngineInstallation / default installation — install step assertion pkg/workflow/crush_engine_test.go:~175 ✅ Design None
TestCrushEngineInstallation / default installation — version step assertion pkg/workflow/crush_engine_test.go:~185 ✅ Design None

Analysis

The modified test in TestCrushEngineInstallation now verifies two behavioral contracts:

  1. --ignore-scripts must NOT be present — enforces that Crush's post-install scripts (needed for native binary download) are not suppressed. Uses require.NotEmpty to guard if the step is missing, then assert.NotContains to verify the flag's absence.

  2. crush --version step must exist — enforces that a verification step is generated to force the native binary download. Uses require.NotEmpty + assert.Contains to confirm the step name.

Both assertions verify observable behavior that users and operators depend on. The use of require.NotEmpty as a guard before each assertion is correct — if the step isn't found, the test fails with a clear message before reaching the main assertion. All assertion calls include descriptive messages ✅.

Test inflation: 26 lines added to test vs. 24 to production — ratio 1.08:1, well within the 2:1 threshold ✅
Build tag: //go:build !integration present on line 1 ✅
No mock usage


Verdict

Check passed. 0% of new tests are implementation tests (threshold: 30%). All new test scenarios enforce behavioral contracts directly tied to the production change.


📖 Understanding Test Classifications

Design Tests (High Value) verify what the system does:

  • Assert on observable outputs, return values, or state changes
  • Cover error paths and boundary conditions
  • Would catch a behavioral regression if deleted
  • Remain valid even after internal refactoring

Implementation Tests (Low Value) verify how the system does it:

  • Assert on internal function calls (mocking internals)
  • Only test the happy path with typical inputs
  • Break during legitimate refactoring even when behavior is correct
  • Give false assurance: they pass even when the system is wrong

Goal: Shift toward tests that describe the system's behavioral contract — the promises it makes to its users and collaborators.


References: §25249510917

🧪 Test quality analysis by Test Quality Sentinel · ● 521.9K ·

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

✅ Test Quality Sentinel: 100/100. Test quality is excellent — 0% of new tests are implementation tests (threshold: 30%). All 2 new test scenarios enforce behavioral contracts directly tied to the production change.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2026

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions github-actions Bot removed the smoke label May 2, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2026

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2026

⚠️ Smoke Crush failed. Crush encountered unexpected challenges...

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes --ignore-scripts from the Crush CLI npm install so post-install hooks can download required native binaries, and adds a verification step to ensure the crush binary is available after install.

Changes:

  • Update Crush engine install step generation to allow npm install scripts and add a crush --version verification step.
  • Strengthen Crush engine installation tests to assert script execution is not disabled and the verification step exists.
  • Recompile the locked smoke-test workflow to reflect the new install + verify sequence.
Show a summary per file
File Description
pkg/workflow/crush_engine.go Enables npm post-install scripts for Crush install and appends a crush --version verification step.
pkg/workflow/crush_engine_test.go Updates installation test assertions to ensure --ignore-scripts is absent and the verification step is present.
.github/workflows/smoke-crush.lock.yml Updates compiled workflow output to match the new install command and added verification step.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 3/3 changed files
  • Comments generated: 1

Comment on lines +80 to +86
commandName := "crush"
if workflowData.EngineConfig != nil && workflowData.EngineConfig.Command != "" {
commandName = workflowData.EngineConfig.Command
}
versionStep := GitHubActionStep{
" - name: Verify Crush CLI installation",
" run: " + commandName + " --version",
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.

Ug! Me agree with other caveman reviewer. Dead code bad. Simplify good!

📰 BREAKING: Report filed by Smoke Copilot · ● 860K

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2026

🚀 Smoke OpenCode MISSION COMPLETE! OpenCode delivered. 🔥

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2026

⚠️ Smoke Gemini failed. Gemini encountered unexpected challenges...

@pelikhan pelikhan merged commit 395cfcc into main May 2, 2026
185 of 189 checks passed
@pelikhan pelikhan deleted the copilot/remove-ignore-scripts-crush-installation branch May 2, 2026 10:12
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2026

Agent Container Tool Check

Tool Status Version
bash 5.2.21
sh available
git 2.53.0
jq 1.7
yq 4.52.5
curl 8.5.0
gh 2.89.0
node 22.22.2
python3 3.10.16 (PyPy 7.3.19)
go 1.24.13
java 21.0.10 (Temurin)
dotnet 10.0.201

Result: 12/12 tools available ✅

Overall Status: PASS

🔧 Tool validation by Agent Container Smoke Test · ● 217.3K ·

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2026

Smoke Test Codex 25249581404: FAIL
PRs: #29733 feat: add gh-aw.trigger.comment_id to setup and conclusion OTLP spans; #29719 fix(ci): pass github.token via env mapping instead of direct run interpolation
✅ GitHub MCP, Serena MCP, Playwright, file write, bash verify, build, cache memory
❌ Web Fetch MCP unavailable; comment-memory files absent

Warning

Firewall blocked 2 domains

The following domains were blocked by the firewall during workflow execution:

  • ab.chatgpt.com
  • chatgpt.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "ab.chatgpt.com"
    - "chatgpt.com"

See Network Configuration for more information.

🔮 The oracle has spoken through Smoke Codex ·

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2026

Ooga booga! Smoke test caveman was here again! Me run many test. All pass! Fire good, code strong! 🔥🦴

📰 BREAKING: Report filed by Smoke Copilot · ● 860K ·

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2026

Smoke test done! ✅ PASS

  • GitHub MCP ✅ | MCP Scripts GH CLI ✅ | Serena CLI ✅ | Playwright ✅
  • Web Fetch ✅ | File Writing ✅ | Discussion Interaction ✅ | Build gh-aw ✅
  • Upload artifact ✅ | Discussion Creation ✅ | Haiku dispatch ✅ | PR Review ✅
    Overall: PASS 🔥 | PR: fix: remove --ignore-scripts for crush install
    By @copilot-swe-agent | Assignees: @pelikhan @Copilot

📰 BREAKING: Report filed by Smoke Copilot · ● 860K ·

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Me caveman reviewer. Fix good: remove --ignore-scripts right call. Version step helpful. But dead commandName code need cleanup. Overall: fire strong!

📰 BREAKING: Report filed by Smoke Copilot · ● 860K

}
versionStep := GitHubActionStep{
" - name: Verify Crush CLI installation",
" run: " + commandName + " --version",
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.

Ug! Me see commandName logic never reach here. Early return block above take over when EngineConfig.Command not empty. Maybe just use hardcoded crush --version?

"Install Crush CLI",
"crush",
workflowData,
true, // Include Node.js setup
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.

Me like version override! Good cave code. But maybe add log line when version overridden? Help debug later.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2026

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2026

Smoke Test 25249581408 — PARTIAL ✅

Core (#1–12): ✅✅✅✅✅✅✅✅✅✅✅✅
PR Review (#13–19): ✅✅✅⚠️✅✅⚠️

Skipped Reason
#16 Resolve Thread PRRT IDs require GraphQL
#19 Close PR No safe test PR

PR used: #29668

💥 [THE END] — Illustrated by Smoke Claude · ● 298.3K ·

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants