Skip to content

test(cli): the commands that never hand over to the pinned km run the km that was started - #40

Merged
pasrom merged 1 commit into
mainfrom
test/upgrade-runs-this-km
Nov 6, 2026
Merged

pasrom merged 1 commit into
mainfrom
test/upgrade-runs-this-km

Conversation

@pasrom

@pasrom pasrom commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

A note said that uvx --from git+https://github.com/pasrom/km@<tag> km upgrade needs KM_LOCAL=1, because otherwise the brain's older pinned km would run instead. That is not so: upgrade (with init, doctor, list and sync) is in NO_PIN_CHECK and never hands over to the pinned km.

Checked by hand: a brain pinned to v1.2.0, uvx --from ...@v1.8.1 km upgrade without KM_LOCAL ran v1.8.1 and moved every pin to v1.8.1, with no "running that one" line.

Changes:

  • tests/team_smoke.sh: for each of init, upgrade, doctor, list and sync, in a brain pinned to an older km, km <cmd> --root ... --help must exit 0, must not call the runner and must not print "running that one". The failure line shows rc, the runner arguments and the output.
  • src/km/cli.py docstring and skills/km/SKILL.md (body, "Running km"; the description is unchanged): name the commands that always run the started km, so nobody adds KM_LOCAL=1 to km upgrade again.

Evidence: team_smoke 119 passed, 0 failed. Mutation check: with doctor removed from NO_PIN_CHECK the doctor case fails (118/1), restored afterwards; earlier, with upgrade removed, the upgrade case failed.

Reviews actually run: /simplify (one reviewer, all four angles): clean, one suggestion applied (check the exit code). /code-review (medium): no correctness bug, 5 findings; applied: cover the whole NO_PIN_CHECK set, show rc and output in the failure line, assert no "running that one" notice, name the commands in the docs. Not applied: a real upgrade on a throwaway copy (the existing case "upgrade moves older pins to this km" covers that a real upgrade moves the pins).

@pasrom
pasrom force-pushed the test/upgrade-runs-this-km branch from a31a08b to 551aa4a Compare November 6, 2026 21:01
… km that was started

upgrade, init, doctor, list and sync are in NO_PIN_CHECK. The smoke test now checks each of them in a brain pinned to an older km: exit 0, the runner is not called, no 'running that one' notice. The cli docstring and the skill name these commands, so nobody adds KM_LOCAL=1 to km upgrade again.
@pasrom
pasrom force-pushed the test/upgrade-runs-this-km branch from 551aa4a to d2176ef Compare November 6, 2026 21:03
@pasrom pasrom changed the title test(cli): km upgrade runs the km that was started, not the older one the brain pins test(cli): the commands that never hand over to the pinned km run the km that was started Nov 6, 2026
@pasrom
pasrom merged commit 98f65a7 into main Nov 6, 2026
4 checks passed
@pasrom
pasrom deleted the test/upgrade-runs-this-km branch November 6, 2026 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant