ci: add root-ci workflow to close root-only-PR blind spot - #243
Conversation
Strix Security ReviewNo security issues found. Updated for Reviewed by Strix |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdded a new GitHub Actions workflow for pull requests that touch root-level configuration files on ChangesRoot CI Workflow
Estimated code review effort: 1 (Trivial) | ~5 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
.github/workflows/root-ci.yml (1)
16-17: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low valueConsider adding a job
timeout-minutes.No timeout is set for
validate; a hungnpm cior docker step would otherwise run until the default GitHub Actions ceiling. A small explicit timeout is cheap insurance.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/root-ci.yml around lines 16 - 17, The validate job currently has no explicit timeout, so add a small job-level timeout to the validate job in the root CI workflow. Update the validate job definition itself (the one using runs-on: ubuntu-latest) to include timeout-minutes so hung steps like npm ci or docker won’t run indefinitely.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/root-ci.yml:
- Around line 19-20: The Checkout step in the root-ci workflow is leaving GitHub
credentials in the local git config, which exposes the token to later job steps.
Update the actions/checkout configuration to disable credential persistence by
setting persist-credentials to false on the existing Checkout step, since this
job does not need to push. Use the Checkout step in root-ci.yml as the place to
make the change.
- Around line 15-18: The validate job in the root CI workflow is missing an
explicit permissions block, so the default GITHUB_TOKEN scope is broader than
needed. Add a permissions section under the validate job in the workflow and
restrict it to the minimum read-only access required for this job, keeping the
change localized to the validate job definition.
---
Nitpick comments:
In @.github/workflows/root-ci.yml:
- Around line 16-17: The validate job currently has no explicit timeout, so add
a small job-level timeout to the validate job in the root CI workflow. Update
the validate job definition itself (the one using runs-on: ubuntu-latest) to
include timeout-minutes so hung steps like npm ci or docker won’t run
indefinitely.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 8713ec26-539f-4499-8363-613519dbe1f1
📒 Files selected for processing (1)
.github/workflows/root-ci.yml
|
All bot findings addressed and re-verified:
All 7 CI checks green, all 6 review threads resolved. Ready for merge. |
Summary
api-ci.ymlandui-ci.ymlare path-filtered toapps/api/**andapps/web/**respectively. A PR that only touches root-level files —docker-compose.yml, rootpackage.json/package-lock.json,commitlint.config.cjs,lint-staged.config.mjs,.husky/**, or any other.github/workflows/*.yml— triggers zero checks and merges with an empty/green status. GitHub's default CodeQL scanning (theAnalyze (*)checks visible on every PR) doesn't cover this either — that's security pattern scanning, not functional/syntax validation.Fixes #148
What changed
Added
.github/workflows/root-ci.yml, triggered onpull_requestwith paths covering exactly the root files not already covered by the other two workflows (plus.github/workflows/**broadly, so any workflow-file edit gets validated by something). Steps, kept intentionally minimal per the issue's "at minimum validates the compose/config files":docker compose config --quiet— validatesdocker-compose.ymlparses/resolvesnode --check lint-staged.config.mjs/node --check commitlint.config.cjs— syntax-only checks (no execution/side effects)npm ci— validates rootpackage.json/package-lock.jsonare consistent and installableDeliberately not duplicating
api-ci/ui-ci's fullnpm run validatehere — this workflow's job is only to close the root-file blind spot, not re-run existing coverage.Test plan
docker compose config --quiet, bothnode --checkcalls, andnpm ci --dry-run— all passroot-ciactually triggers (it touches.github/workflows/root-ci.yml, matching its own path filter) and passes for realAI assistance
Implemented with Claude Code (Sonnet 5).
Summary by CodeRabbit