Skip to content

feat(ci): unify local and GitHub CI execution paths#123

Merged
K1ngst0m merged 1 commit intomainfrom
dev/unifiy-ci-local
Mar 10, 2026
Merged

feat(ci): unify local and GitHub CI execution paths#123
K1ngst0m merged 1 commit intomainfrom
dev/unifiy-ci-local

Conversation

@K1ngst0m
Copy link
Copy Markdown
Collaborator

@K1ngst0m K1ngst0m commented Mar 10, 2026

  • Establish one lane-based CI entrypoint for format, test, and analysis flows
  • Make GitHub Actions call the same Pixi-backed commands used locally
  • Add container execution support to improve CI parity across environments
  • Fold shader-backed headless tests into the shared validation path

Summary by CodeRabbit

  • Chores
    • Consolidated CI checks into lane-based execution and added a local CI orchestration script.
    • Added a containerized local runner for consistent development and CI runs.
  • Tests
    • Enhanced headless test setup with a specific shader configuration for integration and smoke tests.
  • Documentation
    • Updated CLI help/documentation for running CI tasks locally and in containers.

@qodo-code-review
Copy link
Copy Markdown

Review Summary by Qodo

Unify local and GitHub CI execution with lane-based entrypoint and container support

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Unified CI execution with single ci.sh entrypoint supporting format, build-test, and
  static-analysis lanes
• Added container runner support for improved CI parity across local and GitHub Actions environments
• Implemented stage-based timing metrics and hierarchical summary reporting for CI visibility
• Refactored GitHub Actions workflows to call unified Pixi-backed commands instead of inline steps
• Enhanced headless tests with shader parameter support for improved test coverage
Diagram
flowchart LR
  A["CI Entrypoint<br/>ci.sh"] --> B["Lane Selection"]
  B --> C["format"]
  B --> D["build-test"]
  B --> E["static-analysis"]
  C --> F["Host Runner"]
  D --> F
  E --> F
  C --> G["Container Runner"]
  D --> G
  E --> G
  F --> H["Stage Metrics<br/>& Summary"]
  G --> H
  I["GitHub Actions<br/>Workflows"] --> A
  J["Local Development"] --> A
Loading

Grey Divider

File Changes

1. scripts/task/ci.sh ✨ Enhancement +616/-0

New unified CI entrypoint with lane and runner support

• New comprehensive CI orchestration script with 616 lines implementing lane-based execution
 (format, build-test, static-analysis)
• Supports dual runners: host (local execution) and container (Docker/Podman with cache management)
• Implements stage timing metrics collection with hierarchical reporting and formatted elapsed time
 display
• Includes container image resolution, cache preparation, and device passthrough for GPU access
• Provides format checking via clang-format and taplo, build/test via ASAN preset, and static
 analysis via semgrep

scripts/task/ci.sh


2. ci/local-runner/Dockerfile ⚙️ Configuration changes +20/-0

New CI container image with graphics support

• New Docker image based on pixi:0.63.2 with minimal dependencies for CI execution
• Installs essential tools: bash, git, binutils, ca-certificates
• Includes graphics libraries (libdrm2, libegl1, libgbm1, libgles2, libvulkan1, mesa-vulkan-drivers)
 for GPU support
• Sets working directory to /work for repository mounting

ci/local-runner/Dockerfile


3. .github/workflows/ci.yml ✨ Enhancement +6/-34

Refactored workflows to use unified CI entrypoint

• Replaced inline format checking steps (clang-format, taplo, git diff) with single `pixi run -e
 lint ci-format` call
• Consolidated build and test steps into unified pixi run ci --lane build-test command
• Replaced separate semgrep and clang-tidy steps with single pixi run ci --lane static-analysis
 command
• Simplified workflow by delegating all CI logic to unified shell script

.github/workflows/ci.yml


View more (3)
4. pixi.toml ⚙️ Configuration changes +8/-0

Added CI task definitions to Pixi configuration

• Added new ci task that invokes scripts/task/ci.sh for local CI execution
• Added ci-format task in lint environment that runs format-check lane specifically
• Tasks support lane, runner, and cache-mode parameters for flexible CI execution

pixi.toml


5. scripts/task/help.sh 📝 Documentation +5/-0

Updated help documentation with CI command usage

• Added documentation for new pixi run ci command with lane, runner, and cache-mode options
• Included usage examples showing host and container execution patterns
• Documented all available lanes (format, build-test, static-analysis) and cache modes (warm, cold)

scripts/task/help.sh


6. tests/CMakeLists.txt ✨ Enhancement +3/-0

Enhanced headless tests with shader parameter

• Added shader parameter to headless integration test using CRT Lottes Fast shader
• Added shader parameter to headless smoke test with same shader configuration
• Shader path defined as HEADLESS_TEST_SHADER variable pointing to retroarch shader

tests/CMakeLists.txt


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown

qodo-code-review bot commented Mar 10, 2026

Code Review by Qodo

🐞 Bugs (2) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Action required

1. clang-format version mismatch 🐞 Bug ✓ Correctness
Description
GitHub format-check runs ci-format in the lint environment, but the lock resolves
clang-format/tools 21.1.7 there while the default environment used by pixi run format resolves
21.1.6. This can cause CI to fail after developers run the local formatter (or vice versa) because
the tool versions differ.
Code

pixi.toml[R179-185]

clang-tools = "21.*"
taplo = "==0.9.3"

+[feature.lint.tasks.ci-format]
+description = "Run the local CI format-check lane"
+cmd = "bash scripts/task/ci.sh --lane format"
+
Evidence
The workflow explicitly runs the format check in the lint environment. The lockfile shows different
clang-format/tools versions between the default and lint environments, while pixi run format uses
clang-format from the default environment PATH, creating a concrete local/CI mismatch.

.github/workflows/ci.yml[28-39]
pixi.toml[90-93]
pixi.lock[18-27]
pixi.lock[238-265]
pixi.toml[177-185]

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

### Issue description
CI format-check (`pixi run -e lint ci-format`) and local formatting (`pixi run format`) currently run different clang-format/tools versions (21.1.7 vs 21.1.6 per pixi.lock), risking inconsistent formatting results.

### Issue Context
- Default environment uses clang-tools 21.1.6.
- Lint environment allows 21.* and currently resolves to 21.1.7.
- Workflow uses lint env for format-check; developers are instructed to run `pixi run format` (default env).

### Fix Focus Areas
- pixi.toml[90-93]
- pixi.toml[177-185]
- pixi.lock[1-266]
- .github/workflows/ci.yml[20-40]

### Suggested change
- Pin `feature.lint.dependencies.clang-tools` to the same exact version as default (e.g., `==21.1.6`) **or** update default to match lint and re-lock.
- Regenerate `pixi.lock` so both environments resolve the same clang-format/tools artifacts.
- Optional: run `format` using the lint environment (or re-home `ci-format` to default) so both paths share the same toolchain.

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



Remediation recommended

2. Host lane skips CI env 🐞 Bug ⛯ Reliability
Description
scripts/task/ci.sh runs host lanes without setting CI/GITHUB_ACTIONS before invoking CMake presets,
so CMake’s CI-only test disabling won’t apply and pixi run ci on host can run GPU-dependent tests
that CI skips. This breaks the stated goal of unified local vs GitHub CI behavior and can cause
flaky/local-only failures.
Code

scripts/task/ci.sh[R574-586]

+set +e
+case "$LANE" in
+  all)
+    run_timed_stage 0 "format lane" run_format_lane
+    status=$?
+    if [[ $status -eq 0 ]]; then
+      run_timed_stage 0 "build-test lane" run_build_test_lane
+      status=$?
+    fi
+    if [[ $status -eq 0 ]]; then
+      run_timed_stage 0 "static-analysis lane" run_static_analysis_lane
+      status=$?
+    fi
Evidence
The container runner explicitly injects CI/GITHUB_ACTIONS into the environment, but the host runner
path immediately executes the lanes without exporting those vars. Tests/CMakeLists.txt disables
headless/GPU-dependent tests only when ENV{CI} or ENV{GITHUB_ACTIONS} is defined at configure time,
and the build lane runs cmake --preset (configure) without those vars on host.

scripts/task/ci.sh[296-309]
scripts/task/ci.sh[574-600]
scripts/task/build.sh[1-6]
tests/CMakeLists.txt[266-304]

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

### Issue description
Host-mode `pixi run ci` does not set `CI` / `GITHUB_ACTIONS`, so CMake configure-time conditionals that disable CI-only/GPU-dependent tests don’t apply locally, diverging from GitHub Actions behavior.

### Issue Context
CMake checks `ENV{CI}` / `ENV{GITHUB_ACTIONS}` during configuration to disable certain tests. The container runner sets these env vars; the host runner does not.

### Fix Focus Areas
- scripts/task/ci.sh[500-616]
- scripts/task/ci.sh[414-459]

### Suggested change
- Before invoking any lane that runs CMake configure (build-test/static-analysis), export `CI=true` (and optionally `GITHUB_ACTIONS=true`) in the host-runner path, or introduce a dedicated flag (e.g. `--ci-env on|off`) defaulting to `on` for parity.
- Alternatively, prefix the build/test stage commands with `CI=true GITHUB_ACTIONS=true ...` so it applies at configure time without globally mutating the shell env.

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


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 10, 2026

📝 Walkthrough

Walkthrough

Consolidates CI steps into lane-based invocations: adds scripts/task/ci.sh, updates GitHub Actions to call ci lanes, adds a CI runner Dockerfile, adds pixi tasks for CI, extends help text, and passes a shader path into headless tests.

Changes

Cohort / File(s) Summary
GitHub CI workflow
.github/workflows/ci.yml
Replaced multiple explicit steps with single lane-based ci invocations (format-check, build-and-test, static-analysis).
CI orchestration script
scripts/task/ci.sh
New CI orchestration script implementing lanes (format, build-test, static-analysis), host/container runners, engine detection (Docker/Podman), timing/metrics, cache modes, and error propagation.
Local runner image
ci/local-runner/Dockerfile
New Dockerfile based on pixi image, installs shell/tools and graphics/Vulkan libs, sets workdir for containerized CI execution.
Pixi task config
pixi.toml
Added tasks.ci and feature.lint.tasks.ci-format entries to expose CI lanes to pixi.
Help text
scripts/task/help.sh
Added help and examples for pixi run ci including --lane, --runner, and --cache-mode flags.
Tests config
tests/CMakeLists.txt
Added HEADLESS_TEST_SHADER variable and passed --shader argument to headless test targets.

Sequence Diagram(s)

sequenceDiagram
  participant Dev as "Developer (CLI)"
  participant CIsh as "scripts/task/ci.sh"
  participant Engine as "Container Engine\n(Docker/Podman)"
  participant Image as "CI Container Image"
  participant Host as "Host FS / Cache"
  participant Tests as "Build & Test Tools"

  Dev->>CIsh: invoke with --lane / --runner / --cache-mode
  CIsh->>CIsh: validate args, select lane(s)
  alt runner = container
    CIsh->>Engine: resolve engine (docker/podman)
    Engine->>CIsh: engine available
    CIsh->>Image: build or pull ci/local-runner image
    CIsh->>Engine: run container with volumes (Host)
    Engine->>Image: start container
    Image->>CIsh: execute lane commands inside container
    Image->>Host: read/write caches & stage metrics (mounted volumes)
    Image->>Tests: run format/build/test/static-analysis
    Tests-->>Image: results, artifacts
    Image->>Engine: exit
  else runner = host
    CIsh->>Tests: run lane commands on host (clang-format, build, semgrep...)
    Tests-->>CIsh: results, artifacts
  end
  CIsh->>CIsh: collect stage timings, write metrics TSV (optional)
  CIsh->>Dev: print summary and exit status
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

Review effort 3/5

Suggested reviewers

  • zhangzhousuper

Poem

🐰 In lanes we hop, from host to shell,
Docker hums and Podman as well,
Format, build, and static spy,
Metrics dance and tests comply,
A little rabbit cheers—CI goes well! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main objective of the changeset: unifying local and GitHub CI execution paths through a lane-based CI orchestration system.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev/unifiy-ci-local

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (3)
scripts/task/ci.sh (2)

435-439: The semgrep version check may be redundant.

The semgrep --version stage will fail if semgrep isn't available, but so will the subsequent semgrep scan. Consider whether this explicit check adds value or if it's just a timing artifact.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/task/ci.sh` around lines 435 - 439, The semgrep version check is
redundant because the later semgrep scan will already fail if semgrep is
missing; remove the explicit version-check block that calls run_timed_stage with
"semgrep --version", the status capture and the conditional return (references:
run_timed_stage, semgrep --version, status variable) so the pipeline relies on
the actual semgrep scan step to surface absence/errors and avoid an extra timing
artifact.

296-319: Quote the environment variable value to prevent potential word splitting.

On line 308, the variable $metrics_container_path should be quoted. While this specific path is unlikely to contain spaces, consistent quoting prevents subtle bugs.

🔧 Proposed fix
   run_args+=(
     --user "$(id -u):$(id -g)"
     -e CI=true
     -e GITHUB_ACTIONS=true
     -e HOME=/tmp/goggles-home
     -e PIXI_HOME=/tmp/goggles-pixi-home
     -e PIXI_CACHE_DIR=/tmp/goggles-pixi-cache
     -e CCACHE_DIR=/tmp/goggles-ccache
     -e TMPDIR=/tmp/goggles-tmp
     -e XDG_RUNTIME_DIR=/tmp/goggles-runtime
     -e GOGGLES_CI_IN_CONTAINER=1
     -e GOGGLES_CI_SUPPRESS_SUMMARY=1
-    -e GOGGLES_CI_STAGE_METRICS_FILE=$metrics_container_path
+    -e "GOGGLES_CI_STAGE_METRICS_FILE=$metrics_container_path"
     -v "$REPO_ROOT:/work"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/task/ci.sh` around lines 296 - 319, The -e environment assignment
using the variable metrics_container_path in the run_args array is unquoted and
can cause word splitting; update the run_args entry that sets
GOGGLES_CI_STAGE_METRICS_FILE to quote the variable (use
"$metrics_container_path") so the run_args array contains a single safe token;
locate the run_args array construction and modify the line with -e
GOGGLES_CI_STAGE_METRICS_FILE to use the quoted variable.
ci/local-runner/Dockerfile (1)

3-3: Consider adding a non-root user after package installation.

While ci.sh overrides the user at runtime via --user "$(id -u):$(id -g)", setting a non-root default in the Dockerfile provides defense-in-depth and silences security scanners. This is flagged by Trivy (DS-0002).

🛡️ Proposed fix
 RUN apt-get update -o Acquire::Retries=3 \
     && apt-get install -y --no-install-recommends \
         bash \
         binutils \
         ca-certificates \
         git \
         libdrm2 \
         libegl1 \
         libgbm1 \
         libgles2 \
         libvulkan1 \
         mesa-vulkan-drivers \
         xwayland \
     && rm -rf /var/lib/apt/lists/*
+
+RUN useradd -m -s /bin/bash ciuser
+USER ciuser

 WORKDIR /work
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@ci/local-runner/Dockerfile` at line 3, The Dockerfile currently sets USER
root; add a non-root user and switch to it after installing packages to satisfy
scanners and provide defense-in-depth: create a dedicated user/group (e.g., via
addgroup/adduser or useradd), set appropriate ownership on any runtime
directories/artifacts the container needs, and replace the final USER root line
with USER <nonroot-username> (ensure any build-stage operations that need root
happen before creating/chowning and switching). Update any references to runtime
paths if needed so the new user can access them.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@ci/local-runner/Dockerfile`:
- Line 3: The Dockerfile currently sets USER root; add a non-root user and
switch to it after installing packages to satisfy scanners and provide
defense-in-depth: create a dedicated user/group (e.g., via addgroup/adduser or
useradd), set appropriate ownership on any runtime directories/artifacts the
container needs, and replace the final USER root line with USER
<nonroot-username> (ensure any build-stage operations that need root happen
before creating/chowning and switching). Update any references to runtime paths
if needed so the new user can access them.

In `@scripts/task/ci.sh`:
- Around line 435-439: The semgrep version check is redundant because the later
semgrep scan will already fail if semgrep is missing; remove the explicit
version-check block that calls run_timed_stage with "semgrep --version", the
status capture and the conditional return (references: run_timed_stage, semgrep
--version, status variable) so the pipeline relies on the actual semgrep scan
step to surface absence/errors and avoid an extra timing artifact.
- Around line 296-319: The -e environment assignment using the variable
metrics_container_path in the run_args array is unquoted and can cause word
splitting; update the run_args entry that sets GOGGLES_CI_STAGE_METRICS_FILE to
quote the variable (use "$metrics_container_path") so the run_args array
contains a single safe token; locate the run_args array construction and modify
the line with -e GOGGLES_CI_STAGE_METRICS_FILE to use the quoted variable.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b221ec52-dd9b-4675-b65a-57a7e8dc22fe

📥 Commits

Reviewing files that changed from the base of the PR and between d8170a7 and f7050bb.

📒 Files selected for processing (6)
  • .github/workflows/ci.yml
  • ci/local-runner/Dockerfile
  • pixi.toml
  • scripts/task/ci.sh
  • scripts/task/help.sh
  • tests/CMakeLists.txt

Comment on lines 179 to +185
clang-tools = "21.*"
taplo = "==0.9.3"

[feature.lint.tasks.ci-format]
description = "Run the local CI format-check lane"
cmd = "bash scripts/task/ci.sh --lane format"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. Clang-format version mismatch 🐞 Bug ✓ Correctness

GitHub format-check runs ci-format in the lint environment, but the lock resolves
clang-format/tools 21.1.7 there while the default environment used by pixi run format resolves
21.1.6. This can cause CI to fail after developers run the local formatter (or vice versa) because
the tool versions differ.
Agent Prompt
### Issue description
CI format-check (`pixi run -e lint ci-format`) and local formatting (`pixi run format`) currently run different clang-format/tools versions (21.1.7 vs 21.1.6 per pixi.lock), risking inconsistent formatting results.

### Issue Context
- Default environment uses clang-tools 21.1.6.
- Lint environment allows 21.* and currently resolves to 21.1.7.
- Workflow uses lint env for format-check; developers are instructed to run `pixi run format` (default env).

### Fix Focus Areas
- pixi.toml[90-93]
- pixi.toml[177-185]
- pixi.lock[1-266]
- .github/workflows/ci.yml[20-40]

### Suggested change
- Pin `feature.lint.dependencies.clang-tools` to the same exact version as default (e.g., `==21.1.6`) **or** update default to match lint and re-lock.
- Regenerate `pixi.lock` so both environments resolve the same clang-format/tools artifacts.
- Optional: run `format` using the lint environment (or re-home `ci-format` to default) so both paths share the same toolchain.

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

- Establish one lane-based CI entrypoint for format, test, and analysis flows
- Make GitHub Actions call the same Pixi-backed commands used locally
- Add container execution support to improve CI parity across environments
- Fold shader-backed headless tests into the shared validation path
@K1ngst0m K1ngst0m force-pushed the dev/unifiy-ci-local branch from f7050bb to 952bbcb Compare March 10, 2026 03:04
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
ci/local-runner/Dockerfile (1)

3-3: Consider adding a non-root user for defense-in-depth.

The static analysis tool flagged that the last USER is root. While the ci.sh script correctly overrides this at runtime with --user "$(id -u):$(id -g)" (line 297), adding a non-root default user provides defense-in-depth if the container is ever invoked without the user override.

♻️ Suggested improvement
     && rm -rf /var/lib/apt/lists/*

+RUN useradd -m -s /bin/bash -u 1000 ciuser
+USER ciuser
+
 WORKDIR /work
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@ci/local-runner/Dockerfile` at line 3, Replace the final USER root with a
non-root default by adding a dedicated user and group in the Dockerfile (e.g.,
create user "ci" with a non-zero UID/GID, chown relevant workspace and tool dirs
to that user) and set USER to that non-root account instead of root; keep the
existing ci.sh runtime override (which uses --user) intact but ensure the
Dockerfile contains the createuser + chown steps and the final USER ci entry so
the container defaults to non-root for defense-in-depth while still supporting
the script’s runtime user override.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@scripts/task/ci.sh`:
- Line 308: The environment variable assignment for
GOGGLES_CI_STAGE_METRICS_FILE is unquoted which can cause word-splitting; update
the Docker -e argument to quote the value by changing the assignment that uses
$metrics_container_path so it becomes a quoted expansion (i.e., use
"$metrics_container_path") wherever GOGGLES_CI_STAGE_METRICS_FILE is set in the
script to ensure safe handling of spaces or special characters.

---

Nitpick comments:
In `@ci/local-runner/Dockerfile`:
- Line 3: Replace the final USER root with a non-root default by adding a
dedicated user and group in the Dockerfile (e.g., create user "ci" with a
non-zero UID/GID, chown relevant workspace and tool dirs to that user) and set
USER to that non-root account instead of root; keep the existing ci.sh runtime
override (which uses --user) intact but ensure the Dockerfile contains the
createuser + chown steps and the final USER ci entry so the container defaults
to non-root for defense-in-depth while still supporting the script’s runtime
user override.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 650b0120-0ac9-4a3b-b9d5-eadf9384fafb

📥 Commits

Reviewing files that changed from the base of the PR and between f7050bb and 952bbcb.

📒 Files selected for processing (6)
  • .github/workflows/ci.yml
  • ci/local-runner/Dockerfile
  • pixi.toml
  • scripts/task/ci.sh
  • scripts/task/help.sh
  • tests/CMakeLists.txt
🚧 Files skipped from review as they are similar to previous changes (3)
  • scripts/task/help.sh
  • tests/CMakeLists.txt
  • .github/workflows/ci.yml

-e XDG_RUNTIME_DIR=/tmp/goggles-runtime
-e GOGGLES_CI_IN_CONTAINER=1
-e GOGGLES_CI_SUPPRESS_SUMMARY=1
-e GOGGLES_CI_STAGE_METRICS_FILE=$metrics_container_path
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Quote the environment variable assignment to prevent word splitting.

The static analysis tool flagged this line. While $metrics_container_path is unlikely to contain spaces in practice, quoting the value is defensive and consistent with shell best practices.

🔧 Proposed fix
-    -e GOGGLES_CI_STAGE_METRICS_FILE=$metrics_container_path
+    -e "GOGGLES_CI_STAGE_METRICS_FILE=$metrics_container_path"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
-e GOGGLES_CI_STAGE_METRICS_FILE=$metrics_container_path
-e "GOGGLES_CI_STAGE_METRICS_FILE=$metrics_container_path"
🧰 Tools
🪛 Shellcheck (0.11.0)

[warning] 308-308: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a.

(SC2206)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/task/ci.sh` at line 308, The environment variable assignment for
GOGGLES_CI_STAGE_METRICS_FILE is unquoted which can cause word-splitting; update
the Docker -e argument to quote the value by changing the assignment that uses
$metrics_container_path so it becomes a quoted expansion (i.e., use
"$metrics_container_path") wherever GOGGLES_CI_STAGE_METRICS_FILE is set in the
script to ensure safe handling of spaces or special characters.

@K1ngst0m K1ngst0m merged commit f1af663 into main Mar 10, 2026
4 checks passed
@K1ngst0m K1ngst0m deleted the dev/unifiy-ci-local branch March 10, 2026 03:20
@coderabbitai coderabbitai bot mentioned this pull request Mar 10, 2026
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