Skip to content

fix(desktop): keep installed skilllite when prebuild has no engine - #174

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-investigation-b5dd
Draft

cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-investigation-b5dd

Conversation

@cursor

@cursor cursor Bot commented Sep 25, 2026

Copy link
Copy Markdown

Summary

  • Standalone desktop prebuild deleted ~/.skilllite/bin/skilllite before using that same file as the fallback binary. A tauri build / npm run prebuild:tauri with no engine checkout removed the user's CLI and then failed.
  • Lookup and copy now happen before any delete. If the only installed binary is already ~/.skilllite/bin/skilllite, it is left in place. A failed copy does not remove the previous destination.

Task Linkage

  • Task ID: N/A
  • Task folder: lightweight bugfix; no tasks/TASK-.../ folder

Injected Specs

  • spec/verification-integrity.md
  • spec/testing-policy.md
  • spec/docs-sync.md (reviewed; no doc change)
  • spec/architecture-boundaries.md (not applicable)
  • spec/security-nonnegotiables.md (not applicable)

Validation Evidence

  • Commands executed:
    • bash skilllite-assistant/scripts/test-engine-root.sh
    • Replayed the old delete-then-lookup order against HEAD:skilllite-assistant/scripts/prebuild-skilllite.sh and a throwaway HOME
  • Key results:
    • engine-root.sh checks passed (exit 0). The missing-source case prints cp: cannot stat ... does-not-exist and still leaves the destination intact.
    • Old script: lookup_line=15, rm_line=13, order assertion FAIL.
    • After rm -f ~/.skilllite/bin/skilllite, skilllite_find_installed_bin reports LOOKUP_AFTER_DELETE: not found.
  • Not run: cargo fmt --check, cargo clippy, cargo test. This change is shell-only under skilllite-assistant/scripts/.

Regression Scope

  • Areas likely affected:
    • skilllite-assistant/scripts/prebuild-skilllite.sh (beforeBuildCommand)
    • skilllite-assistant/scripts/prebuild-skilllite-dev.sh (forced dev refresh with no engine checkout)
  • Explicit non-goals:
    • Engine CLI/MCP behavior, sandbox policy, and the engine-checkout cargo install path (that path still replaces ~/.skilllite/bin after an engine root is found)

Docs Sync (EN/ZH)

  • Not needed
  • Files: none. The script header already described reusing an installed binary; this restores that behavior. No new env var or command.

Review Checklist

  • Lightweight mode (Task ID: N/A); no task-folder acceptance file
  • tasks/.../STATUS.md not used
  • tasks/.../REVIEW.md not used
  • tasks/board.md not updated (no task folder)
Open in Web View Automation 

Standalone prebuild deleted ~/.skilllite/bin/skilllite before falling
back to that same file, so a desktop build with no engine checkout
removed the user's CLI and then failed.

Co-authored-by: EXboy <EXboys@users.noreply.github.com>
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