Skip to content

EasySkills 2.2.0 — Reparse-Point Safety & Update Atomicity

Choose a tag to compare

@RunhuaHuang RunhuaHuang released this 11 Jul 05:56
· 22 commits to main since this release

EasySkills 2.2.0

Data Safety (Windows)

Two critical issues in deploy.ps1 that could cause permanent loss of the
central skill library
on Windows PowerShell 5.1 have been fixed.

  • Never delete link-target contents. All four junction-removal sites
    previously used Remove-Item -Recurse -Force, which on a directory junction
    can traverse into and delete the real contents of the link target. Now
    every reparse point is removed with [System.IO.Directory]::Delete(path, $false) — the link itself only, never its target.
  • Detect and replace dangling junctions. Test-Path follows reparse
    points, so a dangling junction (target removed) reported False and was
    skipped — then New-Item failed because the dead link still occupied the
    name, silently leaving that skill unmapped for that agent. Now uses
    Get-Item -Force (attributes), which sees the entry regardless of whether
    its target exists. This closes a cross-platform parity gap: deploy.sh
    already handled this correctly with [ -e ] || [ -L ].

Update & Rollback Atomicity (macOS + Windows)

The self-update and rollback rename rotations could, in a narrow failure
window, destroy the currently-running version or brick every subsequent
rollback. Both backends are now hardened.

  • Self-update rollback no longer destroys the current version. When the
    second rename (new → current) failed after the first (current → .bak)
    succeeded, the old recovery code did rmtree(_maintenance.bak) — which at
    that point held the running version. The recovery now undoes the first
    rename (moves .bak back to current) and restores the pre-existing backup
    snapshot.
  • Rollback pre-cleans .prev and recovers from failure. A stale
    _maintenance.prev left by a prior failed rollback made every subsequent
    rollback fail forever (POSIX rename refuses to overwrite an existing
    directory). Now .prev is pre-cleaned, and if the second rename fails the
    current version is restored from .prev.
  • Self-update validates the download host (Windows). webui.ps1
    Run-SelfUpdate now rejects download URLs whose host is not a trusted
    GitHub delivery host, matching the webui.py
    _is_github_download_url guard that already existed on macOS/Linux.

Robustness

  • Run-DeployCommand no longer deadlocks on large output (Windows).
    Reading both stdout and stderr synchronously via ReadToEnd() deadlocks
    when the child fills the OS pipe buffer (~64 KiB) on one stream while we
    block on the other. Now uses ReadToEndAsync() so the 30 s timeout is
    effective and both buffers drain concurrently.
  • Token loader recovers from a corrupt token file (macOS/Linux). A prior
    interrupted write could leave the token file existing-but-empty; the
    O_CREAT | O_EXCL path could never replace it, raising RuntimeError in a
    loop across restarts and bricking startup. A persistently-invalid file is
    now reclaimed (unlinked and recreated).

Agent Support

  • Add MiniMax Code as the 43rd supported agent target:
    • macOS/Linux: ~/.mavis/skills
    • Windows: %USERPROFILE%\.mavis\skills

Validation

  • Agent-path and version assertions now derive from agents.json /
    _maintenance/.version (single sources of truth) so they never go stale on
    release — the root-cause fix for the stale-version-assertion bug seen in
    2.1.0.
  • 8 new contract tests guard each fix above (reparse-point non-recursive
    delete, attribute-based dangling detection, download-host allowlist,
    self-update rollback undo, rollback .prev pre-clean + recovery, async
    stream reads, corrupt-token reclaim).
  • All 66 tests pass.

⚠️ Windows users: This release fixes two critical data-loss bugs in deploy.ps1. If you have been running 2.1.0 on Windows, update as soon as possible. The PowerShell-side fixes are validated via contract tests and code review against PS 5.1 semantics, but a full smoke test on a real Windows machine is recommended.