Repository navigation
test(skills): run the starter-skill imports in one CLI process - #8013
Conversation
…per skill test_cli_imports_every_starter_skill started a fresh `python -m gaia.cli` for each of the ~24 starter skills. Each cold start costs ~3.5 s (the CLI imports the agent base, the LLM clients and matplotlib up front), so the test took ~80 s on an idle box and blew its 180 s timeout on loaded macOS runners. The imports now run through the real gaia.cli.main in one interpreter, each with its own captured exit code, stdout and stderr; the final `skill list` is still a separate process, so what landed on disk is checked from cold. A new test proves batching keeps a failed command's exit code and error and does not leak them into the next command.
|
Verdict: Approve with suggestions This fixes the macOS CI timeout in the starter-skill import test by running all ~24 imports in one CLI process instead of paying a cold start for each one. It still checks each import's own exit code and error message, and the final Real-world evidenceN/A: this PR only changes tests. No user-facing surface changed, so the verdict rests on static review and the author's test-plan runs. 🔍 Technical detailsIssues found 🟢 The batch driver drops the text of a Checked and fine
Strengths
|
|
Leaving the 🔍 Technical detailsThe only string |
The starter-skill CLI test keeps timing out on macOS CI (#7887, #7912). It launched a fresh
gaiaprocess for each of the ~24 starter skills, and every cold start costs ~3.5 s, so the test took ~80 s on an idle machine and went past its 180 s limit on a loaded macOS runner. The imports now run through the real CLI entry point in one process, each still checked for its own exit code and error message, and the test takes ~9 s.What it checks is unchanged: every in-ceiling skill imports, every over-ceiling one is refused with exit 4 and a "ceiling" message, and a separate cold
gaia skill list --jsonthen sees exactly the importable set.Test plan
pytest tests/unit/test_starter_skills.py -n 4: 311 passed, 22 skipped-n 3run of the file): old test 84 s, new test ~9 stest_batched_cli_keeps_each_commands_own_exit_code_and_stderr: a failing import keeps the same exit code as a standalone run, and its error doesn't leak into the next commandpython util/lint.py --black --isort