#2634

fix(update): skip unsupported automatic global targets

Openwufei-pngwants to merge intofrom

Problem

skills update -g -y reinstalls skills in-process using automatically selected agents. PromptScript can produce an unsupported-global failure after the skill was updated, and a detected Eve can become the only target, causing the global update to fail even when a compatible destination exists.

Change

  • Make automatic update placement scope-aware and reuse the existing global-agent skip notice and no-compatible-target fallback.
  • Prefer compatible automatic targets for global updates while retaining Eve and recorded subagent placement for project updates.
  • Keep CLI test homes isolated from inherited GROK_HOME and SARVAM_HOME; preserve an external Grok skill as a regression sentinel.
  • Keep this change independent of #1571, which covers global add selection.

Validation

  • pnpm exec vitest run with macOS TMPDIR resolved to its physical /private/var/... path: 79 files, 1,057 tests passed. The six invalid-lock path assertions that fail with the default /var/... symlink spelling also fail on an unchanged upstream snapshot.
  • pnpm type-check, pnpm format:check, pnpm build, and git diff --check.
  • Loopback Well-Known integration tests and built-CLI smoke checks verify updated file contents and lock digests for Codex, detected Eve plus Codex, and agent-context defaults. A local Git fixture verifies project updates to both the Eve root and a recorded subagent.
  • The three global regression scenarios fail against unchanged upstream production code; the project Eve scenario passes there.
  • Both merge orders with #1571 produce the same clean merge tree; 166 focused tests and type checking pass on that combined tree.
  • Windows CI has not run: the CI run is awaiting maintainer approval and has no jobs yet.