GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — mcpx: one script-resolution rule for CLI and daemon — /v1/exec resolves names (#2168) by dezren39 · Pull Request #2586 · developing-today/code Conversation
|
|
Warning Review limit reachedYou'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 59 minutes. View limit details
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. Comment |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 8501d1a5a5
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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.
There was an error while loading. Please reload this page.
| if rf.remoteFile && !inline { | ||
| // The file: form of the wire request — the daemon resolves the | ||
| // name through scriptresolve and runs the file it finds (#2168). | ||
| return a.execRemote(ctx, c, map[string]any{"file": fs.Arg(0), "options": opts}, eo) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Use a daemon-side working directory for remote file execution
When the client and daemon have different filesystem layouts, this request still sends opts.Cwd populated from the client's os.Getwd(). Service.resolveFile roots the script search at that directory, and runner.Run also uses it as cmd.Dir. For example, a client in /Users/alice/project cannot run the daemon's script under /srv/project/.mcpx/scripts: resolution searches the client-side path, and even an absolute script path subsequently fails to start if that working directory does not exist remotely. For the new daemon-file mode, default to the daemon's working directory or allow an explicitly remote working directory instead of unconditionally forwarding the local one.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| export: *export, session: sessionKey, shape: shape, | ||
| remoteFile: *remoteFile}) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Skip local recipe inspection when selecting a remote file
When a local script and a daemon-side script share a name, --remote-file can still be rejected based on the unrelated local file. Before this dispatch, runScript unconditionally calls refuseRecipeHoles, which resolves and reads the name locally. If the local report contains recipe placeholders but the daemon's report is a valid plain script, the command returns the local recipe error without contacting the execution endpoint. Exclude daemon-file runs from local-file inspection and perform any required validation against the file resolved on the daemon.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| strings.HasSuffix(arg, Ext) || | ||
| strings.HasSuffix(arg, ".js") || | ||
| strings.HasSuffix(arg, ".mts") || | ||
| arg == "-" |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Preserve explicit .mjs filenames in daemon requests
For an existing /v1/exec caller sending {"file":"report.mjs"}, routing file requests through this resolver now breaks a previously valid cwd-relative filename. Unlike .ts, .js, and .mts, .mjs is not recognized here as path-shaped, so resolution searches for names such as report.mjs.ts and report.mjs.mjs instead of passing report.mjs to the runner. Recognize .mjs alongside the other supported explicit extensions so these requests continue to execute the specified file.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| set := s.execSettings() | ||
| return scriptresolve.Resolver{ | ||
| Configured: scriptresolve.SplitPathList(set.String("paths.scripts")), |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Resolve script settings from the full configuration chain
When paths.scripts is defined in a parent or user configuration and a nearer project configuration omits it, this resolver silently loses the configured search path. execSettings() applies only s.cfg.Path, whereas CLI Settings() applies the entire configuration chain; the daemon's own initConsumer() also uses settings.Resolve(s.cfg.Sources) when computing its recipe directories. Consequently, a script visible to both the CLI and the daemon's recipe listing can fail with no script named through /v1/exec, even with identical working directories. Build the resolver settings from all contributing configuration sources, preserving nearest-file precedence.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Program-tending check-in (tracking: #1352) — this PR has had no activity since 2026-10-30T11:31Z (~7.2 days), so it gets the 7-day owner check-in. What it's waiting on: its Next concrete step: disposition the failing — program-tending, 2026-11-06 run |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Closing as duplicate — resolved pairwise under batch triage task 12905 (issue #7297 part 3 of 9), 2026-11-08. Pairwise diff (laptop git, fresh): PR #2724 head f71c688 has this PR sole commit 8501d1a (mcpx: one script-resolution rule for CLI and daemon, #2168) as its direct parent, plus one additional commit fixing the seedElicitation test helper. PR #2724 is therefore a strict superset of this PR — nothing unique exists here to salvage. The canonical PR for this work is #2724; a salvage note recording this comparison is posted there. This PR branch is left untouched (no branch deletion per the batch rules). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.