Skip to content

chore: fix windows builds#9511

Merged
evereq merged 1 commit intostagefrom
develop
Feb 24, 2026
Merged

chore: fix windows builds#9511
evereq merged 1 commit intostagefrom
develop

Conversation

@evereq
Copy link
Member

@evereq evereq commented Feb 24, 2026

PR

Please note: we will close your PR without comment if you do not check the boxes above and provide ALL requested information.



Summary by cubic

Fixes Windows CI builds by increasing Node file handling capacity, patching fs for EMFILE retries, and disabling Nx Cloud. Applied across agent, desktop apps, and server workflows for x64 and arm64.

  • Bug Fixes
    • Set UV_THREADPOOL_SIZE=32 and patched graceful-fs to reduce EMFILE errors on Windows.
    • Disabled Nx Cloud in Windows jobs (NX_NO_CLOUD=true) for more predictable builds.
    • Removed yarn/Nx cache steps from Windows workflows to avoid cache-related failures.
    • Updated all Windows build pipelines: agent, desktop app, desktop timer app, server, server-api, and server-mcp (prod and stage).

Written for commit 409025c. Summary will update on new commits.

@evereq evereq merged commit efca5b1 into stage Feb 24, 2026
18 of 20 checks passed
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 24, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch develop

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.

@sonarqubecloud
Copy link

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 24, 2026

Greptile Summary

Modified Windows build workflows across all production and staging pipelines to address file handle exhaustion issues. Changes include removing yarn/NX cache steps, increasing Node.js UV threadpool size to 32, and disabling NX Cloud (NX_NO_CLOUD: true).

Key changes:

  • Removed GitHub Actions caching for yarn and NX (likely due to cache restoration causing file handle issues on Windows)
  • Added UV_THREADPOOL_SIZE=32 environment variable to increase parallel I/O capacity
  • Disabled NX Cloud functionality to reduce network/file operations during builds
  • Attempted graceful-fs patching (currently ineffective - see comment)

Issue found:

  • The graceful-fs patching runs in an isolated node -e process that exits immediately, so it won't affect the actual build process. This pattern appears consistently across all 12 workflow files.

Confidence Score: 3/5

  • Safe to merge with one logical flaw that reduces effectiveness
  • The changes correctly increase UV threadpool size and disable caching/NX cloud which should help with file handle issues. However, the graceful-fs patching logic is fundamentally broken - it runs in an isolated process and has no effect on the build. This won't cause failures but won't provide the intended benefit either.
  • All workflow files have the same graceful-fs patching issue (line 435 in x64 jobs, line 607 in ARM64 jobs), but this is a minor optimization issue rather than a breaking problem

Important Files Changed

Filename Overview
.github/workflows/agent-prod.yml Removed yarn cache, added UV_THREADPOOL_SIZE=32, disabled NX cloud, graceful-fs patch ineffective
.github/workflows/desktop-app-prod.yml Removed yarn cache, added UV_THREADPOOL_SIZE=32, disabled NX cloud, graceful-fs patch ineffective
.github/workflows/server-prod.yml Removed yarn cache, added UV_THREADPOOL_SIZE=32, disabled NX cloud, graceful-fs patch ineffective

Last reviewed commit: 409025c

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

12 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

# Increase Node.js UV threadpool for parallel I/O (default is 4)
"UV_THREADPOOL_SIZE=32" | Out-File -FilePath $env:GITHUB_ENV -Append
# Patch graceful-fs to retry EMFILE errors with backoff
node -e "try { var gfs = require('graceful-fs'); gfs.gracefulify(require('fs')); console.log('graceful-fs patched'); } catch(e) { console.log('graceful-fs not available, skipping'); }"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

graceful-fs patching in one-off node -e call has no effect on subsequent build step

The node -e command patches graceful-fs only within its own process, which exits immediately. The build step that runs afterward won't inherit this patch. graceful-fs needs to be required/patched at the start of the actual build scripts.

Suggested change
node -e "try { var gfs = require('graceful-fs'); gfs.gracefulify(require('fs')); console.log('graceful-fs patched'); } catch(e) { console.log('graceful-fs not available, skipping'); }"
# graceful-fs must be patched in build scripts, not here

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

13 issues found across 12 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/workflows/desktop-timer-app-prod.yml">

<violation number="1" location=".github/workflows/desktop-timer-app-prod.yml:433">
P2: Missing `-Encoding utf8` corrupts `GITHUB_ENV`, and the `node -e` command fails to patch `graceful-fs` for subsequent build steps.</violation>
</file>

<file name=".github/workflows/server-prod.yml">

<violation number="1" location=".github/workflows/server-prod.yml:435">
P2: Running `node -e` applies the `graceful-fs` patch to an ephemeral process rather than the subsequent build steps, rendering it completely ineffective.</violation>
</file>

<file name=".github/workflows/server-mcp-stage.yml">

<violation number="1" location=".github/workflows/server-mcp-stage.yml:434">
P2: The `graceful-fs` patch executed via `node -e` is dead code. It only applies to the temporary node process it spawns and will not prevent `EMFILE` errors in subsequent build steps.</violation>
</file>

<file name=".github/workflows/agent-prod.yml">

<violation number="1" location=".github/workflows/agent-prod.yml:433">
P1: Missing `-Encoding utf8` causes `Out-File` to write UTF-16LE, corrupting the GitHub Actions environment file.</violation>

<violation number="2" location=".github/workflows/agent-prod.yml:435">
P2: Patching `graceful-fs` in an ephemeral `node -e` script is a no-op that does not affect subsequent build steps.</violation>
</file>

<file name=".github/workflows/agent-stage.yml">

<violation number="1" location=".github/workflows/agent-stage.yml:435">
P2: This inline script is ineffective. In-memory patches to `graceful-fs` are isolated to this single ephemeral process and will not be inherited by subsequent Node.js processes (like `yarn build`).</violation>
</file>

<file name=".github/workflows/server-api-prod.yml">

<violation number="1" location=".github/workflows/server-api-prod.yml:435">
P2: Running `gfs.gracefulify` via `node -e` only patches the `fs` module in the memory of this short-lived process. It has no effect on subsequent Node.js steps.</violation>
</file>

<file name=".github/workflows/server-mcp-prod.yml">

<violation number="1" location=".github/workflows/server-mcp-prod.yml:433">
P1: The `node -e` command is ineffective as it only patches `graceful-fs` for its own short-lived process. Also, `Out-File` without `-Encoding utf8` writes UTF-16LE in Windows PowerShell, corrupting `$env:GITHUB_ENV`.</violation>
</file>

<file name=".github/workflows/desktop-timer-app-stage.yml">

<violation number="1" location=".github/workflows/desktop-timer-app-stage.yml:433">
P2: Missing `-Encoding utf8` will corrupt `$GITHUB_ENV` with UTF-16LE bytes. Also, the `node -e` inline script is dead code because patching `fs` only affects that short-lived process.</violation>
</file>

<file name=".github/workflows/desktop-app-prod.yml">

<violation number="1" location=".github/workflows/desktop-app-prod.yml:435">
P1: The `graceful-fs` patch is applied to a transient Node.js process and will not affect the actual build step.</violation>
</file>

<file name=".github/workflows/server-api-stage.yml">

<violation number="1" location=".github/workflows/server-api-stage.yml:435">
P2: This inline `graceful-fs` patch is completely ineffective because Node.js monkey-patches do not persist across different processes.</violation>
</file>

<file name=".github/workflows/desktop-app-stage.yml">

<violation number="1" location=".github/workflows/desktop-app-stage.yml:435">
P1: Monkey-patching `fs` in a one-off `node -e` script is a no-op because the patch will not persist to subsequent processes. Furthermore, increasing `UV_THREADPOOL_SIZE` to 32 increases the concurrency of file operations, which makes `EMFILE` errors *more* likely without a working `graceful-fs` patch.

To apply this globally for later build steps, you need to create a setup file and load it using `NODE_OPTIONS`:
```powershell
"try { require('graceful-fs').gracefulify(require('fs')); } catch(e) {}" | Out-File -FilePath patch-fs.js -Encoding utf8
"NODE_OPTIONS=--require ./patch-fs.js" | Out-File -FilePath $env:GITHUB_ENV -Append
```</violation>
</file>

<file name=".github/workflows/server-stage.yml">

<violation number="1" location=".github/workflows/server-stage.yml:433">
P1: Using `Out-File` without `-Encoding utf8` in PowerShell 5.1 writes UTF-16LE, which corrupts the `$GITHUB_ENV` file. Additionally, the inline `node -e` script is dead code because Node.js patches do not persist across processes. Add `-Encoding utf8` and remove the useless node script in both jobs.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

shell: powershell
run: |
# Increase Node.js UV threadpool for parallel I/O (default is 4)
"UV_THREADPOOL_SIZE=32" | Out-File -FilePath $env:GITHUB_ENV -Append
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Missing -Encoding utf8 causes Out-File to write UTF-16LE, corrupting the GitHub Actions environment file.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/agent-prod.yml, line 433:

<comment>Missing `-Encoding utf8` causes `Out-File` to write UTF-16LE, corrupting the GitHub Actions environment file.</comment>

<file context>
@@ -442,6 +426,14 @@ jobs:
+        shell: powershell
+        run: |
+          # Increase Node.js UV threadpool for parallel I/O (default is 4)
+          "UV_THREADPOOL_SIZE=32" | Out-File -FilePath $env:GITHUB_ENV -Append
+          # Patch graceful-fs to retry EMFILE errors with backoff
+          node -e "try { var gfs = require('graceful-fs'); gfs.gracefulify(require('fs')); console.log('graceful-fs patched'); } catch(e) { console.log('graceful-fs not available, skipping'); }"
</file context>
Fix with Cubic

shell: powershell
run: |
# Increase Node.js UV threadpool for parallel I/O (default is 4)
"UV_THREADPOOL_SIZE=32" | Out-File -FilePath $env:GITHUB_ENV -Append
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: The node -e command is ineffective as it only patches graceful-fs for its own short-lived process. Also, Out-File without -Encoding utf8 writes UTF-16LE in Windows PowerShell, corrupting $env:GITHUB_ENV.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/server-mcp-prod.yml, line 433:

<comment>The `node -e` command is ineffective as it only patches `graceful-fs` for its own short-lived process. Also, `Out-File` without `-Encoding utf8` writes UTF-16LE in Windows PowerShell, corrupting `$env:GITHUB_ENV`.</comment>

<file context>
@@ -442,6 +426,14 @@ jobs:
+        shell: powershell
+        run: |
+          # Increase Node.js UV threadpool for parallel I/O (default is 4)
+          "UV_THREADPOOL_SIZE=32" | Out-File -FilePath $env:GITHUB_ENV -Append
+          # Patch graceful-fs to retry EMFILE errors with backoff
+          node -e "try { var gfs = require('graceful-fs'); gfs.gracefulify(require('fs')); console.log('graceful-fs patched'); } catch(e) { console.log('graceful-fs not available, skipping'); }"
</file context>
Fix with Cubic

# Increase Node.js UV threadpool for parallel I/O (default is 4)
"UV_THREADPOOL_SIZE=32" | Out-File -FilePath $env:GITHUB_ENV -Append
# Patch graceful-fs to retry EMFILE errors with backoff
node -e "try { var gfs = require('graceful-fs'); gfs.gracefulify(require('fs')); console.log('graceful-fs patched'); } catch(e) { console.log('graceful-fs not available, skipping'); }"
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: The graceful-fs patch is applied to a transient Node.js process and will not affect the actual build step.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/desktop-app-prod.yml, line 435:

<comment>The `graceful-fs` patch is applied to a transient Node.js process and will not affect the actual build step.</comment>

<file context>
@@ -442,6 +426,14 @@ jobs:
+          # Increase Node.js UV threadpool for parallel I/O (default is 4)
+          "UV_THREADPOOL_SIZE=32" | Out-File -FilePath $env:GITHUB_ENV -Append
+          # Patch graceful-fs to retry EMFILE errors with backoff
+          node -e "try { var gfs = require('graceful-fs'); gfs.gracefulify(require('fs')); console.log('graceful-fs patched'); } catch(e) { console.log('graceful-fs not available, skipping'); }"
+
       - name: Build Desktop App
</file context>
Fix with Cubic

# Increase Node.js UV threadpool for parallel I/O (default is 4)
"UV_THREADPOOL_SIZE=32" | Out-File -FilePath $env:GITHUB_ENV -Append
# Patch graceful-fs to retry EMFILE errors with backoff
node -e "try { var gfs = require('graceful-fs'); gfs.gracefulify(require('fs')); console.log('graceful-fs patched'); } catch(e) { console.log('graceful-fs not available, skipping'); }"
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Monkey-patching fs in a one-off node -e script is a no-op because the patch will not persist to subsequent processes. Furthermore, increasing UV_THREADPOOL_SIZE to 32 increases the concurrency of file operations, which makes EMFILE errors more likely without a working graceful-fs patch.

To apply this globally for later build steps, you need to create a setup file and load it using NODE_OPTIONS:

"try { require('graceful-fs').gracefulify(require('fs')); } catch(e) {}" | Out-File -FilePath patch-fs.js -Encoding utf8
"NODE_OPTIONS=--require ./patch-fs.js" | Out-File -FilePath $env:GITHUB_ENV -Append
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/desktop-app-stage.yml, line 435:

<comment>Monkey-patching `fs` in a one-off `node -e` script is a no-op because the patch will not persist to subsequent processes. Furthermore, increasing `UV_THREADPOOL_SIZE` to 32 increases the concurrency of file operations, which makes `EMFILE` errors *more* likely without a working `graceful-fs` patch.

To apply this globally for later build steps, you need to create a setup file and load it using `NODE_OPTIONS`:
```powershell
"try { require('graceful-fs').gracefulify(require('fs')); } catch(e) {}" | Out-File -FilePath patch-fs.js -Encoding utf8
"NODE_OPTIONS=--require ./patch-fs.js" | Out-File -FilePath $env:GITHUB_ENV -Append
```</comment>

<file context>
@@ -442,6 +426,14 @@ jobs:
+          # Increase Node.js UV threadpool for parallel I/O (default is 4)
+          "UV_THREADPOOL_SIZE=32" | Out-File -FilePath $env:GITHUB_ENV -Append
+          # Patch graceful-fs to retry EMFILE errors with backoff
+          node -e "try { var gfs = require('graceful-fs'); gfs.gracefulify(require('fs')); console.log('graceful-fs patched'); } catch(e) { console.log('graceful-fs not available, skipping'); }"
+
       - name: Build Desktop App
</file context>
Fix with Cubic

shell: powershell
run: |
# Increase Node.js UV threadpool for parallel I/O (default is 4)
"UV_THREADPOOL_SIZE=32" | Out-File -FilePath $env:GITHUB_ENV -Append
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Using Out-File without -Encoding utf8 in PowerShell 5.1 writes UTF-16LE, which corrupts the $GITHUB_ENV file. Additionally, the inline node -e script is dead code because Node.js patches do not persist across processes. Add -Encoding utf8 and remove the useless node script in both jobs.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/server-stage.yml, line 433:

<comment>Using `Out-File` without `-Encoding utf8` in PowerShell 5.1 writes UTF-16LE, which corrupts the `$GITHUB_ENV` file. Additionally, the inline `node -e` script is dead code because Node.js patches do not persist across processes. Add `-Encoding utf8` and remove the useless node script in both jobs.</comment>

<file context>
@@ -442,6 +426,14 @@ jobs:
+        shell: powershell
+        run: |
+          # Increase Node.js UV threadpool for parallel I/O (default is 4)
+          "UV_THREADPOOL_SIZE=32" | Out-File -FilePath $env:GITHUB_ENV -Append
+          # Patch graceful-fs to retry EMFILE errors with backoff
+          node -e "try { var gfs = require('graceful-fs'); gfs.gracefulify(require('fs')); console.log('graceful-fs patched'); } catch(e) { console.log('graceful-fs not available, skipping'); }"
</file context>
Fix with Cubic

# Increase Node.js UV threadpool for parallel I/O (default is 4)
"UV_THREADPOOL_SIZE=32" | Out-File -FilePath $env:GITHUB_ENV -Append
# Patch graceful-fs to retry EMFILE errors with backoff
node -e "try { var gfs = require('graceful-fs'); gfs.gracefulify(require('fs')); console.log('graceful-fs patched'); } catch(e) { console.log('graceful-fs not available, skipping'); }"
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Patching graceful-fs in an ephemeral node -e script is a no-op that does not affect subsequent build steps.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/agent-prod.yml, line 435:

<comment>Patching `graceful-fs` in an ephemeral `node -e` script is a no-op that does not affect subsequent build steps.</comment>

<file context>
@@ -442,6 +426,14 @@ jobs:
+          # Increase Node.js UV threadpool for parallel I/O (default is 4)
+          "UV_THREADPOOL_SIZE=32" | Out-File -FilePath $env:GITHUB_ENV -Append
+          # Patch graceful-fs to retry EMFILE errors with backoff
+          node -e "try { var gfs = require('graceful-fs'); gfs.gracefulify(require('fs')); console.log('graceful-fs patched'); } catch(e) { console.log('graceful-fs not available, skipping'); }"
+
       - name: Build Agent
</file context>
Fix with Cubic

# Increase Node.js UV threadpool for parallel I/O (default is 4)
"UV_THREADPOOL_SIZE=32" | Out-File -FilePath $env:GITHUB_ENV -Append
# Patch graceful-fs to retry EMFILE errors with backoff
node -e "try { var gfs = require('graceful-fs'); gfs.gracefulify(require('fs')); console.log('graceful-fs patched'); } catch(e) { console.log('graceful-fs not available, skipping'); }"
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: This inline script is ineffective. In-memory patches to graceful-fs are isolated to this single ephemeral process and will not be inherited by subsequent Node.js processes (like yarn build).

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/agent-stage.yml, line 435:

<comment>This inline script is ineffective. In-memory patches to `graceful-fs` are isolated to this single ephemeral process and will not be inherited by subsequent Node.js processes (like `yarn build`).</comment>

<file context>
@@ -442,6 +426,14 @@ jobs:
+          # Increase Node.js UV threadpool for parallel I/O (default is 4)
+          "UV_THREADPOOL_SIZE=32" | Out-File -FilePath $env:GITHUB_ENV -Append
+          # Patch graceful-fs to retry EMFILE errors with backoff
+          node -e "try { var gfs = require('graceful-fs'); gfs.gracefulify(require('fs')); console.log('graceful-fs patched'); } catch(e) { console.log('graceful-fs not available, skipping'); }"
+
       - name: Build Agent
</file context>
Fix with Cubic

# Increase Node.js UV threadpool for parallel I/O (default is 4)
"UV_THREADPOOL_SIZE=32" | Out-File -FilePath $env:GITHUB_ENV -Append
# Patch graceful-fs to retry EMFILE errors with backoff
node -e "try { var gfs = require('graceful-fs'); gfs.gracefulify(require('fs')); console.log('graceful-fs patched'); } catch(e) { console.log('graceful-fs not available, skipping'); }"
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Running gfs.gracefulify via node -e only patches the fs module in the memory of this short-lived process. It has no effect on subsequent Node.js steps.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/server-api-prod.yml, line 435:

<comment>Running `gfs.gracefulify` via `node -e` only patches the `fs` module in the memory of this short-lived process. It has no effect on subsequent Node.js steps.</comment>

<file context>
@@ -442,6 +426,14 @@ jobs:
+          # Increase Node.js UV threadpool for parallel I/O (default is 4)
+          "UV_THREADPOOL_SIZE=32" | Out-File -FilePath $env:GITHUB_ENV -Append
+          # Patch graceful-fs to retry EMFILE errors with backoff
+          node -e "try { var gfs = require('graceful-fs'); gfs.gracefulify(require('fs')); console.log('graceful-fs patched'); } catch(e) { console.log('graceful-fs not available, skipping'); }"
+
       - name: Build Server
</file context>
Fix with Cubic

shell: powershell
run: |
# Increase Node.js UV threadpool for parallel I/O (default is 4)
"UV_THREADPOOL_SIZE=32" | Out-File -FilePath $env:GITHUB_ENV -Append
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Missing -Encoding utf8 will corrupt $GITHUB_ENV with UTF-16LE bytes. Also, the node -e inline script is dead code because patching fs only affects that short-lived process.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/desktop-timer-app-stage.yml, line 433:

<comment>Missing `-Encoding utf8` will corrupt `$GITHUB_ENV` with UTF-16LE bytes. Also, the `node -e` inline script is dead code because patching `fs` only affects that short-lived process.</comment>

<file context>
@@ -442,6 +426,14 @@ jobs:
+        shell: powershell
+        run: |
+          # Increase Node.js UV threadpool for parallel I/O (default is 4)
+          "UV_THREADPOOL_SIZE=32" | Out-File -FilePath $env:GITHUB_ENV -Append
+          # Patch graceful-fs to retry EMFILE errors with backoff
+          node -e "try { var gfs = require('graceful-fs'); gfs.gracefulify(require('fs')); console.log('graceful-fs patched'); } catch(e) { console.log('graceful-fs not available, skipping'); }"
</file context>
Fix with Cubic

# Increase Node.js UV threadpool for parallel I/O (default is 4)
"UV_THREADPOOL_SIZE=32" | Out-File -FilePath $env:GITHUB_ENV -Append
# Patch graceful-fs to retry EMFILE errors with backoff
node -e "try { var gfs = require('graceful-fs'); gfs.gracefulify(require('fs')); console.log('graceful-fs patched'); } catch(e) { console.log('graceful-fs not available, skipping'); }"
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: This inline graceful-fs patch is completely ineffective because Node.js monkey-patches do not persist across different processes.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/server-api-stage.yml, line 435:

<comment>This inline `graceful-fs` patch is completely ineffective because Node.js monkey-patches do not persist across different processes.</comment>

<file context>
@@ -442,6 +426,14 @@ jobs:
+          # Increase Node.js UV threadpool for parallel I/O (default is 4)
+          "UV_THREADPOOL_SIZE=32" | Out-File -FilePath $env:GITHUB_ENV -Append
+          # Patch graceful-fs to retry EMFILE errors with backoff
+          node -e "try { var gfs = require('graceful-fs'); gfs.gracefulify(require('fs')); console.log('graceful-fs patched'); } catch(e) { console.log('graceful-fs not available, skipping'); }"
+
       - name: Build Server
</file context>
Fix with Cubic

@nx-cloud
Copy link

nx-cloud bot commented Feb 24, 2026

View your CI Pipeline Execution ↗ for commit 409025c

Command Status Duration Result
nx build desktop --base-href ./ ✅ Succeeded 1s View ↗
nx build desktop-api --output-path=dist/apps/de... ✅ Succeeded <1s View ↗
nx run api:desktop-api ✅ Succeeded 9s View ↗
nx run gauzy:desktop-ui --base-href ./ ✅ Succeeded 3m 59s View ↗
nx run-many -t build -c production -p constants... ✅ Succeeded 8s View ↗
nx build gauzy -c=production --prod --verbose ✅ Succeeded 1m 6s View ↗
nx build api -c=production --prod ✅ Succeeded 5s View ↗
nx run-many -t build -c development -p constant... ✅ Succeeded 8s View ↗

☁️ Nx Cloud last updated this comment at 2026-02-24 23:22:47 UTC

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