GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(mcpx): script.language setting, --language flag, ExecOptions.language (#1917) by dezren39 · Pull Request #7818 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 8, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Closes the #1917 Python-parity remainder (task 13569): the explicit script-language selection that Phase 2 deferred.

What

  • script.language setting (enum auto|typescript|javascript|python, default auto) in the settings registry, with the generated configuration doc refreshed.
  • mcpx exec/mcpx run --language flag (hand-written like --runtime; falls back to the resolved script.language), forwarded on remote runs.
  • /v1/exec ExecOptions.language field + OpenAPI schema entry; plugin ops regenerated.
  • Runner: Options.Language, NormalizeLanguage (unknown values error before a run, never a silent fallback), and EffectiveScriptLanguage — an explicit selection beats shebang/extension detection when no shebang/interpreter dispatch decided first, so mcpx exec --language python '<snippet>' runs the snippet under the machine Python with the generated Python client installed.

Tests (oracle: the packet's targeted suites + new regression tests)

  • New: TestEffectiveScriptLanguage, TestExplicitPythonLanguageRunsInlineSnippet (end-to-end Python client call from a shebang-less snippet), TestExplicitLanguageRejectsUnknown, TestExecOptionsLanguageWireName — all PASS.
  • go test ./internal/runner/ -count=1 PASS (full suite); ./internal/execsvc/ PASS; ./internal/api/ PASS; packet's go test ./internal/cli/ -run TestExec PASS.
  • Full ./internal/cli/ suite: one timing flake, TestInlineDaemonCancelledWhileWaiting, which PASSes in isolation on both this branch and clean main.
  • ./internal/settings/: 4 failures remain, all verified pre-existing on clean main in the same run (TestNoUndeclaredEnvRead, TestEverySettingHasAnEffectProbeOrAnExemption proto.* entries, TestTheScriptEnvironmentIsWhatTheCodeSets, TestTheEnvironmentDocIsCurrent).

Deliberate pin raise

EffectExemptionPin 208 → 209 for the new script.language exemption, per the ratchet's own terms: the setting's effect is covered by the deterministic internal/runner tests above; the e2e harness script fixtures are TypeScript-only.

Queue: task 13569, lane code-t.


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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dezren39
dezren39 requested a review from a team as a code owner November 8, 2026 21:35
@coderabbitai

coderabbitai Bot commented Nov 8, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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 22 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: 34e346c6-cbd3-4464-b831-88303a692c04
Commits

Reviewing files that changed from the base of the PR and between 530a7c3 and 7558f39.

Files selected for processing: 15

  • .opencode/plugin/core/ops.gen.ts
  • pkgs/mcpx/docs/configuration.md
  • pkgs/mcpx/internal/api/ops_exec.go
  • pkgs/mcpx/internal/cli/commands.go
  • pkgs/mcpx/internal/cli/exec.go
  • pkgs/mcpx/internal/cli/flagindex_generated.go
  • pkgs/mcpx/internal/daemon/routes_exec.go
  • pkgs/mcpx/internal/execsvc/execsvc.go
  • pkgs/mcpx/internal/execsvc/language_test.go
  • pkgs/mcpx/internal/runner/language.go
  • pkgs/mcpx/internal/runner/python_test.go
  • pkgs/mcpx/internal/runner/runner.go
  • pkgs/mcpx/internal/settings/effect.go
  • pkgs/mcpx/internal/settings/registry.go
  • pkgs/mcpx/plugin/core/ops.gen.ts
  • 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

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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-14T23:04:22.032443Z
We couldn’t complete this review. Comment @codex review to try again.
7558f39 New commits
ℹ️ 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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 mentioned this pull request Nov 8, 2026
mcpx: Python as a first-class script language, 1:1 with TypeScript #1917
Closed
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Nov 8, 2026
View reviewed changes

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

Copy link
Copy Markdown

There was a problem hiding this comment.

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: 8fb594bb2f

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/mcpx/internal/execsvc/execsvc.go Outdated
// Python client.
clients := map[string]runner.Client{}
if runner.ScriptLanguage(req.File, req.Source) == codegen.Python.Name {
if runner.EffectiveScriptLanguage(req.File, req.Source, opts.Language) == codegen.Python.Name {

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 8, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

P2 Badge Match client selection to shebang dispatch precedence

For API or remote executions of a Python-shebang script with language: "typescript" or "javascript", EffectiveScriptLanguage returns TypeScript and skips generating the Python client. However, runner.Run gives the shebang precedence over the explicit language and still executes the script in Python. Consequently, scripts importing mcpx_client fail on a fresh work directory even though Python shebang dispatch is documented to override the language selection. Select the generated client using the same precedence as the actual interpreter dispatch.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dezren39 dezren39 Nov 14, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Fixed in the shepherd pass (task 17290, lane code-b), commits fedf6b3 (fix) and 7558f39 (regression tests) on this branch.

Client selection now matches dispatch precedence: runner.ClientScriptLanguage (new, internal/runner/language.go) returns the shebang's language whenever a shebang names a known language — dispatch rank 1 runs that interpreter verbatim — and only falls back to the explicit selection (EffectiveScriptLanguage) when no shebang is in charge. execsvc.Service.Run selects the generated client with it, so a Python-shebang script with language: "typescript" is offered the Python client the dispatched run will import. The shebang half of ScriptLanguage was factored out as shebangLanguage so both rules share the one evidence read.

Regression coverage: TestClientScriptLanguage (internal/runner/python_test.go) — Python shebang + explicit typescript → python; deno shebang + explicit python → typescript; explicit selection and auto unchanged when no shebang decides.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/mcpx/internal/execsvc/execsvc.go Outdated
WorkDir: s.WorkDir,
WorkRoot: s.WorkRoot,
Runtime: firstNonEmpty(opts.Runtime, s.Limits.Runtime),
Language: opts.Language,

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 8, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

P2 Badge Apply the configured language default to API executions

When the daemon's configuration sets script.language to python, a /v1/exec request without an explicit language still runs a shebang-less snippet as TypeScript. Server.execSettings resolves the configuration and environment, but ExecService never transfers this setting into the service, Limits has no language field, and this assignment uses only the request option. This contradicts the new setting's documented behavior that the API option overrides the configured language for one run. Propagate the configured default and resolve it before both client generation and runner dispatch, while preserving an explicit auto override.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dezren39 dezren39 Nov 14, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Fixed in the shepherd pass (task 17290, lane code-b), commits fedf6b3 (fix) and 7558f39 (regression tests) on this branch.

The configured default now propagates: execsvc.Limits gained a Language field, stamped from the resolved script.language by both service builders — the daemon's ExecService() (from execSettings(), internal/daemon/routes_exec.go) and the CLI's localService (internal/cli/exec.go). Service.Run resolves effectiveLanguage = firstNonEmpty(opts.Language, s.Limits.Language) once and uses it for both client generation and the runner options, so an explicit request value wins, an explicit auto still overrides the configured default back to detection (firstNonEmpty keeps it ahead; NormalizeLanguage reads it as no selection), and a request with no language runs under the configured default.

Regression coverage: TestConfiguredLanguageAppliesToRuns (internal/execsvc/language_test.go) runs a Python-only snippet through the service with Limits.Language=python and no request language (runs as Python), and with Limits.Language=typescript plus an explicit python request (explicit wins).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/mcpx/internal/cli/commands.go
Comment on lines +854 to +856
languagePref := *lang
if languagePref == "" && a.Settings().Given("script.language") {
languagePref = a.Settings().String("script.language")

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 8, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

P2 Badge Resolve the language from the fully merged settings

With a configured preset containing ["--language=typescript"], mcpx exec --preset <name> --script-language=python '<Python snippet>' still selects TypeScript. applyPresets parses the preset into the handwritten *lang pointer first, while the explicit canonical --script-language flag updates only the resolved settings. Preferring the nonempty pointer therefore discards the explicit override for both local and remote execution, contrary to the preset precedence documented in docs/runtimes.md. Read the fully resolved script.language setting instead of preferring the potentially stale preset value.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dezren39 dezren39 Nov 14, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Fixed in the shepherd pass (task 17290, lane code-b), commits fedf6b3 (fix) and 7558f39 (regression tests) on this branch.

runScript (internal/cli/commands.go) now reads the language from the fully merged settings: whenever script.language was given at any layer, the resolved setting wins over the hand-written --language pointer — a preset is parsed into that pointer before the command line runs, while an explicit --script-language is recorded in the resolved set at the flag layer, above the preset layer, so the preset value no longer discards it. A --language given on the command line itself still wins over both (detected with scanFlag on the raw args, since the final parse set the pointer after every preset ran). So mcpx exec --preset <name-with---language=typescript> --script-language=python '<snippet>' now selects Python, and --language typed directly keeps its documented precedence.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@developing-today developing-today Bot mentioned this pull request Nov 9, 2026
mcpx: Roc as a script language, and whether mcpx should be a Roc platform #1964
Closed
@dezren39 dezren39 mentioned this pull request Nov 11, 2026
mcpx(plugin): ops.gen.ts is stale again — TestPluginOpsAreGenerated red on main, only the OPERATION_FINGERPRINT moved (recurrence of #4806) #7796
Closed
4 tasks
@github-actions github-actions Bot assigned dezren39 Nov 12, 2026
@dezren39

dezren39 commented Nov 14, 2026

Copy link
Copy Markdown
Member Author

agent-note:v1 — state: picked-up
Lane code-b (task 17290, pr_shepherd) claimed PR #7818 for issue #1917. Revalidated fresh: PR #7818 is OPEN, unheld (no held/user/owned/do-not-merge/do-not-auto-edit labels), head queue/13569-1917-script-language @ 8fb594b, mergeable_state dirty (conflicts with current main), checks: scripts-test failing, others passing. Three Codex P2 findings on the reviewed commit are undispositioned and block merge per the Codex gate — they will be fixed or replied to in this pass. Next: rebase onto main in a laptop worktree, disposition Codex findings, run targeted mcpx tests, then merge on merits or close with evidence.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 added queue/claimed Queue worker lifecycle state work/assigned Queue worker lifecycle state status/in-progress Queue worker lifecycle state labels Nov 14, 2026
repo-worker-code-k added 2 commits November 14, 2026 16:50
repo-worker-code-k
feat(mcpx): script.language setting, --language flag, ExecOptions.lan…
fedf6b3
…guage (#1917)
repo-worker-tmp-code-b
fix(mcpx): Codex P2s on #7818 — shebang-first client selection, confi…
7558f39
…gured language default, merged-settings CLI language; regression tests
@dezren39
dezren39 force-pushed the queue/13569-1917-script-language branch from 8fb594b to 7558f39 Compare November 14, 2026 23:04
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 merged commit 46f9405 into main Nov 14, 2026
2 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the queue/13569-1917-script-language branch November 14, 2026 23:05
@dezren39

dezren39 commented Nov 14, 2026

Copy link
Copy Markdown
Member Author

agent-note:v1 — state: done (fixed_merged)
Task 17290 (lane code-b) complete: PR #7818 MERGED, merge commit 46f9405.

What the shepherd pass did: rebased the single PR commit onto main 7551d09 (5 conflicted files resolved; ops.gen.ts regenerated — new OPERATION_FINGERPRINT 8560a42def; EffectExemptionPin 213→214 for the script.language exemption), then fixed all three Codex P2 findings on the reviewed commit, each replied to on its thread:

  1. Client selection matches shebang dispatch precedence — new runner.ClientScriptLanguage (shebang wins; explicit selection otherwise).
  2. Configured script.language now reaches API executions — execsvc.Limits.Language stamped by the daemon's ExecService() and the CLI's localService; Service.Run resolves effectiveLanguage = firstNonEmpty(opts.Language, s.Limits.Language) (explicit "auto" still overrides back to detection).
  3. CLI language resolves from the fully merged settings — resolved script.language beats a preset-loaded --language pointer; a command-line --language still wins (scanFlag).

New regression tests: TestClientScriptLanguage (runner), TestConfiguredLanguageAppliesToRuns (execsvc). Suites on the laptop: internal/runner, internal/api, internal/execsvc, internal/daemon PASS; go vet clean. Pre-existing failures verified identical on clean main and left alone: internal/settings TestTheEnvironmentDocIsCurrent + TestEveryDocumentHasAChapter, internal/cli TestInlineDaemonCancelledWhileWaiting (timing). Issue #1917 remains open — this PR was its deferred explicit-language remainder, not the whole epic.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 removed status/in-progress Queue worker lifecycle state queue/claimed Queue worker lifecycle state work/assigned Queue worker lifecycle state labels Nov 14, 2026
@dezren39 dezren39 added the audit:complete PR fully implemented spawning issue label Nov 25, 2026
This was referenced Nov 25, 2026
AUDIT-7 Lane 4 — MERGED-PR-AUDIT: merged PRs since 2026-10-23 vs their spawning issues #13879
Open
docs: AUDIT-7 batch 3 partial ledger (226 PRs, 4 invalid IDs) #14847
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@dezren39 dezren39

Labels

audit:complete PR fully implemented spawning issue

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.