Title: mcpx: run fails on scripts with @param holes instead of pointing at recipes run · Issue #276 · developing-today/code · GitHub
Open Graph Title: mcpx: run fails on scripts with @param holes instead of pointing at recipes run · Issue #276 · developing-today/code
X Title: mcpx: run fails on scripts with @param holes instead of pointing at recipes run · Issue #276 · developing-today/code
Description: Summary mcpx run
Open Graph Description: Summary mcpx run
X Description: Summary mcpx run <recipe> executes a recipe's @param holes as written and dies with a raw runtime syntax error that names neither the hole nor the command that fills it. This is the run h...
Opengraph URL: https://github.com/developing-today/code/issues/276
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"mcpx: run fails on scripts with @param holes instead of pointing at recipes run","articleBody":"## Summary\n\n`mcpx run \u003crecipe>` executes a recipe's `@param` holes as written and dies with a raw runtime syntax error that names neither the hole nor the command that fills it. This is the run half of dezren39/nix#367 (fixed there by PR #382), still present in this repo's `pkgs/mcpx` copy. The greet half of that issue is local to Drew's Mac and is not part of this one.\n\n## Evidence (reproduced on main 410275df, 2026-10-18)\n\nBuilt mcpx from this repo and ran a recipe script (`.mcpx/scripts/greet.ts`):\n\n```ts\n// @param name: who to greet\nlog.info(`hello ${@name}`)\n```\n\n`mcpx run greet` output:\n\n```\nerror: Uncaught (in promise) TypeError: SyntaxError: Expression expected\n2 | log.info(`hello ${@name}`)\n | ~\n```\n\n- `pkgs/mcpx/internal/cli/scripts.go` has no hole check: no `refuseRecipeHoles` / `declaresParams` anywhere under `internal/cli/`, and `runScript` (internal/cli/commands.go) never refuses a recipe before handing it to the runtime.\n- `pkgs/mcpx/internal/cli/recipe_holes_test.go` does not exist in this copy.\n- A full diff of this copy against dezren39/nix's post-fix copy shows the difference is exactly the nix PR #382 change set: the `refuseRecipeHoles` block in `runScript`, the helpers in scripts.go, the unit test file, and the e2e test `TestRunOnARecipePointsToRecipesRun`.\n\n## Why it matters\n\nA recipe's holes are filled only by `mcpx recipes run`, which substitutes values before anything executes. `run` executing the file as written guarantees a confusing failure for anyone who reaches for the more obvious command — the error looks like a bug in their script, not a wrong-command mistake.\n\n## Acceptance criteria\n\n- [ ] `mcpx run \u003crecipe>` on a script declaring `@param` holes refuses before the runtime starts, naming the recipe and its holes.\n- [ ] The refusal points at the filling command: `mcpx recipes run \u003cname> hole=\u003cvalue>...` for a recipe on the script path, or `mcpx recipes save` + `recipes run` for a path-addressed recipe file off the search path.\n- [ ] Plain scripts are untouched — including scripts whose body contains a bare `@name` with no `@param` declaration — and an unresolvable script name still gets the run's own resolution error.\n- [ ] Unit tests for the check plus an e2e test that `run` on a recipe points at `recipes run` (mirroring dezren39/nix PR #382) pass; the raw `SyntaxError` no longer appears.\n\n## Suggested fix\n\nPort dezren39/nix PR #382: `refuseRecipeHoles` in internal/cli/scripts.go (head-only `@param` declaration match, `recipes.Parse` for the placeholder list), called from `runScript` for the non-inline path, with `recipe_holes_test.go` and the e2e test ported (issue refs re-pointed to this issue).\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-18T11:22:41Z","url":"https://github.com/developing-today/code/issues/276"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8898abb0-417a-2c83-45f4-4be79fbf2d0b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C66A:23E430:86D00D:AE7C65:6B062D6B |
| html-safe-nonce | a6b24ea79deb15cc2786a1c1fe2fbb573d428177fc70c473b7bf5d3e8b7d4c0c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNjZBOjIzRTQzMDo4NkQwMEQ6QUU3QzY1OjZCMDYyRDZCIiwidmlzaXRvcl9pZCI6IjQyMTYwMDU2MDM5NTg4NjExNjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f927baa03f634b6d99ee8e67e7bfd1e545c07e4e20ef6ff8db194b974ceb2357 |
| hovercard-subject-tag | issue:5908995468 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/276/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8d0b4fbb6b8e0687e8862a13202c98a3940e8ba84726c5fb01c5577921ea9cf2/developing-today/code/issues/276 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8d0b4fbb6b8e0687e8862a13202c98a3940e8ba84726c5fb01c5577921ea9cf2/developing-today/code/issues/276 |
| og:image:alt | Summary mcpx run |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7f961de5dd5c5d4aca24d33f8b3ffb3fb8b2ef53d0a4f32f01f0a790e512f6d3 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 494ea0bb1e0feef734a83e2628697647755e8864 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width