Skip to content

fix: all CI integration tests passing - #58

Merged
sagar0163 merged 1 commit into
mainfrom
fix/ci-integration-tests
Sep 25, 2026
Merged

sagar0163 merged 1 commit into
mainfrom
fix/ci-integration-tests

Conversation

@sagar0163

Copy link
Copy Markdown
Owner

Fixed 25 failing integration tests and ESLint warnings

Root cause of the 25 test failures

All 25 failures were Segmentation fault (core dumped) / exit code 139 — not broken
tests or CLI behavior. better-sqlite3@13.0.3 ships a prebuilt native binary compiled
with NAPI_VERSION=10 (see node_modules/better-sqlite3/binding.gyp). The repo pinned
Node 20 in .nvmrc, and Node 20 only provides N-API 9. Loading the addon
succeeds, but the first database open dereferences an unavailable N-API symbol and
segfaults.

Because src/commands/session.js constructs TaxonomySystem at module top level, and
src/index.js imports that session module on startup, every CLI invocation crashed —
which is why all 25 failures across functional/cli-commands/error-handling were the same
segfault. No test expectations were wrong; no test files needed changing.

Verified:

Node N-API nebula status
v20.20.2 (previous .nvmrc) 9 SIGSEGV (139)
v22.23.2 10 works
v24.13.1 / v24.14.0 10 works

Changes

  • .nvmrc: 20 → 24
  • .node-version: node (unusable placeholder) → 24
  • .github/workflows/release.yml: hardcoded node-version: '20' → node-version-file: '.nvmrc', so CI and release share one source of truth. This also fixes the failing Auto Release workflow, which runs npm test and was hitting the same segfault.
  • package.json: added engines.node: ">=24" to make the requirement explicit and prevent regression to a N-API 9 runtime.

ESLint: 80 warnings → 0

  • 49 unused caught errors / args renamed to the _ prefix per no-unused-vars (catch (e) → catch (_e), etc.)
  • 14 unused imports removed
  • 11 dead assignments removed, each checked for side effects first. Calls with side effects were preserved by dropping only the binding, e.g. const pid = await ProjectID.getOrCreateUID(...) → await ProjectID.getOrCreateUID(...). In test/chaos/memory_stress.js the discarded tokens.map(...) allocation was kept as a bare expression because that script exists specifically to stress the GC.
  • Removing the last caller of StreamingExecutor.#classifyCommand exposed it as an unused private member (an ESLint error), so the now-unreachable private method was deleted.

Verification

Clean-room simulation of the full CI pipeline (fresh tracked-files checkout, no local .env, Node 24):

  • npm ci — exit 0
  • npm run lint — exit 0, 0 errors / 0 warnings (was 80 warnings)
  • npm test — exit 0, 219/219 passed, 19/19 files
  • npm audit --omit=dev --audit-level=high — exit 0, 0 vulnerabilities (the 13 reported vulns are all devDependencies, so the audit step passes; it had never run before because the job died at the test step)

Note (pre-existing, not touched)

src/utils/project-scanner.js:121 calls ai.summarizeReadme(...), but AIService has
no such method. It is caught and logged as Readme parse failed: ai.summarizeReadme is not a function. This exists on main independently of this change and does not fail CI.

@sagar0163
sagar0163 merged commit f46c4aa into main Sep 25, 2026
1 check passed
@sagar0163
sagar0163 deleted the fix/ci-integration-tests branch September 25, 2026 17:08
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