Skip to content

v1.5.4 — hygiene & cleanup

Choose a tag to compare

@siropkin siropkin released this 15 May 17:15
· 21 commits to main since this release
74e3a5c

Hygiene & cleanup release. No user-visible runtime change since v1.5.3 — the status-bar copy, daemon contract, settings shape, and click-through URL are unchanged. Internal-only: stricter compile-time checks, a src/budiClient.ts split into focused modules, expanded test coverage with CI gates, a persisted version-stale toast, and a small docs/cross-version cleanup.

Fixed

  • Persisted the version-stale upgrade toast across reloads (siropkin/budi-cursor#79 / PR #87). The version-stale toast (budi · update needed) now fires at most once per install per unique stale-daemon signature instead of once per reload — the previous module-level apiVersionWarningShown flag was lost on every editor restart, so dismissing the toast didn't stick. Signature is ${version}|${api_version} persisted under budi.lastWarnedStaleSignature in globalState; a user who later bumps to a different stale daemon (e.g. 8.4.0 → 8.4.1, both api_version=1) gets a fresh warning, while dismissing against the same daemon survives reloads. The polling loop continues running uninterrupted on the stale path — refreshData always re-arms — and a regression test pins the end-to-end "daemon too old" flow: fetch /health → classify version-stale → render budi · update needed → tooltip names budi update → shouldShowVersionStaleToast flips once and stays off.

Maintenance

  • Split src/budiClient.ts into focused modules (siropkin/budi-cursor#70 / PR #91). The 547-LOC client is gone; HTTP, health, render, and config now each live in their own files (src/http/statuslineClient.ts, src/health/healthState.ts, src/render/{statusText,tooltip,clickUrl}.ts, src/config/endpoints.ts) with per-module unit tests. extension.ts imports from the new paths directly — no compat shim, since the extension has no production users yet. Byte-identical statusline / tooltip behaviour; coverage thresholds re-targeted to the new layout.
  • Fleshed out sessionStore tests and hardened v1 contract writes (siropkin/budi-cursor#72 / PR #92). writeActiveWorkspace now writes atomically (temp file + rename) so a crash mid-write can never leave half-written JSON, and no-ops on a falsy workspace path. Test suite grew from a single contract-version assertion to a real suite covering the cursor-sessions.json v1 contract (ADR-0086 §3.4): v1 shape, parent-dir creation, idempotent repeated writes, atomic-write semantics, no-op for non-workspace activations, no temp-file leak on success, safe behavior on unwritable target paths. Coverage threshold for src/sessionStore.ts lifted from 30/30/100/0 to 97/97/85/100.
  • Dropped the legacy today_cost / week_cost / month_cost fallback in resolveCosts (siropkin/budi-cursor#68 / PR #90). Pre-#224 daemons emitted the deprecated 8.0 aliases as a one-release backward-compat shim; the canonical cost_1d / cost_7d / cost_30d fields have been the wire shape since siropkin/budi#224 and are guaranteed by every daemon advertising api_version >= 3. Because MIN_API_VERSION = 3 already gates out every daemon old enough to lack the canonical fields (they fall into the version-stale path and render budi · update needed), the alias fallback inside resolveCosts was already unreachable. Stripped the alias fields from StatuslineData, simplified resolveCosts to read the canonical shape only, and removed the two alias-fallback regression tests. MIN_API_VERSION unchanged (the canonical contract long predates the api_version=3 floor).
  • Dropped a cross-version line from the README troubleshooting section (siropkin/budi-cursor#73 / PR #89). README §"budi · update needed" no longer hardcodes "v1.5.x requires a v8.4.2-or-newer daemon" — exactly the cross-version narrative the user-visible copy scope rule says to keep out of marketplace-visible files. The runtime tooltip already names the installed daemon version and the required api_version.
  • End-to-end code review of src/ against SOUL.md (siropkin/budi-cursor#67 / PR #83). Audit-only, no behaviour change.
  • Tightened TypeScript strict flags and ESLint rule set (siropkin/budi-cursor#82 / PR #84). Tighter compile-time checks; no shipped JS difference.
  • Dead-code sweep (siropkin/budi-cursor#81 / PR #85). Dropped unused eslint-config-prettier dependency and the unused InstallPlatform export.
  • Vitest coverage thresholds + CI gate (siropkin/budi-cursor#71 / PR #88). npm run test:coverage runs the v8 provider against src/** with per-file floor thresholds; CI fails when coverage drops on any tracked file. Workflow surfaces a per-file coverage table in the PR check summary and uploads the full HTML report as an artifact. Thresholds start at today's floor — ratchet up in follow-ups as test coverage grows.
  • CHANGELOG hygiene pass (siropkin/budi-cursor#80 / PR #86). Aligned headers to Keep a Changelog format and moved compare URLs to the bottom of the file.
  • Confirmed MIN_API_VERSION = 3 still matches v8.4.2's /health.api_version (siropkin/budi-cursor#79). No bump required for this release.