Skip to content

Fix shellcheck violations in safe-inputs server startup script - #6086

Merged
pelikhan merged 3 commits into
mainfrom
copilot/fix-shellcheck-issues
Dec 11, 2025
Merged

Fix shellcheck violations in safe-inputs server startup script#6086
pelikhan merged 3 commits into
mainfrom
copilot/fix-shellcheck-issues

Conversation

CopilotAI commented Dec 11, 2025

Copy link
Copy Markdown
Contributor

Resolves 10 shellcheck violations in pkg/workflow/sh/start_safe_inputs_server.sh that propagate to compiled workflow lock files.

Changes

SC2086: Quote variables to prevent globbing/word splitting

  • Quoted $GH_AW_SAFE_INPUTS_PORT in curl URL and grep patterns
  • Quoted $i in test comparison [ "$i" -eq 10 ]
  • Quoted $GITHUB_OUTPUT in redirect operations

SC2129: Use compound redirection

# Before: Multiple appendsecho"line1">> file.log
echo"line2">> file.log
# After: Single compound redirect
{
echo"line1"echo"line2"
} > file.log

SC2009: Replace ps | grep with pgrep

# Before
ps aux | grep '[m]cp-server.cjs'# After
pgrep -f 'mcp-server.cjs'

Recompiled all workflows to propagate fixes to daily-performance-summary.lock.yml and test-python-safe-input.lock.yml.

Original prompt

This section details on the original issue you should resolve

<issue_title>[plan] Fix shellcheck issues in test workflows</issue_title>
<issue_description>## Objective

Resolve 10 shellcheck issues across daily-performance-summary and test-python-safe-input workflows.

Context

Severity: Error
Tool: actionlint (shellcheck integration)
Affected Workflows:

  • daily-performance-summary (5 issues)
  • test-python-safe-input (5 issues)

Issues Breakdown

SC2086: Double quote to prevent globbing (4 occurrences)

Variables need quoting to prevent word splitting and globbing issues.

SC2129: Use compound redirection (2 occurrences)

Use { cmd1; cmd2; } >> file instead of multiple >> redirects for efficiency.

SC2009: Use pgrep instead of grepping ps (2 occurrences)

Replace fragile ps | grep patterns with more robust pgrep command.

Approach

  1. Locate the source markdown files for both workflows
  2. Find shell script blocks with the reported issues
  3. Apply shellcheck fixes:
    • Add double quotes around variables: $var"$var"
    • Combine redirections: cmd1 >> file; cmd2 >> file{ cmd1; cmd2; } >> file
    • Replace ps patterns: ps aux | grep patternpgrep pattern
  4. Recompile workflows with make recompile
  5. Verify with actionlint

Files to Modify

  • Edit: .github/workflows/daily-performance-summary.md
  • Edit: .github/workflows/test-python-safe-input.md
  • Generated: Corresponding .lock.yml files (via recompile)

Example Fixes

SC2086 Fix:

# Beforeecho$variable# Afterecho"$variable"

SC2129 Fix:

# Beforeecho"line1">> file.txt
echo"line2">> file.txt
# After
{
echo"line1"echo"line2"
} >> file.txt

SC2009 Fix:

# Before
ps aux | grep myprocess
# After
pgrep myprocess

Acceptance Criteria

  • All 4 SC2086 issues fixed with proper quoting
  • All 2 SC2129 issues fixed with compound redirects
  • All 2 SC2009 issues fixed with pgrep
  • Both workflows recompiled with make recompile
  • Actionlint shows no shellcheck errors for these workflows
  • Workflows execute correctly with shell script changes

Why This Matters

AI generated by Plan Command for discussion #5845

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.


Changeset

  • Type: patch
  • Description: Fix shellcheck violations in pkg/workflow/sh/start_safe_inputs_server.sh (quote variables, use compound redirection, replace ps | grep with pgrep) and recompile workflows to update lock files.

Ahoy! This treasure was crafted by 🏴‍☠️ Changeset Generator

- SC2086: Added double quotes around variables to prevent globbing
- SC2129: Used compound redirection for multiple echo statements
- SC2009: Replaced ps aux | grep with pgrep command
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
CopilotAI changed the title [WIP] Fix shellcheck issues in test workflowsFix shellcheck violations in safe-inputs server startup scriptDec 11, 2025
CopilotAI requested a review from pelikhanDecember 11, 2025 03:05
@pelikhan
pelikhan marked this pull request as ready for review December 11, 2025 03:07
@github-actions

Copy link
Copy Markdown
Contributor

📰🚀🔍👀📡🕵️ https://github.com/githubnext/gh-aw/actions/runs/20120591616

@github-actions

Copy link
Copy Markdown
Contributor

🔮 The ancient spirits stir... Smoke Codex awakens to divine this pull request...

@github-actions

Copy link
Copy Markdown
Contributor

💥 WHOOSH!Smoke Claude springs into action on this pull request! [Panel 1 begins...]

@github-actions

github-actionsBot commented Dec 11, 2025

Copy link
Copy Markdown
Contributor

🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰

d606ff6

@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

Copilot Smoke Test Results

  1. GitHub MCP: ❌ (HTTPS/HTTP protocol mismatch)
  2. File Writing: ✅
  3. Bash Tool: ✅
  4. Serena MCP: ✅ (Listed 5 Go files)
  5. Safe Input gh: ❌ (Same HTTPS/HTTP issue)

Status: FAIL

The safeinputs-gh tool has an HTTPS/HTTP protocol configuration issue preventing GitHub API access.

📰🔥📋 https://github.com/githubnext/gh-aw/actions/runs/20120591616 fer issue #6086 🗺️

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test Results - Run 20120591637

✅ GitHub MCP - Last 2 PRs: #6085, #6081
✅ File Writing
✅ Bash Tool
✅ Cache Memory
✅ Default Toolset (get_me unavailable as expected)

Status: PASS

📰 BREAKING: Report filed by Smoke Copilot fer issue #6086 🗺️

@github-actions

Copy link
Copy Markdown
Contributor

Latest merged PRs: [deps] Verify golang.org/x/sys v0.39.0 (no changes required); Fix missing GH_TOKEN in shared gh-aw MCP installation step
GitHub MCP fetch ✅
Agent file write/read ✅
Cache memory write/read ✅
Playwright title check ✅
safeinputs-gh gh issues list ❌ (command not found)
Overall: FAIL

🔮 The oracle has spoken through Smoke Codex fer issue #6086 🗺️

@github-actions

Copy link
Copy Markdown
Contributor

Claude Smoke Test Results

Last 2 Merged PRs:

Tests:

  • ✅ GitHub MCP: Retrieved recent PRs
  • ✅ File Writing: Created test file successfully
  • ✅ Bash Tool: File operations verified
  • ✅ Playwright MCP: Navigated to GitHub, page title contains "GitHub"
  • ✅ Cache Memory: Created and verified test file
  • ❌ Safe Input gh Tool: Binary not found at expected path

Status: FAIL (5/6 tests passed)

💥 [THE END] — Illustrated by Smoke Claude fer issue #6086 🗺️

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test Results (Run 20120591656)

✅ Playwright MCP: Successfully navigated to github.com (title: "GitHub · Change is constant. GitHub keeps you ahead. · GitHub")
✅ Cache Memory: Test file created and verified at /tmp/gh-aw/cache-memory/smoke-test-20120591656.txt
❌ Safe Input gh Tool: Failed with HTTP/HTTPS protocol error

Overall Status: FAIL (1 of 3 tests failed)

📰 BREAKING: Report filed by Smoke Copilot Playwright fer issue #6086 🗺️

@pelikhan
pelikhan merged commit 5660ad7 into mainDec 11, 2025
15 of 16 checks passed
@pelikhan
pelikhan deleted the copilot/fix-shellcheck-issues branch December 11, 2025 03:38
Sign up for freeto 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.

[plan] Fix shellcheck issues in test workflows

2 participants

@pelikhan