chore: centralize workspace yarn fix pipeline (RHIDP-14035) - #4568
Conversation
Add a shared fix script with CI-compatible --check mode, wire all workspaces to it, and exclude generated dist-dynamic output from global-header lint/format passes. Fixes: https://redhat.atlassian.net/browse/RHIDP-14035 Signed-off-by: Yi Cai <yicai@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
🤖 Finished Review · ✅ Success · Started 5:38 PM UTC · Completed 5:45 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Cost: $1.20 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4568 +/- ##
=======================================
Coverage 62.36% 62.37%
=======================================
Files 2607 2607
Lines 104739 104807 +68
Branches 29427 29450 +23
=======================================
+ Hits 65324 65371 +47
- Misses 38857 38873 +16
- Partials 558 563 +5
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Review — approvePR: chore: centralize workspace yarn fix pipeline (RHIDP-14035) SummaryThis PR introduces a centralized Correctness
Security
Intent & coherence
Style & conventions
Documentation
Ignore-file hygiene
Previous runReview — ApproveClean, well-structured change that centralizes the workspace What was reviewed
Findings (low — non-blocking)1.
|
Exclude generated dynamic plugin bundles from prettier --write so yarn fix does not traverse dist-dynamic/dist-scalprum output. Signed-off-by: Yi Cai <yicai@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
🤖 Finished Review · ✅ Success · Started 7:43 PM UTC · Completed 7:59 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Cost: $5.30 |
Replace the existing heap limit when a workspace sets an explicit rhdhFix.nodeOptions override, and add tests for the CI conflict path. Signed-off-by: Yi Cai <yicai@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
🤖 Review · ❌ Terminated · Started 2:51 AM UTC · Ended 3:04 AM UTC Commit: |
Superseded by updated review
|
🤖 Finished Review · ✅ Success · Started 2:51 AM UTC · Completed 3:04 AM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Cost: $4.92 |
Add an explicit pipeline assertion in the integration test and use top-level await for the CLI entry point. Signed-off-by: Yi Cai <yicai@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
🤖 Review · ❌ Terminated · Started 2:17 PM UTC · Ended 2:23 PM UTC Commit: |
|
|
🤖 Finished Review · ✅ Success · Started 2:17 PM UTC · Completed 2:23 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Cost: $1.12 |



Summary
scripts/workspace-fix.mjs, a shared fix pipeline invoked byyarn fixfrom each workspace rootCONTRIBUTING.mdyarn fix --checkfor CI (runsbackstage-cli repo fix --checkonly)NODE_OPTIONS=--max-old-space-size=8192for memory-heavy fixers, matching CIdist-dynamic/dist-scalprumfrom global-header lint/format passes to avoid OOM on generated bundlesFixed
yarn fixcommand at repo rootStory: Create a single
yarn fixscript that auto-corrects fixable lint, format, and code issues with a deterministic fixer order and central extensibility.Implementation notes: CI runs
yarn fixper changed workspace (not from the monorepo root), so the shared logic lives inscripts/workspace-fix.mjsand each workspace'sfixscript delegates to it. Optional fixers (sort-package-json,markdownlint,knip) are skipped when not installed;knip --fixremains opt-in viarhdhFix.knipor--knip.Fixes: https://redhat.atlassian.net/browse/RHIDP-14035
Test plan
yarn test:workspace-fix(20 unit tests)yarn fix --checkinworkspaces/global-headeryarn fixinworkspaces/global-header(lint no longer traversesdist-dynamic)yarn fix --checkstep on changed workspacesMade with Cursor