Skip to content

refactor(ci): consolidate workspace CI jobs with dynamic matrix detection (2 of 4)#1560

Merged
jeanduplessis merged 2 commits intomainfrom
refactor/eradicate-eslint-2-ci
Mar 26, 2026
Merged

refactor(ci): consolidate workspace CI jobs with dynamic matrix detection (2 of 4)#1560
jeanduplessis merged 2 commits intomainfrom
refactor/eradicate-eslint-2-ci

Conversation

@jeanduplessis
Copy link
Copy Markdown
Contributor

@jeanduplessis jeanduplessis commented Mar 25, 2026

Summary

PR series: 2 of 4 — merge in order: #1559 oxlint → this PR#1561 email → #1562 trpc

Restructure CI to replace 6 hardcoded per-workspace jobs with a single dynamic matrix job:

  • Add scripts/changed-workspaces.sh — detects which workspaces have file changes and a test script, outputs a JSON matrix for GitHub Actions
  • Replace webhook-agent, security-auto-analysis, kiloclaw, app-builder, cloudflare jobs with a single workspace-tests matrix job
  • Keep cloud-agent and cloud-agent-next as dedicated jobs (they need bun and custom build steps)
  • Add kilocode_backend change filter to skip test/build jobs when only worker code changes
  • Gate test, build, cloud-agent*, and workspace-tests on typecheck + lint + format-check + drizzle-check passing first
  • Move dependency-cycle-check into the test job (eliminates a separate CI runner)
  • Simplify root typecheck script to root-only (workspaces now checked via typecheck-all.sh in CI)
  • Use scripts/lint-all.sh and scripts/typecheck-all.sh in the lint and typecheck CI jobs

Verification

  • scripts/lint-all.sh — pass
  • scripts/typecheck-all.sh --changes-only — pass
  • pnpm format:check — pass
  • CI workflow YAML validated by reviewing the diff

Visual Changes

N/A

Reviewer Notes

  • changed-workspaces.sh uses git merge-base origin/main HEAD to detect which workspace dirs have changes, then filters to only those with a test script in package.json. It outputs JSON consumable by fromJson() in the GitHub Actions matrix strategy.
  • cloud-agent and cloud-agent-next are excluded from the dynamic matrix because they require bun and a custom wrapper build step that doesn't fit the generic pattern.
  • This PR targets the PR1 branch (refactor/eradicate-eslint-1-oxlint). After refactor: remove ESLint and port all lint rules to oxlint (1 of 4) #1559 merges, retarget this to main.

Comment thread .github/workflows/ci.yml
@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot bot commented Mar 25, 2026

Code Review Summary

Status: 3 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 3
SUGGESTION 0

Fix these issues in Kilo Cloud

Issue Details (click to expand)

WARNING

File Line Issue
.github/workflows/ci.yml 44 kilocode_backend still omits pnpm-workspace.yaml, so workspace-graph changes can skip the root test and build jobs.
scripts/changed-workspaces.sh 29 shared_changed still ignores the root package.json, so shared dependency changes can leave workspace_matrix empty and skip workspace tests.
Other Observations (not in diff)

Issues found in unchanged code that cannot receive inline comments:

File Line Issue
scripts/typecheck-all.sh 55 --changes-only still only falls back to a full workspace run for pnpm-workspace.yaml, so shared root inputs like package.json or tsconfig.json can skip workspace typecheck.
Files Reviewed (3 files)
  • .github/workflows/ci.yml - 1 issue
  • scripts/changed-workspaces.sh - 1 issue
  • scripts/typecheck-all.sh - 1 issue

Reviewed by gpt-5.4-20260305 · 230,198 tokens

@jeanduplessis jeanduplessis force-pushed the refactor/eradicate-eslint-2-ci branch 3 times, most recently from 16ab028 to f5b86da Compare March 25, 2026 21:26
Comment thread scripts/changed-workspaces.sh
…tion

- Replace 6 hardcoded per-workspace CI jobs with a single dynamic matrix job
- Add scripts/changed-workspaces.sh for automatic workspace change detection
- Use scripts/lint-all.sh and scripts/typecheck-all.sh in CI
- Add kilocode_backend change filter to skip test/build when only workers change
- Gate test/build/workspace jobs on lint+typecheck+format+drizzle passing
- Move dependency-cycle-check into test job (eliminates separate CI runner)
- Simplify root typecheck to root-only (workspaces checked via typecheck-all.sh)
@jeanduplessis jeanduplessis force-pushed the refactor/eradicate-eslint-1-oxlint branch from 7e2f356 to 9a0f8ef Compare March 25, 2026 21:33
@jeanduplessis jeanduplessis force-pushed the refactor/eradicate-eslint-2-ci branch from f5b86da to 6e68d12 Compare March 25, 2026 21:33
…d dependency changes

- Add pnpm-lock.yaml, next.config.mjs, jest.config.ts, postcss.config.mjs,
  sentry.*, and tsconfig.*.json to the kilocode_backend change filter so
  config-only changes still trigger test and build jobs
- Treat all workspaces as changed when pnpm-lock.yaml, pnpm-workspace.yaml,
  or packages/** are modified, since shared dependency updates can break
  any downstream workspace
Base automatically changed from refactor/eradicate-eslint-1-oxlint to main March 26, 2026 00:08
@jeanduplessis jeanduplessis enabled auto-merge March 26, 2026 00:08
auto-merge was automatically disabled March 26, 2026 00:12

Pull request was closed

@jeanduplessis jeanduplessis reopened this Mar 26, 2026
@jeanduplessis jeanduplessis merged commit 8422662 into main Mar 26, 2026
13 checks passed
@jeanduplessis jeanduplessis deleted the refactor/eradicate-eslint-2-ci branch March 26, 2026 00:17
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.

2 participants