Repository navigation
fix(server): return an explicit absent result from sumo_qa_check_external_skill_installed - #834
Conversation
…rnal_skill_installed
A missing skill made the wrapper return None, which MCP serialized as empty
content, so the host could not tell "not installed" from an output-less call.
The wrapper now returns {"installed": false, "skill", "scope"} (no candidate
paths), typed as CheckExternalSkillNotInstalledOutput alongside the found model
and the error envelope. The library function keeps its None contract.
The suggesting-external-skill step 1 names the absent result as a fall-through
to search, and the eval fixtures and TS-12 scenario carry the real wire shape.
Closes #821
Merge-readiness evidence, head
|
| # | behaviour | observed | met |
|---|---|---|---|
| 1 | absent skill returns non-empty text with installed: false |
{"installed": false, "skill": "zzz-not-a-skill", "scope": "auto"} |
yes |
| 2 | found / absent / error distinguishable | found {name, path, agent, scope}; absent {installed: false, ...}; error {"isError": true, "error": {"type": "ValueError", "message": "skill is required", ...}} |
yes |
| 3 | found output and precedence unchanged | identical to origin/main for a global skill and for a project-over-global collision |
yes |
| 4 | no more "completed with no output" | branch: non-empty JSON content; origin/main: (… completed with no output) |
yes |
| 5 | suggesting-external-skill falls through on installed: false |
router -> suggesting skill -> check (installed: false) -> sumo_qa_search_external_skills -> stops at the [y/N] gate; zero install/execute calls |
yes |
Existing flow: using_sumo_qa + sumo_qa_load_classifications produce byte-identical results on branch and origin/main.
Evals (haiku candidate, claude-opus-5-5 judge, repeat 1, this head): skill-suggesting-external-skill.yaml 1/1. skill-suggesting-external-skill-conversion.yaml 7/8; the failing case ("execute success returns a skill_body to FOLLOW") then passed 3/3 on this head and 3/3 on origin/main at repeat 3, and its graded path is untouched by this diff, so the single failure is candidate variance, not a regression.
Acceptance criteria (#821):
- Absent skill returns non-empty text with a stable discriminator: met (
installed: false). "Structured content" is not served:_drop_structured_output(perf(server): slim always-on tools/list (drop outputSchema + schema titles) #335) strips it from every tool. - Output schema covering found, absent, error: met only as the typed return union (
CheckExternalSkillInstalledOutput | CheckExternalSkillNotInstalledOutput | ErrorEnvelope); no servedoutputSchema(perf(server): slim always-on tools/list (drop outputSchema + schema titles) #335). Drift recorded on [Bug]: sumo_qa_check_external_skill_installed returns empty content instead of its documented null for a missing skill #821. - Found output and search precedence compatible: met (4.7 row 3).
- Claude Code no longer renders "completed with no output": met (4.7 row 4).
- Unit, server-dispatch, schema, annotation, snapshot tests: met.
- Suggesting-external-skill handles the absent result: met (4.7 row 5).
Review threads: 0.
🤖 I have created a release *beep* *boop* --- ## [0.73.1](v0.73.0...v0.73.1) (2026-10-04) ### Bug Fixes * **server:** return an explicit absent result from sumo_qa_check_external_skill_installed ([#834](#834)) ([ad44ce5](ad44ce5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: release-please[bot] <release-please[bot]@users.noreply.github.com>
Summary
For a skill that is not installed,
sumo_qa_check_external_skill_installedused to returnNone, which the host received as empty content ("completed with no output"). It now returns{"installed": false, "skill": "<name>", "scope": "<requested scope>"}. The found result and the error envelope are unchanged.Related issue
Closes #821
Changes
src/sumo_qa/server.py: the MCP wrapper returns the absent dict when the library returnsNone. The library function keeps returningNonefor its other caller. The return type is nowCheckExternalSkillInstalledOutput | CheckExternalSkillNotInstalledOutput | ErrorEnvelope.src/sumo_qa/server_schemas.py: new strictCheckExternalSkillNotInstalledOutput(installed: Literal[False],skill,scope; no extra fields, so no candidate paths leak).skills/sumo-qa-suggesting-external-skill/SKILL.mdstep 1:installed: false, like an executeisError, falls through to search.skill-suggesting-external-skill*.yaml) andtests/scenarios/TOOL-SELECTION.mdTS-12 use the real result shape instead of "returned null".Drift from the issue text: the issue asks for structured content and a served output schema. No tool serves
outputSchema/structuredContent(_drop_structured_output, #335), and the tools-list snapshot pinsoutputSchema: null. The contract here is the typed three-way return union, delivered as JSON text; re-enabling output schemas for one tool would go against #335.How it was verified
tests/test_external_skills.py::test_check_external_skill_installed_dispatch_separates_found_absent_and_errorruns found, absent and error through realcall_tooldispatch with an empty HOME and cwd; it failed before the fix withJSONDecodeErroron empty content.tests/test_server_schemas.pyadds rejection cases for the absent model.mypy(the only failure on the previous head) and pytest on ubuntu, macOS and Windows, py3.10 to py3.14. Mutation gate run 37165090383: 0 survivors, strict gate passed.installed: falsecontent (origin/mainshows "completed with no output"), keeps found output and precedence identical toorigin/main, and the suggesting-external-skill flow falls through to search and stops at the[y/N]gate. Full ledger in the proof comment.claude-opus-5-5judge):skill-suggesting-external-skill.yaml1/1; conversion config 7/8, the one failure passed 3/3 on this head and 3/3 onorigin/mainwhen repeated (candidate variance on an untouched path).audit_context_budget.py: context budget OK./code-reviewhigh on the whole diff; round 1 fixed a stale "was null" eval sentence, an em-dash in the rewritten skill line and thescopefield description; the fix-delta reviews found no defects.Not changed, noted for later: the found result has no
installed: truekey (hosts tell outcomes apart bypath), kept so found output stays byte-compatible. The suggesting-external-skill SKILL.md still has em-dashes on lines this PR did not touch, andscripts/check_no_em_dashes.pydoes not scanskills/.Checklist
pytest) and lint/type checks are green (pre-commit run --all-files,python -m mypy)