Skip to content

fix(shell): use [[ ]] conditionals in check-lock-sync.sh (SonarCloud bracket rule) - #133

Merged
hyperpolymath merged 1 commit into
mainfrom
sonarqube/bulk-sort
Oct 15, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
sonarqube/bulk-sort

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Converts 3 single-bracket conditional tests in scripts/check-lock-sync.sh to [[ ]] per the SonarCloud bulk-sort of assigned findings.

Verification: bash -n clean; shellcheck -S warning before/after delta is zero new findings; standalone run result identical to HEAD (exit status unchanged).

Pre-existing, not from this PR: this repo's check-lock-sync.sh already failed on main before this change (actions.lock drift vs workflow refs) — verified by running the HEAD version from git. That needs its own fix.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe vibe@mistral.ai

Converted 3 single-bracket
conditional tests in scripts/check-lock-sync.sh to [[ ]]. Verified:
bash -n clean; shellcheck -S warning delta zero new findings; standalone
run result unchanged vs HEAD.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 0be6513b-0c96-4fdb-b8cb-0ca29de98c49
📥 Commits

Reviewing files that changed from the base of the PR and between b34cd53 and b767fa0.

📒 Files selected for processing: 1
  • scripts/check-lock-sync.sh

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

⏰ Context from checks skipped due to timeout: 36
  • GitHub Check: pipeline / Secret scanning / gitleaks
  • GitHub Check: pipeline / SAST (semgrep)
  • GitHub Check: pipeline / Secret scanning / rust-secrets
  • GitHub Check: pipeline / Secret scanning / shell-secrets
  • GitHub Check: pipeline / Detect ecosystems
  • GitHub Check: hypatia / Hypatia Neurosymbolic Analysis
  • GitHub Check: governance / Guix packaging policy (Nix retired)
  • GitHub Check: governance / Live Actions policy (credentialed advisory)
  • GitHub Check: governance / Well-Known (RFC 9116 + RSR)
  • GitHub Check: governance / Workflow security linter
  • GitHub Check: governance / Licence consistency
  • GitHub Check: governance / Actions lockfile verify
  • GitHub Check: governance / Trusted-base reduction policy
  • GitHub Check: governance / Language / package anti-pattern policy
  • GitHub Check: governance / Exemption ratchet
  • GitHub Check: governance / Check Workflow Staleness
  • GitHub Check: governance / Allowlist Preflight
  • GitHub Check: governance / Debt ratchet
  • GitHub Check: governance / Code quality + docs
  • GitHub Check: governance / Security policy checks
  • GitHub Check: rust-ci / Detect Cargo.toml
  • GitHub Check: scan / gitleaks
  • GitHub Check: scan / shell-secrets
  • GitHub Check: scan / rust-secrets
  • GitHub Check: Validate eclexiaiser manifest
  • GitHub Check: Groove manifest check
  • GitHub Check: Empty-linter (invisible characters)
  • GitHub Check: Validate DEED manifests
  • GitHub Check: squabble action installs only the pinned, attested binary
  • GitHub Check: docs
  • GitHub Check: Validate K9 contracts
  • GitHub Check: check
  • GitHub Check: openssf-compliance
  • GitHub Check: lint
  • GitHub Check: estate-rules
  • GitHub Check: semgrep-cloud-platform/scan
⚠️ CI failures not shown inline: 2

GitHub Actions: Lock Sync Gate / 0_actions.lock is in sync with the workflow YAML.txt: fix(shell): use [[ ]] conditionals in check-lock-sync.sh (SonarCloud bracket rule)

Conclusion: failure

View job details

##[group]Run set -euo pipefail
 �[36;1mset -euo pipefail�[0m
 �[36;1mtest -x scripts/check-lock-sync.sh \�[0m
 �[36;1m  || { echo "::error::scripts/check-lock-sync.sh missing or not executable"; exit 1; }�[0m
...
      to github/codeql-action@<sha>.
   4. For any UNLISTED WORKFLOWS above, add the path as a lockfile key. A workflow
      with no uses: takes an empty list:  '.github/workflows/x.yml': []
      `gh actions-lock` has been observed to OMIT such a workflow entirely; that
      omission is itself the defect, so re-running the tool may not add it.
 ##[error]Process completed with exit code 1.

GitHub Actions: Lock Sync Gate / actions.lock is in sync with the workflow YAML: fix(shell): use [[ ]] conditionals in check-lock-sync.sh (SonarCloud bracket rule)

Conclusion: failure

View job details

##[group]Run set -euo pipefail
 �[36;1mset -euo pipefail�[0m
 �[36;1mtest -x scripts/check-lock-sync.sh \�[0m
 �[36;1m  || { echo "::error::scripts/check-lock-sync.sh missing or not executable"; exit 1; }�[0m
...
      to github/codeql-action@<sha>.
   4. For any UNLISTED WORKFLOWS above, add the path as a lockfile key. A workflow
      with no uses: takes an empty list:  '.github/workflows/x.yml': []
      `gh actions-lock` has been observed to OMIT such a workflow entirely; that
      omission is itself the defect, so re-running the tool may not add it.
 ##[error]Process completed with exit code 1.
🧰 Additional context used
📚 Code guidelines: 1
.github/copilot-instructions.md — auto-discovered
📓 Path-based instructions: 1
Source excerpt: SPDX: `MPL-2.0` on all new files.

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Files:

  • scripts/check-lock-sync.sh
🔇 Additional comments: 1
scripts/check-lock-sync.sh: 1

61-61: LGTM!

Also applies to: 67-67, 74-74

📝 Summary

Summary by CodeRabbit

  • Chores
    • Updated internal shell checks; their conditions and error messages remain unchanged.

The script changes the conditional syntax for its awk capability, lockfile existence and workflow-file checks. The checks and their failure messages remain unchanged.

Changes: Lock sync checks

Layer / File(s) Summary
Update check conditionals
scripts/check-lock-sync.sh
The awk capability, lockfile existence and workflow-file checks now use [[ ... ]] instead of [ ... ]. Their conditions and failure messages are unchanged.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Refactor

Merge Risk: ⚪ Minimal · up to b767f

The three conditionals change syntax without changing their checks or failure messages. The script’s supported CI invocation uses Bash, so no actionable merge-blocking risk is identified.

### Architecture Summary

Architecture risk: 🔵 Low · up to b767f

The change affects 1 system.

Changed systems: scripts

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — scripts (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in scripts/check-lock-sync.sh: The awk-support, lockfile-existence and workflow-file checks switch from [ ... ] to [[ ... ]]; the tests and their failure messages are unchanged.
Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description explains the change and provides verification details, but it omits the required Summary, Changes, RSR Quality Checklist, Testing, and Screenshots sections from the repository template… Update the description to use the repository template. Add the required Summary, Changes, RSR Quality Checklist, and Testing sections. Complete each applicable checklist item and state whether screenshots or terminal output are applicable.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the shell script change and its SonarCloud purpose.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
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.
Full details: Description check

Explanation

The description explains the change and provides verification details, but it omits the required Summary, Changes, RSR Quality Checklist, Testing, and Screenshots sections from the repository template. It also does not record the required checklist items.

🔄 Running Fix comments...

✨ Finishing Touches
🛠️ Fix failing CI checks
  • Commit to this branch
  • Create a new PR
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@sonarqubecloud

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

✅ Coding Agent task started: View task and status

The task will inspect the CI failures, validate its fix, and commit the fix to this branch automatically.

Note: Fixing CI failures is a beta feature and may encounter errors. Expect some limitations and changes as we gather feedback and continue to improve it.

@hyperpolymath
hyperpolymath merged commit 60e8f7a into main Oct 15, 2026
59 of 61 checks passed
@hyperpolymath
hyperpolymath deleted the sonarqube/bulk-sort branch October 15, 2026 23:18
@coderabbitai

coderabbitai Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Autofix could not be updated. Open Coding to check access and billing.

hyperpolymath added a commit that referenced this pull request Oct 20, 2026
…sure (#135)

## What was failing

Rust CI has been red on every run since 2026-10-16 ([run
38846539059](https://github.com/hyperpolymath/cicd-squabbler/actions/runs/38846539059)
and each one after it), dying in `rust-ci / Detect Cargo.toml` at **Set
up job**:

```
Unable to resolve action `actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1`: invalid lockfile pin. Run `gh actions-lock` to update the lockfile
```

Nothing in this repository changed between the last green run
(`60e8f7a`, 2026-10-15) and the first red one: the lock and the
workflows are byte-identical across the flip. GitHub began validating a
called reusable workflow against the **callee** repository's
`actions.lock` at the called SHA, and rejects a dependency record whose
`ref:` is the bare commit SHA instead of the tag it was resolved from.
standards' lock at `8f2ee50` and `da2c748` records
`actions/checkout@3d3c42e5…` with `ref: '3d3c42e5…'`; at `75bd599`
(standards main, 2026-10-19) the same record reads `ref: 'v7.0.1'`, and
callers pinned there create jobs again (hyperpolymath/hypatia#929
witnessed it first). A walk of standards' first-parent history shows 454
main commits from 2026-08-19 to 2026-10-19 carry such a record;
`75bd599` is the first that does not. Governance, Mirror, Secret
Scanner, Hypatia Scan, Scorecard and the standards pipeline were dying
the same way, so all seven callers move together.

## What this PR does

* Re-pins the seven standards callers to
`75bd5994470661a099df562d6d5ad2fe744dbd66`. The pipeline caller passes
no inputs, so the inputs `ci-pipeline.yml` dropped since `ed5e3f6` do
not affect it.
* Rebuilds `actions.lock` instead of patching it: one
`hyperpolymath/standards@75bd599` record whose `uses:` is the union of
what the seven called reusables use at that commit, and every
third-party record copied verbatim from standards' own lock at
`75bd599`, which GitHub accepts. The two actions this repository pins
directly by SHA (`actions/attest-build-provenance`,
`softprops/action-gh-release`) now carry the tag that resolves to their
commit (`v4.2.2`, `v3.0.3`). Records nothing references are pruned.
`scripts/check-lock-sync.sh`: in sync and transitively closed.
* Resyncs two Dependabot bumps the lock had been missing since #133
(`smtp-notify-action` v0.5.0; `upload-artifact` v7.0.2 /
`download-artifact` v8.0.2), which were startup-failing
`push-email-notify.yml` and `static-analysis-gate.yml`.
* Two rustdoc fixes in `squabble-core` for the strict warnings-denied
doc build of cicd-suite's Rust gate (hyperpolymath/cicd-suite#54):
public docs linked the private items `step_concluded` and `propose_for`.

## Verified locally

`cargo fmt --check`, `cargo clippy --all-targets --locked -D warnings`,
doctests, `cargo +1.85 check --workspace --locked` (the declared MSRV)
and `cargo doc --document-private-items` with `RUSTDOCFLAGS=-D warnings`
all pass. `scripts/check-lock-sync.sh` exits 0.

## Not in this PR

Calling cicd-suite's strict Rust gate and the SPARK gate (for
`spark/squabble_gate.gpr`) from here. This repository's lock-sync gate
requires every called reusable's transitive closure in `actions.lock`,
and that closure needs records for `EmbarkStudios/cargo-deny-action` and
`alire-project/setup-alire` whose numeric repository ids this session
cannot obtain (the GitHub API is scoped to the estate's own
repositories). hyperpolymath/plasma-parser-writer#108 is the first live
caller of the cicd-suite gate under the new callee-lock validation; what
it shows decides whether cicd-suite must key its gate workflows in its
own lock first. Either way the adoption here is a follow-up, with those
two ids or with `gh actions-lock` run by someone who can.

Commits on this branch are unsigned: no signing key is available in this
session (the configured key file is empty). GitHub signs the squash
merge.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01Xn9nqHVbUTRLgBdedoXAc8)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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