Skip to content

fix(plugin): select a SQLite-capable Node runtime on Linux - #2499

Open
mldangelo-oai wants to merge 2 commits into
mainfrom
fix/linux-launcher-sqlite
Open

mldangelo-oai wants to merge 2 commits into
mainfrom
fix/linux-launcher-sqlite

Conversation

@mldangelo-oai

@mldangelo-oai mldangelo-oai commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

On Linux, the plugin launcher accepted the first automatic Node candidate even when it lacked the built-in SQLite module. With Node 20 ahead of a supported Node release, the workbench database helper failed at startup with No such built-in module: node:sqlite.

Changes

Check SQLite support in the existing runtime probe before starting a helper. If the selected Linux Node lacks SQLite, look for a compatible system installation in the standard Linux binary directories. Added a Linux test through the packaged launcher and checked the automatic runtime candidate in fresh and resumed Deep Scan worker processes.

Testing

  • Reproduced the database failure with Node 20 selected ahead of the system Node. Debian containers with Node 22.13 and Node 26 both returned the expected workbench database path with the fix.
  • Repeated the before-and-after test with Alpine Node 20 and 22 in an isolated musl container.
  • All nine launcher tests passed, including explicit selection, fallback, and stderr propagation. The Linux regression also passed in Alpine with a system installation. A fixture confirmed that an additional executable on the working directory’s PATH was never probed.
  • The Deep Scan worker boundary test, MCP type checks, plugin build, Ruff lint and format, TypeScript CI build, portable source check, and its nine tests passed.

Risk and rollout

A Linux Node missing SQLite can use a system Node in /usr/local/bin, /usr/bin, or /bin. The system candidate must resolve to one of those directories. Explicit CODEX_MCP_NODE_PATH overrides still launch directly. When a compatible system installation is unavailable, the originally selected runtime handles the command.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-09T20:28:04.426726Z e35fdd9 New commits
🔒 Security Review ✅ Completed 2026-11-09T20:41:10.330625Z e35fdd9 Manual request

Security findings

Blocking findings (1)

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added the bug Something isn't working label Nov 9, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛡️ Codex Security Review · Automatically triggered

Here are some automated security review suggestions for this pull request.

Reviewed commit: 648c0512c8

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Copy link
Copy Markdown
Collaborator Author

@codex security review

@alandelong-oai alandelong-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the focused fix. No blocking findings in this merge-safety review. The current fallback addresses the earlier PATH-probing concern while keeping explicit runtime selection authoritative. One nonblocking suggestion below would make the probe independent of diagnostic output.

Verified nine packaged-launcher tests, the fresh/resumed worker runtime boundary test, nine portable source tests, and the exact-head plugin build. Native Windows/macOS execution and a successful Linux system-Node fallback were not independently exercised; this host has no qualifying system SQLite runtime.

The extracted-package helper smoke also passed all four cases. An adjacent SDK compressed-read test timed out at 30 seconds; its fixture calls the unchanged SDK/Python path without this launcher, and that timeout remains unqualified.

}
' "$launcher_dir/../mcp" </dev/null 2>&1)
' "$launcher_dir/../mcp" </dev/null 2>&1) || return 1
[ "$_native_probe_output" = linux-without-sqlite ] || return 0

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nonblocking: consider distinguishing missing SQLite with a probe exit status. This value combines stdout and stderr, so enabling the standard NODE_DEBUG=module setting (or a runtime emitting a startup warning) makes the output differ from exactly linux-without-sqlite. The incompatible first runtime is then treated as usable and the system fallback is skipped. A distinct status would avoid parsing diagnostic text while preserving the current restriction to system candidates.

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: e35fdd9f83

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants