Skip to content

Fix evolution reset and repair workspace roots#113

Draft
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/critical-bug-investigation-a79c
Draft

Fix evolution reset and repair workspace roots#113
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/critical-bug-investigation-a79c

Conversation

@cursor

@cursor cursor Bot commented Jul 8, 2026

Copy link
Copy Markdown

Summary

  • Fixes a critical workspace split-brain bug in skilllite evolution reset --force: reset now scopes prompt/log/snapshot state to the selected workspace chat/ root and removes _evolved under the effective workspace skills root.
  • Fixes skilllite evolution repair-skills so desktop/CLI repair validates the selected workspace skills root (skills/ with .skills fallback) instead of silently scanning legacy .skills.
  • Adds focused regression coverage for reset default workspace behavior, explicit --workspace override behavior, and repair's modern-vs-legacy skills-root selection.

Bug and Impact

  • evolution reset --force could reset a different chat store through paths::chat_root() while leaving current workspace skills/_evolved intact, causing data loss in the wrong store and stale evolved skills in the intended workspace.
  • evolution repair-skills could validate .skills and report success while broken skills under modern skills/_evolved were never checked.

Root Cause

  • Recent workspace-scoping fixes aligned most evolution commands with project-local chat/ and effective skills roots, but reset/repair retained legacy/global root resolution.

Fix

  • Added --workspace/-w to evolution reset and evolution repair-skills with default ..
  • Routed reset through chat_root_for_workspace and resolve_run_skills_root.
  • Routed repair through the same effective skills-root resolver and updated the desktop repair subprocess to pass --workspace explicitly.
  • Updated EN/ZH architecture docs and task artifacts.

Task Linkage

  • Task ID: TASK-2026-070
  • Task folder: tasks/TASK-2026-070-evolution-reset-repair-workspace/

Injected Specs

  • spec/architecture-boundaries.md
  • spec/security-nonnegotiables.md (not applicable; no sandbox/security policy changes)
  • spec/testing-policy.md
  • spec/docs-sync.md

Validation Evidence

  • Commands executed:
    • rustup update stable && rustup default stable && rustc --version && cargo --version
    • cargo test -p skilllite --test cli_evolution_workspace
    • cargo fmt --check
    • python3 scripts/validate_tasks.py
    • cargo clippy --all-targets -- -D warnings
    • cargo test
    • cargo test -p skilllite
  • Key results:
    • Rust toolchain updated to rustc 1.96.1, cargo 1.96.1 after initial Cargo 1.83 edition-2024 manifest failure.
    • Focused workspace tests: 4 passed; 0 failed.
    • Task validation: Task validation passed (70 task directories checked).
    • cargo clippy --all-targets -- -D warnings: passed.
    • cargo test: passed.
    • cargo test -p skilllite: passed.

Regression Scope

  • Areas likely affected:
    • skilllite evolution reset CLI behavior and destructive workspace root selection.
    • skilllite evolution repair-skills CLI/desktop subprocess behavior.
    • Evolution workspace root selection for modern skills/ vs legacy .skills.
  • Explicit non-goals:
    • No changes to LLM repair logic.
    • No sandbox or execution policy changes.
    • No changes to unrelated legacy prompt commands (disable, explain).

Docs Sync (EN/ZH)

  • Not needed
  • Updated EN + ZH docs
  • Files:
    • docs/en/ASSISTANT-SPLIT-ARCHITECTURE.md
    • docs/zh/ASSISTANT-SPLIT-ARCHITECTURE.md

Review Checklist

  • Acceptance criteria in tasks/TASK-2026-070-evolution-reset-repair-workspace/TASK.md satisfied.
  • tasks/TASK-2026-070-evolution-reset-repair-workspace/STATUS.md updated with latest progress.
  • tasks/TASK-2026-070-evolution-reset-repair-workspace/REVIEW.md includes merge readiness decision.
  • tasks/board.md status is up to date.
Open in Web View Automation 

cursoragent and others added 2 commits July 8, 2026 11:09
Co-authored-by: EXboy <EXboys@users.noreply.github.com>
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