Skip to content

POK-87: Make npm agent uninstall registry match runtime behavior#32

Merged
saheljalal merged 1 commit into
mainfrom
pok-87-uninstall-cmd-npm-agents
Jul 3, 2026
Merged

POK-87: Make npm agent uninstall registry match runtime behavior#32
saheljalal merged 1 commit into
mainfrom
pok-87-uninstall-cmd-npm-agents

Conversation

@saheljalal

Copy link
Copy Markdown
Collaborator

Summary

  • Fix resolve_uninstall_cmd() precedence: explicit uninstall_cmd (including None) now wins over npm version_check derivation.
  • Remove misleading "uninstall_cmd": None from twelve npm agents; npm uninstall is derived from version_check when no explicit command is set.
  • Add regression tests for both behaviors.

Closes POK-87

Test plan

  • test_aikit_npm_agent_uninstall_derived_from_version_check
  • test_aikit_explicit_uninstall_cmd_none_blocks_npm_derivation
  • test_aikit_goose_uninstall_uses_brew_only_for_homebrew_install

Honor explicit uninstall_cmd before npm derivation and remove misleading
None entries from twelve npm agents so version_check drives npm uninstall.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: multica-agent <github@multica.ai>

@saheljalal saheljalal left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Review — POK-87: npm agent uninstall registry

Verdict: Approve. Small, correct, and well-tested. The registry is now self-consistent and I confirmed runtime behavior is genuinely unchanged for all 31 agents.

What I verified

  • Precedence flip is behavior-neutral. Scanned all 31 agents: exactly 12 are npm-version_check agents, and none retains an explicit uninstall_cmd. So no current agent hits the new "explicit wins over npm" branch with a value that differs from the old npm derivation — every agent resolves to the same command as before. The flip changes intent/semantics, not output.
  • No stale key reads. uninstall_cmd is only read through resolve_uninstall_cmd() (vendor-cleanup scan + uninstall loop). Removing the 12 dead None rows can't KeyError — access is via in / .get().
  • None path still handled downstream. Explicit None short-circuits to "no automated uninstall — remove manually", which the loop already prints; the new test_..._none_blocks_npm_derivation locks it in.
  • Tests green. Full tests/test_tools_characterization.py passes (153), including both new regression tests.
  • Version bump (1.15.5) and CHANGELOG entry are consistent and dated today.

Nit (optional, non-blocking)

  • Consider one more test asserting an explicit non-None uninstall_cmd on an npm agent wins over the derived npm command — that's the actual precedence guarantee this fix introduces, and nothing in the current registry exercises it, so a future edit could regress it silently. Purely defensive; fine to skip.

Nice call choosing to both drop the dead None rows and honor an explicit uninstall_cmd — self-consistent registry without losing the escape hatch.

@saheljalal saheljalal merged commit 0e763c1 into main Jul 3, 2026
1 check passed
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