feat: improve task runner summary with compact one-liners#171
Merged
branchseer merged 12 commits intomainfrom Feb 25, 2026
Merged
feat: improve task runner summary with compact one-liners#171branchseer merged 12 commits intomainfrom
branchseer merged 12 commits intomainfrom
Conversation
Add --details flag for full summary and --last-details to view saved
summary from last run. Normal runs now show a compact one-liner instead
of the full summary table:
- Single task + no cache hit: no summary
- Single task + cache hit: '[vp run] cache hit, {duration} saved.'
- Multi-task: '[vp run] {hits}/{total} cache hit ({rate}%)'
Summary data is persisted as structured JSON (last-summary.json) in the
cache directory using atomic writes. Both live and --last-details
rendering share the same code path through LastRunSummary.
The TaskResult enum encodes cache status and execution outcome together,
making invalid states unrepresentable (e.g. CacheHit+exit_code,
InProcess+error).
Also fixes a pre-existing flaky test in e2e-lint-cache where oxlint
scanned node_modules, causing fspy to fingerprint the cache directory.
- Make --last-details exclusive at type level by splitting Command into ParsedCommand (clap) and Command (resolved with RunLastDetails variant) - Use ? to propagate IO errors in show_last_run_details - Replace summary_file_path with write_summary callback to decouple reporter from file paths - Remove ExecutionInfo/ExecutionStats, build TaskSummary directly in leaf reporter's finish() instead of collecting intermediate state - Add .gitignore to oxlint fixtures to prevent fspy from fingerprinting the cache directory, fixing flaky cache-miss snapshots
… is unchanged Rename --details flag to -v/--verbose and add it to all vp run steps in e2e snapshot tests. The .snap file diffs confirm that only the flag name in command echo lines and the compact summary hint text changed — the actual summary output is identical, proving the full summary rendering path is correct. This commit will be reverted so that e2e tests exercise the compact summary path (the default without --verbose).
…y output is unchanged" This reverts the test-only changes from commit 86019bc, removing --verbose from e2e test commands so they exercise the compact summary path. The --details to --verbose code rename is preserved.
96182ea to
5d10eb4
Compare
branchseer
added a commit
to voidzero-dev/vite-plus
that referenced
this pull request
Feb 24, 2026
Upgrade vite-task to voidzero-dev/vite-task#171 which replaces the verbose full execution summary with compact one-liners. Single-task runs with no cache hit show no summary. Single-task cache hits show a brief 'cache hit' message. Multi-task runs show hit rate and time saved, with a hint to use --verbose for full details. Updates cli.rs to use ParsedCommand (now exposed by vite-task) with .into_command() at dispatch points, and regenerates 25 snap tests.
fengmk2
approved these changes
Feb 24, 2026
…ache misses Tools like oxlint traverse node_modules/ during execution, which causes fspy to record reads of files in the cache directory (SQLite DB, last-summary.json). When these cache files change between runs, fspy reports them as changed inputs, causing spurious cache misses. Thread cache_dir_relative through Session -> ExecutionContext -> spawn_with_tracking to filter out cache directory accesses alongside the existing .git exclusion. Also adds summary-output e2e test fixture with 10 test cases covering compact summary, --verbose, and --last-details.
The cache directory should not be special-cased in fspy. Instead, tests that run tools like oxlint should include a .gitignore with 'node_modules' to prevent the tool from traversing the cache directory — matching the setup of real projects.
On main, finish_graph_execution always wrote the full summary and flushed. With the compact summary, single-task non-cache-hit produces no summary output, so the flush was skipped. This caused child process output written via Stdio::inherit() to not be committed to the output stream, making it invisible to callers reading the same fd.
…ernal - Rename `ParsedCommand` → `Command` and `ParsedRunCommand` → `RunCommand` as the public API types - Rename old `Command` → `ResolvedCommand` and old `RunCommand` → `ResolvedRunCommand` as crate-internal types - `Session::main` and `HandledCommand::ViteTaskCommand` now accept `Command` directly (no `.into_command()` needed) - Fix summary message: `--verbose` → `--last-details` Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove verbose reason suffixes from "cache disabled" inline status
messages (": no cache config" and ": built-in command").
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
branchseer
added a commit
to voidzero-dev/vite-plus
that referenced
this pull request
Feb 25, 2026
Upgrade vite-task to voidzero-dev/vite-task#171 which replaces the verbose full execution summary with compact one-liners. Single-task runs with no cache hit show no summary. Single-task cache hits show a brief 'cache hit' message. Multi-task runs show hit rate and time saved, with a hint to use --verbose for full details. Updates cli.rs to use ParsedCommand (now exposed by vite-task) with .into_command() at dispatch points, and regenerates 25 snap tests.
branchseer
added a commit
to voidzero-dev/vite-plus
that referenced
this pull request
Feb 25, 2026
## Summary - Upgrades vite-task dependency to [voidzero-dev/vite-task#171](voidzero-dev/vite-task#171) which implements compact task runner summaries (GitHub issue #591) - Updates `cli.rs` to use `ParsedCommand` (now exposed by vite-task) with `.into_command()` at dispatch points - Regenerates 25 snap test outputs: full verbose execution summaries (~800 lines) replaced by compact one-liners ### New behavior | Scenario | Output | |---|---| | Single task, no cache hit | No summary | | Single task, cache hit | `---` + `[vp run] cache hit, {duration} saved.` | | Multi-task | `---` + `[vp run] {hits}/{total} cache hit ({rate}%), {duration} saved. (Run 'vp run --verbose' for full details)` | ### New CLI flags - `-v` / `--verbose`: Show full execution summary (previous default behavior) - `--last-details`: Display saved summary from last run Depends on: voidzero-dev/vite-task#171 --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Replace the verbose full execution summary with compact one-liners for normal runs, with
--verboseflag for full summary and--last-detailsto view the last run's saved summary from a JSON file.Behavior
vp run taskvp run -v taskvp run --last-detailsCompact summary rules
[vp run] cache hit, {duration} saved.[vp run] {hits}/{total} cache hit ({rate}%), {duration} saved. (Run 'vp run --verbose' for full details)Key design decisions
LastRunSummary--last-detailsis exclusive at the type level viaCommand::RunLastDetailsvariantLastRunSummary, then render compact or full from itlast-summary.jsonwritten to.tmpthenfs::renameBox<dyn FnOnce(&LastRunSummary)>TaskSummaryinfinish()instead of collecting intermediateExecutionInfoSnapshot proof
Includes a commit adding
--verboseto all e2e tests followed by its revert, proving the full summary output is correct and unchanged. The e2e tests exercise the compact summary path by default.