Skip to content

fix(vscode): review follow-ups for #907 (runtime-coverage)#985

Merged
BartWaardenburg merged 3 commits into
mainfrom
fix/vscode-907-followups
Jun 4, 2026
Merged

fix(vscode): review follow-ups for #907 (runtime-coverage)#985
BartWaardenburg merged 3 commits into
mainfrom
fix/vscode-907-followups

Conversation

@BartWaardenburg
Copy link
Copy Markdown
Collaborator

Fix-forward PR landing the review follow-ups for the already-shipped Runtime Coverage view (#907). Source of truth: the ### #907 section of the VS Code batch review.

Blocker (resolved)

  • Coverage gate errors were swallowed. License/sidecar gate exits (3/4/5) rejected through the generic fallback and surfaced only fallow exited with code N; the CLI's structured {error:true,message,exit_code} stdout envelope was discarded because it was only parsed on the resolve (exit 0/1) path. execFallow now rejects with a typed FallowExecError that carries exitCode + stdout, and runCoverageAnalysis recovers the envelope, surfacing the real message plus a concrete next step: exit 3 (license) points at fallow license activate --trial, exit 4/5 (sidecar) point at fallow coverage setup. Existing execFallow callers read only .message and are unchanged.

Concerns (resolved)

  • Prerequisite disclosure. The welcome state and the fallow.coverage.capturePath setting description now state that the fallow-cov sidecar (and a runtime-coverage license/trial when a license is present) is required, with fallow coverage setup as the first step.
  • License grace watermark. report.watermark was never read, so candidates produced under a stale/expired license rendered as authoritative. It is now surfaced as a one-time warning toast on load (grace, trial-expired, and unknown variants), with a refresh hint for the grace case.
  • Version floor. COVERAGE_ANALYZE_MIN_VERSION was pinned to 2.77.0, but local coverage analyze --runtime-coverage ... --format json shipped in 2.57.0; valid CLIs 2.57.0-2.76.x were needlessly rejected. Pinned to 2.57.0 and corrected the JSDoc.

Nits (applied)

  • Humanized the snake_case confidence enum (e.g. very_high -> very high) in leaf tooltips.
  • Documented the Runtime Coverage view, its three commands, and its two settings in the extension README.

Nits (deferred, with reasons)

  • runtime_coverage null-check is dead code (harmless defensive). Left as-is; the report flags it as harmless.
  • Badge double-counts a hot-path-and-cleanup function (cosmetic, matches plan). Left as-is per the plan.
  • coverageProvider EventEmitter not pushed to context.subscriptions. Deferred: no sibling provider (health/security/dead-code/dupes) is pushed either; only their TreeViews are. Fixing only coverage would diverge from the established convention. The host tears the emitter down on deactivate.
  • ConfigurationTarget vs declared resource scope. Deferred: the picker resolves everything against folders[0], so the Workspace target is internally consistent for the single-root common case. Proper per-folder (WorkspaceFolder) writes are a larger multi-root change outside this fix-forward.
  • fallow-docs companion entry. Out of scope per the task (do not touch fallow-docs); the in-repo README is updated instead.

Tests

  • Extended coverage-utils.test.ts (gate-message special-casing for exit 3/4/5 + fallback, watermark copy, confidence formatting, the 2.57.0 floor) and package-manifest.test.ts (prerequisite disclosure in the welcome and capture-path setting).

Green gate

codegen:types, check:codegen, lint, build, and test:unit all pass. The dist bundle was rebuilt before commit.

Issue #907 is already closed; no closing keyword.

- Surface coverage gate errors: execFallow now rejects with a
  FallowExecError carrying exitCode + stdout, so the runtime-coverage
  path recovers the structured {error,message,exit_code} JSON envelope
  instead of a bare 'exited with code N'. Exit 3 (license) and exit 4/5
  (sidecar) are special-cased with concrete next steps (fallow license
  activate / fallow coverage setup).
- Disclose the sidecar/license prerequisite in the Runtime Coverage
  welcome state and the fallow.coverage.capturePath setting description.
- Surface the license grace/trial watermark as a one-time warning on
  load so 'Safe to Delete' candidates produced under a stale license are
  not treated as authoritative.
- Pin COVERAGE_ANALYZE_MIN_VERSION to 2.57.0 (when local coverage
  analyze --format json shipped); 2.77.0 needlessly rejected valid CLIs.
- Humanize the snake_case confidence enum in leaf tooltips.
- Document the Runtime Coverage view, commands, and settings in the
  extension README.
- Extend coverage-utils and package-manifest unit tests.
@BartWaardenburg BartWaardenburg merged commit 7b73603 into main Jun 4, 2026
23 checks passed
@BartWaardenburg BartWaardenburg deleted the fix/vscode-907-followups branch June 4, 2026 19:03
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