Skip to content

ci: adopt node-ci.yml reusable (org PR #19 landed)#60

Merged
WomB0ComB0 merged 2 commits into
mainfrom
ci/adopt-node-reusable
Apr 23, 2026
Merged

ci: adopt node-ci.yml reusable (org PR #19 landed)#60
WomB0ComB0 merged 2 commits into
mainfrom
ci/adopt-node-reusable

Conversation

@WomB0ComB0
Copy link
Copy Markdown
Member

@WomB0ComB0 WomB0ComB0 commented Apr 23, 2026

Summary

  • Switch client job from hand-rolled inline steps to the org-wide node-ci.yml reusable.
  • Bump required.yml ref to the merge commit of resq-software/.github#19 — the PR that parameterised cache-dependency-path, unblocking viz's subdirectory lockfile.
  • Keep client-budget as a companion job (bundle-size gate + artifact upload — reusable doesn't expose those).

Why

First adoption attempt failed with Dependencies lock file is not found because node-ci.yml hardcoded cache-dependency-path: package-lock.json at repo root, while viz's lockfile lives at src/ResQ.Viz.Web/package-lock.json. Upstream PR #19 made the path configurable; this PR consumes the fix.

Consuming node-ci.yml directly (not via required.yml) avoids a duplicate security-scan dispatch — viz already calls required.yml as lang: dotnet for the backend stream.

Test plan

  • gates (backend + security scan via required.yml) stays green.
  • client (new reusable call) installs + typechecks + builds.
  • client-budget runs after client and uploads viz-wwwroot-<sha>.
  • required aggregate passes.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated CI workflow to organize build processes into parallel execution streams for improved efficiency.
    • Refactored client build configuration to use standardized reusable workflow patterns for Node.js builds.
    • Added automated bundle size validation for JavaScript and CSS assets in the build pipeline.

Swap the hand-rolled frontend install+typecheck+build steps for the
org-wide node-ci.yml reusable. The prior adoption attempt failed with
"Dependencies lock file is not found" because the reusable hardcoded
`cache-dependency-path: package-lock.json` (repo root) — viz's lockfile
lives at src/ResQ.Viz.Web/package-lock.json.

resq-software/.github#19 parameterised `cache-dependency-path` on the
reusable; this PR consumes the merged SHA.

Call node-ci.yml directly rather than via required.yml because viz
already calls required.yml as `lang: dotnet` for the backend stream; a
second `lang: node` dispatch would duplicate the security-scan job.

client-budget stays as a companion — the reusable exposes neither
bundle outputs nor artifact upload, and the bundle-size ceiling is
viz-specific policy.

Ref pinned to merge commit 23ce94eabddf963835624451e89baca7ac9db541.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 23, 2026

Warning

Rate limit exceeded

@WomB0ComB0 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 40 minutes and 1 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 40 minutes and 1 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d09f7163-89fe-4b18-bf85-a786fc8a0674

📥 Commits

Reviewing files that changed from the base of the PR and between e0bd838 and 7f5428e.

⛔ Files ignored due to path filters (1)
  • src/ResQ.Viz.Web/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • src/ResQ.Viz.Web/package.json
📝 Walkthrough

Walkthrough

The CI workflow is restructured to parallelize frontend operations by introducing a new client-budget job for bundle enforcement while moving the client build to a reusable node-ci.yml workflow. The required aggregator is updated to await and validate results from both the client and client-budget jobs.

Changes

Cohort / File(s) Summary
CI Workflow Restructuring
.github/workflows/ci.yml
Refactored frontend pipeline by extracting the client job to use org's node-ci.yml reusable workflow (configured for npm, tsc, vite build in src/ResQ.Viz.Web), and moved bundle enforcement logic to a new parallel client-budget job. Updated required aggregator to depend on both client and client-budget, with extended environment variables and validation for budget results.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • resq-software/viz#55: Modifies the CI workflow's frontend pipeline—restructuring client build and bundle-size enforcement jobs (client vs. client-budget) and artifact uploads in .github/workflows/ci.yml.

Poem

🐰 The pipeline hops with parallel grace,
Client builds and budgets now keep their own pace,
Reusable workflows bring order so neat,
Where bundles stay lean and the checks stay complete! ✨

🚥 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 reflects the main change: adopting the organization's node-ci.yml reusable workflow, with a clear reference to the upstream PR that enabled this change.
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 ci/adopt-node-reusable

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 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/ci.yml (1)

102-123: ⚠️ Potential issue | 🟠 Major

Measure total emitted JS/CSS assets, not just index-*.

Lines 105–106 measure only index-*.js and index-*.css, but Vite 6.0.0 enables code splitting and CSS splitting by default. The stat glob will either fail if no files match, return a wrong value if multiple files match, or work only when exactly one file is present. Your vite.config.ts comment at lines 28–30 confirms you've experienced chunk proliferation: "Without this, Vite accumulates stale hash-renamed chunks across builds (9+ duplicates of the same 640 KB JS file at one point)." This budget gate cannot reliably measure all emitted assets.

Sum all JS/CSS files under wwwroot/assets instead:

Proposed fix
           set -euo pipefail
-          js=$(stat -c%s wwwroot/assets/index-*.js)
-          css=$(stat -c%s wwwroot/assets/index-*.css)
+          sum_bytes() {
+            label="$1"
+            pattern="$2"
+            stats=$(find wwwroot/assets -type f -name "$pattern" -printf '%s\n' |
+              awk '{ count += 1; bytes += $1 } END { printf "%d %d", count, bytes }')
+            set -- $stats
+            if [ "$1" -eq 0 ]; then
+              echo "::error::No $label assets found under wwwroot/assets" >&2
+              exit 1
+            fi
+            printf '%s\n' "$2"
+          }
+          js=$(sum_bytes JS '*.js')
+          css=$(sum_bytes CSS '*.css')
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml around lines 102 - 123, The bundle-size step
currently uses stat on a single glob (index-*.js / index-*.css) which breaks
when there are zero or multiple chunks; change the measurement to sum sizes of
all JS files and all CSS files under wwwroot/assets so variables js and css
represent total bytes emitted; update the summary table and the budget
comparisons that use BUNDLE_JS_BUDGET_BYTES and BUNDLE_CSS_BUDGET_BYTES and keep
the same error/notice logic (error messages referencing JS bundle and CSS bundle
remain valid) so the step reliably enforces the budget even with Vite
code-splitting.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In @.github/workflows/ci.yml:
- Around line 102-123: The bundle-size step currently uses stat on a single glob
(index-*.js / index-*.css) which breaks when there are zero or multiple chunks;
change the measurement to sum sizes of all JS files and all CSS files under
wwwroot/assets so variables js and css represent total bytes emitted; update the
summary table and the budget comparisons that use BUNDLE_JS_BUDGET_BYTES and
BUNDLE_CSS_BUDGET_BYTES and keep the same error/notice logic (error messages
referencing JS bundle and CSS bundle remain valid) so the step reliably enforces
the budget even with Vite code-splitting.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5f91c2b1-e964-4257-915d-089b94e6aa35

📥 Commits

Reviewing files that changed from the base of the PR and between 46f306f and e0bd838.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

osv-scanner surfaced GHSA-w5hq-g745-h8pq (medium) against uuid@13.0.0,
pulled transitively through effect@4.0.0-beta.52 → uuid: ^13.0.0.
effect hasn't bumped its caret yet.

Add a top-level npm `overrides` entry to force uuid@^14.0.0. uuid's
public surface (v4()/validate()/parse()) is unchanged across the
13→14 major, so effect's usage is unaffected.

Lockfile regenerated; typecheck + vite build both clean. Bundle size
unchanged (776 KB JS, within 800 KB budget).

This is an unrelated advisory bundled here only because it landed in
osv.dev between main's last build and this branch, and the gate now
blocks the CI-reusable-adoption signal we're verifying. Remove the
override once `effect` upstream bumps its `uuid: ^13.0.0` range.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@WomB0ComB0 WomB0ComB0 merged commit 18a9e76 into main Apr 23, 2026
37 checks passed
@WomB0ComB0 WomB0ComB0 deleted the ci/adopt-node-reusable branch April 23, 2026 01:02
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