Skip to content

feat(mcpx): make script.check canonical with legacy aliases - #5660

Merged
dezren39 merged 1 commit into
mainfrom
queue/9338-1911-script-check-pipeline
Nov 5, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/9338-1911-script-check-pipeline

Conversation

@dezren39

@dezren39 dezren39 commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Summary

script.check is now the canonical setting. Legacy script.typecheck, MCPX_SCRIPT_TYPECHECK, --script-typecheck, and --typecheck resolve to it; the old value on maps to types. Settings are stored and read under the canonical path, including config, environment, runtime overrides, CLI, and remote exec. The default remains off; issue #79 owns changing it in the same release as the alias.

Evidence

  • Before: no script.check path; the registry exposed only script.typecheck (off | on | strict).
  • After: TestPathAliasNormalizesAndStoresCanonicalPathFromEverySource and TestScriptTypecheckOnRefusesATypeError cover compatibility; TestEveryExecFlagChangesSomething verifies local and remote CLI behavior.
  • Passed: focused internal/settings, internal/preflight, and internal/e2e tests; package compile checks for internal/cli, internal/execsvc, internal/daemon, internal/api, and internal/e2e; git diff --check.

Remaining in #1911

This is the compatibility foundation, not the whole check pipeline. Follow-up order is: (1) preflight syntax/types behavior and checkOnError / checkOnUnsupported policies; (2) compile and checkJs; (3) show the selected runtime in text output; (4) one-time legacy-spelling notice and the coordination note on #1868.

Merge Danger

Door: two-way; the path and value aliases are reversible.

Blast Radius: contained to mcpx settings and existing check option propagation; no default behavior change.


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

@dezren39
dezren39 requested a review from a team as a code owner November 4, 2026 22:07
@coderabbitai

coderabbitai Bot commented Nov 4, 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 31 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: 4693bc5d-7b2a-4146-b810-f4bb369a9fe7
Commits

Reviewing files that changed from the base of the PR and between 8de9292 and 26d884c.

Files selected for processing: 17
  • pkgs/mcpx/docs/configuration.md
  • pkgs/mcpx/docs/exec.md
  • pkgs/mcpx/docs/scripts.md
  • pkgs/mcpx/internal/api/ops_exec.go
  • pkgs/mcpx/internal/cli/commands.go
  • pkgs/mcpx/internal/cli/flagindex_generated.go
  • pkgs/mcpx/internal/daemon/routes_exec.go
  • pkgs/mcpx/internal/e2e/effect_test.go
  • pkgs/mcpx/internal/execsvc/execsvc.go
  • pkgs/mcpx/internal/preflight/preflight.go
  • pkgs/mcpx/internal/preflight/preflight_test.go
  • pkgs/mcpx/internal/settings/configuration_table.go
  • pkgs/mcpx/internal/settings/effect.go
  • pkgs/mcpx/internal/settings/pathalias_test.go
  • pkgs/mcpx/internal/settings/registry.go
  • pkgs/mcpx/internal/settings/schema.go
  • pkgs/mcpx/internal/settings/value.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

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

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T22:11:43.031507Z 26d884c PR opened
ℹ️ 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 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 Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 26d884c611

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Long: "Resolves and checks every import without executing anything. Costs " +
"a second or two on a cold module cache, which is why it is off by " +
"default rather than on.",
Path: "script.check", PathAliases: []string{"script.typecheck"},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Replace legacy config entries when persisting the canonical path

When an existing project config contains {"script":{"typecheck":"on"}}, running mcpx settings set script.typecheck off --persist project against a running daemon now leaves the configuration with conflicting values. handleSettingsSet in internal/daemon/routes_settings.go writes decl.Path, now script.check, while config.SetKey only updates that leaf without removing script.typecheck. Subsequent invocations fail settings resolution because ApplyFile reads both spellings and Set.Apply rejects their differing values at the same layer. Persistent writes need to replace or remove existing alias entries when writing the canonical setting.

Useful? React with 👍 / 👎.

Long: "Resolves and checks every import without executing anything. Costs " +
"a second or two on a cold module cache, which is why it is off by " +
"default rather than on.",
Path: "script.check", PathAliases: []string{"script.typecheck"},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Resolve legacy paths before matching remote settings rows

With a daemon running, mcpx settings get script.typecheck --daemon now reports that the daemon has no such setting, even with a fresh configuration. The remote branch in internal/cli/settings_cmd.go:110–126 fetches the settings list and compares each returned r.Path against the literal requested path, but handleSettingsList returns only the canonical script.check spelling. Unlike the local branch, this lookup never resolves the new alias, breaking existing callers of the legacy path. Canonicalize the requested path before comparison or use the daemon’s individual-setting endpoint, which already supports aliases.

Useful? React with 👍 / 👎.

@dezren39
dezren39 merged commit a568b4c into main Nov 5, 2026
1 check passed
@dezren39
dezren39 deleted the queue/9338-1911-script-check-pipeline branch November 5, 2026 01:49
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