Skip to content

fix(mcpx): generated launchers type check now that run checks by default - #11342

Merged
dezren39 merged 1 commit into
mainfrom
fix/mcpx-run-check-launcher
Nov 17, 2026
Merged

dezren39 merged 1 commit into
mainfrom
fix/mcpx-run-check-launcher

Conversation

@dezren39

@dezren39 dezren39 commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Before: since mcpx run started type checking by default (d3772a5, #1868 point 4), four mcpx e2e tests fail on main: the generated @entry block doesn't type check (TS2873 on "" ? …), custom launchers can't see the ambient globals (Cannot find name 'log'), and one test still assumes checking is off for run.

After: generated and custom launchers type check, so a default mcpx run with a custom launcher works, and the four tests pass.

How:

  • expandCustom picks the export in Go instead of emitting a ternary on a string literal.
  • Every expanded custom launcher starts with the same /// <reference path="./mcpx-globals.d.ts" /> the built-in launcher has.
  • TestScriptTypecheckOnRefusesATypeError asks for off explicitly. TestConcurrentRunsOfOneScriptKeepTheirOwnLauncher uses a deliberately headerless launcher, so it passes --script-check off.

Testing: the four e2e tests pass locally with deno 2.9.8; go test ./internal/runner ./internal/launcher passes.


Generated by Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

run defaults script.check on (d3772a5, #1868 point 4), which turned
four e2e tests red:

- The @entry fill emitted `"" ? mod[""] : mod.default`, a ternary on a
  string literal that deno check rejects (TS2873/TS2872). The export is
  known when the launcher is built, so pick it in Go.
- Custom launchers lacked the mcpx-globals.d.ts reference the built-in
  launcher carries, so any script using `log` failed with TS2304.
  Prepend the same directive to every expanded custom launcher.
- TestScriptTypecheckOnRefusesATypeError assumed run was off by
  default; it now asks for off explicitly.
- The concurrent-launcher test uses a deliberately headerless launcher,
  which cannot type check; it passes --script-check off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dezren39
dezren39 marked this pull request as ready for review November 17, 2026 20:52
@dezren39
dezren39 requested a review from a team as a code owner November 17, 2026 20:52
@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 51 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7ac2f8bb-50e9-436b-893b-25e31d49819e
Commits

Reviewing files that changed from the base of the PR and between 08e392a and 331e4f9.

Files selected for processing: 3

  • pkgs/mcpx/internal/e2e/e2e_test.go
  • pkgs/mcpx/internal/e2e/effect_test.go
  • pkgs/mcpx/internal/runner/runner.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

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

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-17T20:52:29.255494Z
We couldn’t complete this review. Comment @codex review to try again.
331e4f9 Draft marked ready
ℹ️ 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@dezren39
dezren39 merged commit fd63bbd into main Nov 17, 2026
1 check passed
@dezren39
dezren39 deleted the fix/mcpx-run-check-launcher branch November 17, 2026 21:00
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.

2 participants