Skip to content

fix(ci): unblock the check job — shellcheck OOM + missing dashboard dep install#52

Merged
webdevtodayjason merged 2 commits into
mainfrom
fix/ci-shellcheck-binsubctl-hang
Jun 3, 2026
Merged

fix(ci): unblock the check job — shellcheck OOM + missing dashboard dep install#52
webdevtodayjason merged 2 commits into
mainfrom
fix/ci-shellcheck-binsubctl-hang

Conversation

@webdevtodayjason

@webdevtodayjason webdevtodayjason commented Jun 3, 2026

Copy link
Copy Markdown
Owner

CI's check job has been red on main since ~May 28. Because the job is sequential, a single early failure masked everything after it. This PR fixes the chain so the job runs green end-to-end.

Fix 1 — shellcheck OOM (the visible failure)

The Shellcheck step ran ~76 min then signal 9 (OOM). Root cause: shellcheck follows a source statement whenever the target is also in the input list, regardless of -x. bin/subctl sources the whole lib/ tree, so the single xargs invocation built a runaway source graph. The macos-15-arm64 image rotation (20260527) lowered RAM headroom enough to tip slow→OOM (matching the onset).

  • Check bin/subctl in its own invocation, without -x (no source targets co-present → ~0.2s).
  • Add # shellcheck shell=bash to the 6 no-shebang sourced libs so they pass standalone.

Confirmed on the runner: in the first #52 run the Shellcheck step went green and the job reached the next step in ~30s.

Fix 2 — dashboard build-check had no bun install (masked downstream failure)

With shellcheck unblocked, the next step failed: bun build dashboard/server.ts with no prior install → Could not resolve: @earendil-works/pi-ai / smol-toml / shell-quote. This had been failing the whole time, hidden behind the OOM.

  • Add a bun install --frozen-lockfile for components/evy and dashboard (both have committed bun.lock) before the build-check.

Validation (local, runner-identical env)

  • shellcheck: batch 5.5s + bin/subctl 0.2s, both exit 0 (was 76-min OOM)
  • frozen installs: exit 0, lockfiles in sync
  • bun build dashboard/server.ts: bundles 2006 modules
  • deck go vet ./... + go build: exit 0

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated CI workflow to change how shellcheck runs on macOS runners—separating a problematic script to avoid resource issues and adding explanatory comments about the behavior.
    • Added shellcheck directives to multiple shell scripts to improve linting configuration.

…llowing

CI's `check` job has been red on main since ~May 28 (macos-15-arm64 runner
image 20260527): the shellcheck step was SIGKILLed after ~76 min.

Root cause: shellcheck follows a `source` statement whenever the target is
also in the input list — regardless of `-x`. bin/subctl sources the entire
lib/ tree, so the single xargs invocation built a combinatorial source graph
rooted at bin/subctl and ran away (~76 min → OOM on the lower-RAM runner;
merely slow locally, which is why it wasn't caught).

Fix:
- Check bin/subctl in its own invocation, alone, without -x (no source
  targets co-present → ~0.2s, no graph explosion).
- Give the 6 no-shebang sourced libs a `# shellcheck shell=bash` directive
  so they pass standalone without bin/subctl's -x context (the idiomatic
  SC2148 fix for sourced fragments).

Validated locally on shellcheck 0.11.0 / macos-15-arm64 (identical to the
runner): batch 5.5s + bin/subctl 0.2s, both exit 0; previously 76-min OOM.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cbe0a1cb-7952-4f8e-affb-4f3f42a0efcd

📥 Commits

Reviewing files that changed from the base of the PR and between cb6ca6d and 6f3ee91.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/ci.yml

📝 Walkthrough

Walkthrough

The PR reconfigures shellcheck linting to prevent out-of-memory failures on macOS: the CI workflow splits shellcheck execution (batch checking all scripts except bin/subctl with -x, then checking bin/subctl separately without -x), and six library files each receive a # shellcheck shell=bash directive for consistent linting context.

Changes

ShellCheck Configuration

Layer / File(s) Summary
CI workflow split shellcheck strategy
.github/workflows/ci.yml
The check job's shellcheck step now excludes bin/subctl from the batch run with -x and performs a separate shellcheck invocation on bin/subctl without -x, with comments explaining this avoids macOS runner OOM caused by expanded source graphs.
Library files shell type directives
lib/backfill.sh, lib/cognee.sh, lib/memori.sh, lib/memory-kernel.sh, lib/memory-tier1.sh, lib/voice.sh
Each library script receives an identical # shellcheck shell=bash directive at the first line to explicitly configure ShellCheck to analyze the scripts as Bash.

🎯 2 (Simple) | ⏱️ ~10 minutes

🐰 Six scripts now speak Bash so clear,
The CI split avoids the OOM fear,
ShellCheck directives, a cohesive sight,
Linting the library scripts just right!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely summarizes the main fix: addressing the shellcheck OOM issue that was blocking the CI check job and adding missing dashboard dependency installation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ci-shellcheck-binsubctl-hang

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

The "Build-check dashboard" step ran `bun build` with no prior install, so
imports (@earendil-works/pi-ai, smol-toml, shell-quote) couldn't resolve.
It failed every run but was masked for a week behind the shellcheck OOM at
the earlier step. Install both workspaces (committed bun.lock lockfiles)
before building.

Validated locally: frozen installs exit 0 (lockfiles in sync); the exact
CI command `bun build dashboard/server.ts` bundles 2006 modules; deck
`go vet ./...` + `go build` also pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@webdevtodayjason webdevtodayjason changed the title fix(ci): stop shellcheck OOM — check bin/subctl without source-following fix(ci): unblock the check job — shellcheck OOM + missing dashboard dep install Jun 3, 2026
@webdevtodayjason
webdevtodayjason merged commit 08bec67 into main Jun 3, 2026
2 checks passed
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