Repository navigation
fix(mcp): algorithm_spec placeholder refusals name tools, not CLI - #1320
Merged
Merged
Conversation
Closes #1319 When model / base_url are omitted, MCP algorithm_spec still warned hosts to re-run with --model / --base-url, attributed placeholders to init, and told them to edit the written spec then plan. Rewrite warnings, error, and next into Path A tool language: re-call algorithm_spec with model and base_url (never guess those) and do not start. The CLI algorithms run / init wording is unchanged.
Collaborator
Author
|
Self-review (Birfy) Tip SHA: ff534ed
|
Birfy
enabled auto-merge (squash)
November 30, 2026 04:29
The #1319 rewrite left a model-only placeholder error without base_url. That passed on a box with ARK_API_KEY (both fields placeholder) and failed the CI matrix. Always rewrite the shared "that init wrote" suffix so MCP error names re-call algorithm_spec with model and base_url. Clear provider keys in the wording tests so they match a clean host. The CLI wording is unchanged.
Collaborator
Author
|
Self-review (Birfy) Tip SHA: 777f3fd
|
This was referenced Nov 30, 2026
Birfy
added a commit
that referenced
this pull request
Nov 30, 2026
…not CLI (#1322) Closes #1321 Base: 37d0387 Tip SHA: cff80cd ## What changed On tip `37d03875` (after #1320), MCP `describe_algorithm` / `list_algorithms` already rewrite each card's `run` into `algorithm_spec`, and placeholder / plan / apply / diagnose refusals already speak Path A tools. The leftover a host actually reads is the unknown-name and kind-mismatch refusal from `describe_algorithm` and `algorithm_spec`. Those messages are shared with the CLI, and MCP was returning them almost unchanged, so a host was sent to `agentdescent algorithms list` / `algorithms run` / `init` / `demo --kind`. MCP `describe_algorithm` and `algorithm_spec` name/kind refusals now name Path A tools: `list_algorithms` (with `kind` when it is known) and, when a one-file text retry applies, `algorithm_spec` with `kind=text`, `path`, `cases`, and `model` and `base_url` (never guess those). `list_algorithms` `note` filters with the `kind` field, not CLI `--kind`. The CLI `algorithms show` / `run` / `init` wording is unchanged. The `describe_algorithm` and `algorithm_spec` tool descriptions mention this wording. `changelog.d/1321-mcp-algorithm-error-wording.md`. ## Verification Tip SHA: cff80cd Ran: - `pytest -q -o addopts='' tests/test_mcp_algorithm_error_wording.py tests/test_mcp_describe_run.py tests/test_mcp_algorithm_spec_placeholder_wording.py tests/test_mcp_plan_start_wording.py tests/test_mcp_algorithm_spec.py tests/test_mcp.py tests/test_missing_cli_kind_remedy.py tests/test_resume_quota_exhausted.py` → 86 passed - `python -m tools.changelog_fragments check` → 66 changelog fragment(s) OK - `python -m tools.gen_api_docs --check` → docs/api.md is up to date Not run: - Full offline suite locally — the CI test matrix is the line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #1319
Base: fb519a6
Tip SHA: ff534ed
What changed
On tip
fb519a67(after #1318), MCPdescribe_algorithm/list_algorithmsalready namealgorithm_specwithmodelandbase_url, and a successfulalgorithm_spec(those fields passed) already pointsnextatplan(..., probe=true)and a cappedstart. #1317 rewrites one different shared error phrase into tool language.The leftover a host actually reads is the placeholder refusal from
algorithm_specitself, whenmodel/base_urlwere omitted. That path still spoke CLI, and itsnexttold the host to hand-edit the written spec and thenplan.MCP
algorithm_specplaceholder refusals inwarnings,error, andnextnow name Path A fields: re-callalgorithm_specwithmodelandbase_url(never guess those), and do not start. They no longer contain--model/--base-url, or attribute the placeholders toinit.The CLI
algorithms run/initwording is unchanged. Thealgorithm_spectool description mentions this wording.changelog.d/1319-mcp-algorithm-spec-placeholder-wording.md.Verification
Tip SHA: ff534ed
Ran:
pytest -q -o addopts='' tests/test_mcp_algorithm_spec_placeholder_wording.py tests/test_mcp_plan_start_wording.py tests/test_mcp_algorithm_spec.py tests/test_mcp.py tests/test_missing_cli_kind_remedy.py tests/test_resume_quota_exhausted.py→ 74 passedpython -m tools.changelog_fragments check→ 65 changelog fragment(s) OKpython -m tools.gen_api_docs --check→ docs/api.md is up to dateNot run: