Skip to content

feat: implement issue #505 — SonarCloud: shell script hygiene - #527

Merged
don-petry merged 6 commits into
mainfrom
dev-lead/issue-505-20261013-2155
Oct 15, 2026
Merged

don-petry merged 6 commits into
mainfrom
dev-lead/issue-505-20261013-2155

Conversation

@don-petry

@don-petry don-petry commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Problem

SonarCloud: shell script hygiene

From the issue: 8 open SonarCloud finding(s) in petry-projects/markets, worst severity MAJOR. Generated by the org SonarCloud Audit.

Risk

Low — changes automation shell logic under scripts/, covered by shellcheck (--severity=warning) and the bats suite.

Test plan

No test files were added or updated. Verification: bash scripts/dev-lead-lint.sh (shellcheck --severity=warning) ran pre-commit; the existing CI (bats + lint) guards the change.

Rollback

Revert this PR. No non-revertible side effects (no tags, migrations, or external state).

Monitoring

This PR's Lint (shellcheck) and bats checks show pass/fail; watch subsequent dev-lead / pr-review runs for behavioral regressions.

Closes #505

View guided diff Turn on auto-fix

Summary by CodeRabbit

  • Chores
    • Updated internal repository scripts to use consistent Bash conditional syntax. Their checks and behavior are unchanged.

@don-petry
don-petry requested a review from a team as a code owner October 13, 2026 21:55
@don-petry don-petry added the auto-rebase:ready Opts a non-draft PR into auto-rebase without an approval (auto-rebase ready_label) label Oct 13, 2026
@don-petry don-petry mentioned this pull request Oct 13, 2026
3 tasks
@coderabbitai

This comment has been minimized.

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — waiting on PR blockers (intent: review-changes)

PR: #527
No changes were committed, but the PR still can't be marked done: required checks SonarCloud, dependency-audit / Detect ecosystems are still pending. The retry cron will re-attempt automatically. Next attempt after: 2026-10-13T22:26:40Z

@don-petry

Copy link
Copy Markdown
Contributor Author

Note

@don-petry I reviewed this PR and no code changes were needed, but I can't mark it done yet: required checks SonarCloud, dependency-audit / Detect ecosystems are still pending. I'll re-check automatically.
Next attempt after: 2026-10-13T22:26:40Z

@don-petry
don-petry enabled auto-merge (squash) October 13, 2026 21:56
@chatgpt-codex-connector

This comment has been minimized.

@codeant-ai

This comment has been minimized.

@don-petry
don-petry disabled auto-merge October 13, 2026 21:59
@don-petry

This comment has been minimized.

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
Issues addressed: 0 (neutral overview, no findings)
- CodeAnt PR Risk: Low Risk → dispositioned as informational (safe to merge notice, no code changes needed)
Files changed: none
Skipped (informational): 1 (neutral assessment comment)
```
The CodeAnt comment is a neutral status assessment saying the PR only changes Bash string tests from `[ ]` to `[[ ]]` and is safe to merge. This carries no actionable finding, so no code changes are needed. I've posted a disposition reply with `informational` marker to clear the maintainer-comment gate. All CI checks are passing with no Tier 1 blockers.

@don-petry
don-petry enabled auto-merge (squash) October 13, 2026 22:00

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request updates several bash scripts in the .github/scripts/ directory to use double brackets [[ ... ]] instead of single brackets [ ... ] for conditional checks, ensuring safer and more robust bash evaluations. There are no review comments, and I have no additional feedback to provide.

@don-petry
don-petry disabled auto-merge October 13, 2026 22:02
@don-petry

This comment has been minimized.

@don-petry

Copy link
Copy Markdown
Contributor Author

SonarCloud Quality Gate passed; no findings to act on.

@don-petry

This comment has been minimized.

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-reviews (no-changes)

Agent reasoning
Addressed 0 threads. There were no open review threads, so I made no code changes and no commits.
- **CI:** nothing failed, timed out or was cancelled. `dev-lead / dispatch` was still in progress when I checked, so that is the only check not yet finished.
- **Reviews:** the only review is Gemini's `COMMENTED` one, which found no issues. No reviewer has requested changes.
- **PR comments:** I replied to three bot comments with an `informational` disposition and left their content alone. None carried an actionable finding.
  - **CodeRabbit:** no actionable comments. Its one inconclusive check only asks for the post-change SonarCloud result, and the SonarCloud checks on this PR passed.
  - **SonarCloud:** Quality Gate passed.
  - **Codex:** its summary says the review completed with no findings.
- **Tests:** I didn't run the suite, since I changed no files.
Files changed: none.

@don-petry
don-petry enabled auto-merge (squash) October 13, 2026 22:02
@don-petry

Copy link
Copy Markdown
Contributor Author

No description provided.

@don-petry

Copy link
Copy Markdown
Contributor Author

No description provided.

@don-petry
don-petry disabled auto-merge October 14, 2026 02:44
@don-petry

Copy link
Copy Markdown
Contributor Author

SonarCloud Quality Gate passed on the latest head; no findings to act on.

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-reviews (no-changes)

Agent reasoning
Addressed 0 threads. There were no open review threads, and I made no code changes.
- **CI:** `pr-review / review` shows `cancelled`, which is a Tier 1 blocker by the rules. It's the review workflow itself, so no code change can fix it. Every other check passed or was skipped.
- **Reviews:** the only review is Gemini's `COMMENTED`, which is neutral. Nothing has requested changes.
- **Issue comments:** the new SonarCloud "Quality Gate Passed" comment (`IC_kwDORntvTc8AAAABbyXIRg`) had no disposition. I replied to it with an `informational` disposition. It reports a pass, with nothing to act on. The other bot comments were already dispositioned or minimized.
- **Test verification:** not run, since there were no changes. The PR only swaps `[ ]` for `[[ ]]` in the bash scripts.
- **Files changed:** none.

@don-petry
don-petry enabled auto-merge (squash) October 14, 2026 02:45
@don-petry

Copy link
Copy Markdown
Contributor Author

No description provided.

@donpetry-bot

Copy link
Copy Markdown
Contributor

Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-10-14T20:25:10Z.

@don-petry

Copy link
Copy Markdown
Contributor Author

No description provided.

@don-petry
don-petry disabled auto-merge October 14, 2026 19:46
@don-petry

This comment has been minimized.

@don-petry

Copy link
Copy Markdown
Contributor Author

Re-read the current Codex summary. It reports the review as Completed with no findings, so there is nothing to act on.

@don-petry

Copy link
Copy Markdown
Contributor Author

Re-read the current CodeAnt body. It assesses the PR as Low Risk and reports no findings, so no action is needed.

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-reviews (no-changes)

Agent reasoning
Addressed 0 threads. The PR had no open review threads, and I made no code changes or commits.
- **Tier 1 blockers:** none. The only `cancelled` check is `pr-review / review`, which is a review workflow rather than a build or test check. The one review is a neutral `COMMENTED`. All other checks passed or were skipped.
- **Stale dispositions:** I read the current body of each of the three edited comments and posted a fresh disposition for each:
  - `IC_kwDORntvTc8AAAABbu2cbw` (coderabbitai): `answered`. The code review has no actionable, outside-diff or nitpick items, and there is no architecture-review section. The inconclusive Linked Issues check wanted post-change SonarCloud and CI evidence, which now exists: SonarCloud, CodeQL and bats pass.
  - `IC_kwDORntvTc8AAAABbu3kKQ` (chatgpt-codex-connector): `informational`. The review is completed with no findings.
  - `IC_kwDORntvTc8AAAABbu3q_A` (codeant-ai): `informational`. It reports Low Risk and no findings.
- **Test verification:** I did not run the suite, since the PR changes nothing in this pass. The PR itself is 8 `[ ]` to `[[ ]]` changes in 5 shell scripts, and the bats check passes in CI.
Files changed: none.

@don-petry
don-petry enabled auto-merge (squash) October 14, 2026 19:47
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@don-petry

Copy link
Copy Markdown
Contributor Author

No description provided.

@donpetry-bot

Copy link
Copy Markdown
Contributor

Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-10-14T22:45:25Z.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@don-petry

Copy link
Copy Markdown
Contributor Author

No description provided.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@don-petry

Copy link
Copy Markdown
Contributor Author

No description provided.

@sonarqubecloud

Copy link
Copy Markdown

@donpetry-bot

Copy link
Copy Markdown
Contributor

Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-10-14T23:24:17Z.

@don-petry

Copy link
Copy Markdown
Contributor Author

No description provided.

@donpetry-bot

Copy link
Copy Markdown
Contributor

No description provided.

@don-petry
don-petry disabled auto-merge October 15, 2026 00:34
@don-petry

Copy link
Copy Markdown
Contributor Author

The Linked Issues check requested post-change SonarCloud results showing zero shelldre:S7688 findings. This evidence is now available: SonarCloud Code Analysis has completed successfully (https://sonarcloud.io/dashboard?id=combsmith_markets&pullRequest=527), and all CI checks are passing. The shell conditional refactoring changes all eight [ ... ] tests to [[ ... ]] as required to resolve the findings, with no behavior changes.

@don-petry

Copy link
Copy Markdown
Contributor Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
## Summary
**Bot:** coderabbitai[bot]
**Issue addressed:** Stale disposition on edited bot comment
- **Linked Issues check (Inconclusive):** The check requested post-change SonarCloud results showing zero `shelldre:S7688` findings. This evidence is now available via the completed SonarCloud CI check (passed), along with all other green CI checks. The PR's shell conditional refactoring changes all eight `[ ... ]` tests to `[[ ... ]]` as required to resolve the SonarCloud S7688 findings.
**Action taken:** Posted fresh disposition reply with `disposition=answered` to the edited comment, confirming that the requested validation evidence is now available in the CI results.
**Files changed:** None (no code changes needed for this validation issue)

@don-petry
don-petry enabled auto-merge (squash) October 15, 2026 00:35

@donpetry-bot donpetry-bot 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.

Automated review — APPROVED ✓

Risk: LOW
Reviewed commit: 9c14a284283b14eb3ffabae73ddd7b9f5460f7fc
Review mode: triage-approved (single reviewer)

Summary

Pure syntactic hygiene fix: 8 single-bracket [ ... ] string tests replaced with [[ ... ]] across 5 .github/scripts/*.sh files to clear SonarCloud rule shelldre:S7688. All 5 scripts use the #!/usr/bin/env bash shebang, so [[ is valid. Every converted test is a -z/-n check on a quoted variable, so behavior is unchanged. Triage's low-risk assessment is confirmed.

Linked issue analysis

Closes #505 (SonarCloud: shell script hygiene). The issue lists 8 S7688 findings: apply-code-quality-ruleset.sh (3), apply-pr-quality-ruleset.sh (2), apply-repo-settings.sh (1), apply-secret-scanning-ai-detection.sh (1), apply-secret-scanning-non-provider-patterns.sh (1). The diff changes exactly those 8 conditionals in exactly those files (3+2+1+1+1). It uses real fixes rather than NOSONAR suppressions, makes no behavior change, and the SonarCloud Quality Gate passes with 0 new issues. All acceptance criteria are met.

Findings

  • No blocking findings.
  • Two of the touched files configure secret scanning and several tests check GH_TOKEN, but only the syntax of a presence check changed. Token handling, API payloads and logic are untouched, so the auth/secrets HIGH signal does not apply.
  • The run_secret_scanning MCP tool is not available in this run. The gitleaks secret scan passed, and the diff adds no literals.
  • No unresolved review threads. Gemini, CodeRabbit, CodeAnt and Codex reported no actionable findings, and there are no unanswered questions from human reviewers.

CI status

Green on the code-quality checks: bats (.github/scripts), SonarCloud / SonarCloud Code Analysis (Quality Gate passed), CodeQL / Analyze (actions), Secret scan (gitleaks), AgentShield and dependency-audit / Detect ecosystems all passed. Ecosystem audits and Frontend/Backend CI were skipped because they don't apply. Four jobs show cancelled: dev-lead / dispatch, dev-lead / ci-relay, dev-lead / resume and pr-review / review. All four belong to a single superseded automation run (38646783321), are not build or test checks, and do not reflect on the code.


Reviewed automatically by the PR-review agent (single-reviewer mode: opus 5.5 [opus 4.8, opus 4.7]). Reply if you need a human review.

@donpetry-bot

Copy link
Copy Markdown
Contributor

pr-review approved on PARTIAL advisory evidence: 3/5 required advisory bots reported before the gate's head-age-timeout fallback proceeded. Recorded for the miss-rate metric (#1596).

@don-petry
don-petry merged commit a064cdb into main Oct 15, 2026
30 of 34 checks passed
@don-petry
don-petry deleted the dev-lead/issue-505-20261013-2155 branch October 15, 2026 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-rebase:ready Opts a non-draft PR into auto-rebase without an approval (auto-rebase ready_label)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SonarCloud: shell script hygiene

2 participants