Skip to content

fix: diagnose update path conflicts#1

Open
hehanlin1996 wants to merge 1 commit into
mainfrom
ai-fix-20260515-install-update
Open

fix: diagnose update path conflicts#1
hehanlin1996 wants to merge 1 commit into
mainfrom
ai-fix-20260515-install-update

Conversation

@hehanlin1996
Copy link
Copy Markdown
Owner

Summary

Improve lark-cli update diagnostics for install/update instability reported around multiple installation paths and post-update binary verification failures.

Changes

  • Add PATH scanning for multiple lark-cli executables and surface a path_conflict block in JSON output plus a human-readable warning in update --check, manual-update, update-success, and verification-failure paths.
  • Expand binary verification failure hints to explain stale npm/temp-path cases and tell users to check lark-cli --version, clear shell command cache, and inspect duplicate installs.
  • Cover the new diagnostics with TDD unit tests for human output, JSON output, and verification hint text.

Test Plan

  • go test ./cmd/update -run 'TestUpdateCheck_(HumanWarnsOnMultiplePathCandidates|JSONIncludesPathConflict)$' -count=1 (red before implementation, green after)
  • go test ./cmd/update -run 'TestVerificationFailureHintExplainsStaleNpmPath|TestUpdateNpmVerifyFail_JSON_NoRestoreHintWhenBackupUnavailable|TestUpdateCheck_(HumanWarnsOnMultiplePathCandidates|JSONIncludesPathConflict)$' -count=1
  • go test -race -count=1 ./cmd/update ./internal/selfupdate
  • go vet ./cmd/update ./internal/selfupdate
  • git diff --check
  • go run . update --help
  • make unit-test currently fails in unrelated shortcuts/base MIME expectation: large-report.bin resolves to application/x-sega-cd-rom instead of expected application/octet-stream on this runner.

Related Issues

  • Feedback cluster: C2-INSTALL-UPDATE (BASE-20260515-037, BASE-20260515-058)

Co-Authored-By: Aiden
@hehanlin1996 hehanlin1996 force-pushed the ai-fix-20260515-install-update branch from 71ead71 to ff48020 Compare May 17, 2026 13:05
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