Skip to content

Stackpilot 0.3.1 — perf + correctness pass

Latest

Choose a tag to compare

@evil1morty evil1morty released this 09 May 01:11
· 3 commits to main since this release

First public release on this repo. Performance + correctness pass focused on long-term maintainability and the start/stop user flow. No new features over 0.3.0; this is a hardening release.

Install

Pick one:

  • Stackpilot_0.3.1_x64_en-US.msi — standard Windows installer
  • Stackpilot_0.3.1_x64-setup.exe — NSIS installer (smaller, same product)

Requires Windows 10 1803+ (for WebView2). Scoop is bootstrapped on first run if it's not already installed.

Highlights

Bugs fixed

  • TOCTOU on running_pid across scoop install/update/uninstall/bootstrap and presets_apply — concurrent invokes could both pass the busy check.
  • TOCTOU on services_start — concurrent same-key starts could both run init_step (Postgres initdb corrupting the data dir).
  • service_logs::tail partial-line drop trimmed the wrong end of a truncated read.
  • services_stop now refuses with a clear error when a start is in flight; services_restart surfaces both errors when the start step fails.
  • validate_config_path now canonicalizes via dunce and walks the deepest existing ancestor — symlinks/junctions can't escape the Scoop root.
  • Frontend log + service-tail polling re-checks its cancellation flag after each awaited IPC.

Performance

  • One shared reqwest::Client across health probes + scoopsearch (was building TLS state per call).
  • CatalogCache hands out Arc<Vec<AppEntry>> instead of cloning the 3,800-entry vector on every keystroke.
  • services_list takes one GetExtendedTcpTable snapshot (was hitting the kernel ~3× per service).
  • scoop_root() cached for the process lifetime; invalidated on bootstrap + refresh.
  • Operation log appends switch from O(n²) spread to in-place push + splice-trim.
  • Polling pauses when the window is hidden to tray.
  • services_tail_log skips the read entirely when size_bytes is unchanged.
  • 30-min wall-clock watchdog on the scoop subprocess.

Memory leaks

  • service_logs::reap_orphans cleans logs of uninstalled services.
  • ssl::reap_orphans cleans cert + key files for hosts no longer referenced by any project.

Maintenance

  • Extracted crate::winutil (hide_console_*, PATHEXT-aware which) and crate::http (shared client) modules.
  • Three scoop ops collapse into one run_scoop_app_op body.
  • eprintln! → log::warn!; env_logger initialised at startup.
  • Rotating config-write backups (<path>.{1,2,3}.bak) instead of clobbering a single .bak.

Full changelog: see CHANGELOG.md.