Skip to content

Fix apps/api test hang: bump @adonisjs/ace to 14.1.1 (Node 24.20 loader regression) - #199

Merged
brianramseyau merged 2 commits into
mainfrom
fix/pin-node-avoid-loader-regression
Sep 4, 2026
Merged

brianramseyau merged 2 commits into
mainfrom
fix/pin-node-avoid-loader-regression

Conversation

@brianramseyau

@brianramseyau brianramseyau commented Sep 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

Root-causes and fixes the "Invalid command exported... Invalid URL" hang that appeared after #198's warm-up-boot fix, per Kilo's review feedback that swallowing it broadly masked a real, deterministic issue rather than a flaky one.

Root cause: Node 24.20.0 shipped loader changes (nodejs/node#63917 "enforce path normalization before lookup", alongside #62239's package-maps work) that break @adonisjs/ace's command-metadata validator — already reported and fixed upstream as adonisjs/ace#169 / #170, released in ace 14.1.1. @adonisjs/core@7.4.0 depends on ^14.1.0, which still resolves to the broken 14.1.0 by default.

The fix:

  • Adds @adonisjs/ace: 14.1.1 to pnpm-workspace.yaml's existing overrides block (same mechanism/pattern already used there for @poppinss/utils, with the reasoning documented inline).
  • Verified locally by bisecting Node versions (same OS, only the Node binary changed): apps/api's suite is clean on 24.18.1, reproduces the exact CI error and the hang 100% of the time on 24.20.0 — and with the ace override in place, 531/531 pass cleanly on 24.20.0 too.
  • An earlier commit on this branch pinned CI's Node version down to 24.18.1 as a stopgap before this root cause was found; that pin is now reverted (back to floating on Node 24) since the dependency bump is the real fix.
  • Narrows the try/catch added in Split monolithic CI job into parallel jobs #198 (per Kilo's specific feedback) to only swallow this exact known error message and rethrow anything else, so a real regression in apps/api/commands/*.ts can't hide behind it. With the override in place it shouldn't ever trigger — it's defense-in-depth, not the fix.
  • Production is unaffected regardless of Node patch version — it runs the pre-compiled build output, not source .ts files, so the loader trick this bug lives in never runs there.

Test plan

  • Verified locally: 531/531 apps/api tests pass clean on 24.18.1
  • Verified locally (bisection): reproduces the exact CI error + hang on 24.20.0 without the fix
  • Verified locally: 531/531 pass clean on 24.20.0 with the @adonisjs/ace override — confirms the real fix
  • CI green on this branch, test / Test (api) completes fast (no hang)

🤖 Generated with Claude Code

Root-caused the deterministic "Invalid command exported... Invalid
URL" failure from the previous fix by bisecting Node versions locally
(same OS, only the Node binary changed): clean on 24.18.1, reproduces
100% on 24.20.0, including the hang. Node 24.20.0's loader changes
(nodejs/node#63917 "enforce path normalization before lookup",
alongside #62239's package-maps work) break the .ts-to-.js specifier
rewrite @adonisjs/ace's FsLoader relies on to dynamically import
apps/api/commands/*.ts files.

Pin every CI job and local dev (.nvmrc) to 24.18.1 until ace or Node
fixes this — that's the actual fix. Production isn't affected
regardless of patch version, since it runs the pre-compiled build/
output, not source .ts files needing this loader trick.

Also narrows the try/catch added in the previous commit (per review
feedback) to only swallow this specific known error and rethrow
anything else — it was catching every boot() failure, which would
have hidden a real regression in apps/api/commands/*.ts just as
easily as this Node-version issue.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Comment thread apps/api/tests/bootstrap.ts Outdated
@kilo-code-bot

kilo-code-bot Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
pnpm-lock.yaml 11684 Unrelated @typescript-eslint parser peer re-resolved to eslint@9.39.5/typescript@5.9.3 (mismatched with the plugin's own eslint@10.8.1/typescript@6.0.3) as collateral of the ace override re-resolve
Files Reviewed (6 files)
  • .github/actions/setup/action.yml - clean
  • .github/workflows/native-build.yml - clean
  • .nvmrc - clean
  • apps/api/tests/bootstrap.ts - clean
  • pnpm-workspace.yaml - clean
  • pnpm-lock.yaml - 1 issue

Fix these issues in Kilo Cloud

Previous Review Summary (commit de26dc2)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit de26dc2)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
apps/api/tests/bootstrap.ts 65 Node pin doesn't cover the Docker image build — docker/Dockerfile runs node ace build from source on the floating node:24-bookworm-slim tag, so the production build is still exposed to the 24.20.0 loader regression
Files Reviewed (4 files)
  • .github/actions/setup/action.yml - clean
  • .github/workflows/native-build.yml - clean
  • .nvmrc - clean
  • apps/api/tests/bootstrap.ts - 1 issue

Fix these issues in Kilo Cloud


Reviewed by deepseek-v4-pro-0813 · Input: 42K · Output: 27K · Cached: 538.8K

Review guidance: REVIEW.md from base branch main

Found the upstream report: adonisjs/ace#169 ("Custom commands fail to
load on Node.js 24.20.0 with 'Invalid URL'"), already fixed in ace
14.1.1 (adonisjs/ace#170, merged the same week). @adonisjs/core@7.4.0
depends on ^14.1.0, which still resolves to the broken 14.1.0, so
pnpm-workspace.yaml now overrides @adonisjs/ace to 14.1.1 project-wide
— the same mechanism already used there for @poppinss/utils, with the
same rationale documented inline.

This is the real fix, not the Node-version pin from the previous
commit — verified locally by running apps/api's suite on Node 24.20.0
with the override in place: 531/531 passing, no warm-up warning.
Reverts that pin (.github/actions/setup/action.yml, native-build.yml,
.nvmrc) back to floating on Node 24, and updates the bootstrap.ts
comment to point at the dependency fix instead. The narrowed
try/catch from the previous commit stays as defense-in-depth, but
should no longer ever trigger.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@brianramseyau brianramseyau changed the title Pin Node to 24.18.1 to avoid a loader regression breaking apps/api tests Fix apps/api test hang: bump @adonisjs/ace to 14.1.1 (Node 24.20 loader regression) Sep 4, 2026
Comment thread pnpm-lock.yaml
dependencies:
'@eslint-community/regexpp': 4.12.2
'@typescript-eslint/parser': 8.67.0(eslint@10.8.1(jiti@2.7.0))(typescript@6.0.3)
'@typescript-eslint/parser': 8.67.0(eslint@9.39.5(jiti@2.7.0))(typescript@5.9.3)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

SUGGESTION: Unrelated @typescript-eslint peer-dependency churn introduced by the lockfile re-resolve

Adding the @adonisjs/ace override forced a full lockfile re-resolve that also re-resolved this plugin's @typescript-eslint/parser peer from eslint@10.8.1/typescript@6.0.3 to eslint@9.39.5/typescript@5.9.3 — while the plugin itself (and its remaining deps, e.g. type-utils, eslint: 10.8.1, typescript: 6.0.3 a few lines below) is still peer-resolved against eslint@10.8.1/typescript@6.0.3. The parser now links a different TypeScript/eslint than the plugin that consumes it, which is unrelated to the ace bump and can surface as a "TypeScript version used by @typescript-eslint/typescript-estree is not compatible" mismatch in type-aware linting. It also suggests the lockfile may have been regenerated under a pnpm version other than the packageManager pin (pnpm@10.33.0), which risks --frozen-lockfile drift in CI. Consider regenerating the lockfile cleanly under pnpm@10.33.0 and confirming the parser peer resolves back to eslint@10.8.1/typescript@6.0.3.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@brianramseyau
brianramseyau merged commit 468045b into main Sep 4, 2026
10 checks passed
@brianramseyau
brianramseyau deleted the fix/pin-node-avoid-loader-regression branch September 4, 2026 12:27
@brianramseyau brianramseyau mentioned this pull request Sep 4, 2026
1 of 2 tasks
brianramseyau added a commit that referenced this pull request Sep 4, 2026
* Pin Node to 24.20.0 everywhere

Was floating on the 24.x major (>=24 engine range, unpinned Dockerfile/CI
tags), which let the Node 24.20 ace loader regression (#199) reach prod
undetected until it broke tests. Pin package.json engines, .nvmrc,
docker/Dockerfile, docker/dev.Dockerfile, and both CI node-version fields
to the same exact version.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Loosen engines.node to a floor instead of an exact pin

Exact-pinning engines.node warns (and hard-fails under apps/web/.npmrc's
engine-strict=true) on every future patch release. The actual reproducible
pin lives in .nvmrc/Docker/CI already; engines should just express the
minimum supported version.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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