Skip to content

fix(setup): make the comdev MCP test pass ruff format and mypy - #2202

Merged
KatalKavya96 merged 1 commit into
apache:mainfrom
KatalKavya96:fix/main-prek-comdev-test
Nov 20, 2026
Merged

KatalKavya96 merged 1 commit into
apache:mainfrom
KatalKavya96:fix/main-prek-comdev-test

Conversation

@KatalKavya96

Copy link
Copy Markdown
Member

Summary

  • prek on main has failed since fix(setup): resolve comdev MCP dirs from the registered index.js #2199 (f91ddf36): ruff format wants to wrap three long lines in plugins/magpie-setup/skills/isolated-setup-update/tests/test_comdev_mcp.py, and mypy rejects REAL_GIT (str | None from shutil.which) in the subprocess.run argument list (line 72).
  • This formats the file and adds assert REAL_GIT is not None in _git. The test class is already skipped without git, so the assert only states that invariant and narrows the type. No behaviour change.

Type of change

  • CI / dev loop (prek, workflows, validators)

Test plan

  • tools/dev/run-workspace-check.sh ruff-format, ruff and mypy pass for all members (they failed for plugins on main before the change)
  • pytest plugins/magpie-setup/skills/isolated-setup-update/tests/test_comdev_mcp.py: 24 passed, 1 skipped (needs zsh)

RFC-AI-0004 compliance

No principle touched: test formatting and typing only.

Linked issues

Fixes the main breakage from #2199. Why #2199's own PR checks did not catch it is tracked in #2201.

Notes for reviewers (optional)

On #2199's PR run, ruff format and mypy printed "(no files to check) Skipped": their files: filter only matches paths under tools/, while the test lives in the plugins workspace member. That gap is #2201, kept separate from this fix.


Generative AI disclosure: written with help from Claude Code (Opus 5.5). I've read every line of the diff and run the checks.

prek on main has failed since apache#2199: ruff format wants to wrap three
long lines in the isolated-setup-update comdev MCP test, and mypy
rejects passing `REAL_GIT` (`str | None` from `shutil.which`) into the
`subprocess.run` argument list. The test class is already skipped when
git is missing, so `_git` now asserts that invariant, which narrows the
type. No behaviour change: 24 passed, 1 skipped (needs zsh).

Generated-by: Claude Code (Opus 5.5)
@github-actions github-actions Bot added family:setup setup-* skills capability:platform Framework / agent substrate skills (install, verify, doctor, override, status, setup bootstrap) labels Nov 19, 2026

@Kaap10 Kaap10 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@KatalKavya96
KatalKavya96 merged commit 51b86b0 into apache:main Nov 20, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capability:platform Framework / agent substrate skills (install, verify, doctor, override, status, setup bootstrap) family:setup setup-* skills

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants