Skip to content

feat(summary): show how to exclude a read-and-written file in --last-details - #784

Merged
wan9chi merged 2 commits into
claude/summary-plural-wordingfrom
claude/last-details-exclude-hint
Oct 2, 2026
Merged

wan9chi merged 2 commits into
claude/summary-plural-wordingfrom
claude/last-details-exclude-hint

Conversation

@wan9chi

@wan9chi wan9chi commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Motivation

User feedback: vp run --last-details showed Not cached: read and wrote 'node_modules/.fate-graphql-t8W5Ii/usage.ts' for a temporary file that the user's test suite had created and deleted. The message didn't say that the task read and wrote the file, so the user took it for a Vite+ cache file. It also didn't say how to make the task cacheable.

Changes

--last-details now says the task read and wrote the file, and shows the cache entries that exclude it:

→ Not cached: the task read and wrote 'packages/rw-pkg/src/data.txt'
  If this file is temporary or shouldn't affect caching, exclude it (or a glob matching it) in the task's `cache` config:
    input: [{ auto: true }, "!src/data.txt"],
    output: [{ auto: true }, "!src/data.txt"],
  • Both entries keep { auto: true }, because a list of exclusions on its own turns off automatic tracking. This is always safe here: the warning only appears when both lists track automatically.
  • A file inside the task's package gets a package-relative pattern. A file outside it gets { pattern: "!…", base: "workspace" }.
  • A task that opens a directory for both reading and writing (e.g. Linux O_TMPFILE) reads and writes the directory's path. For the workspace root that path is empty, and an empty pattern resolves to **, so no exclusion is shown. The package directory itself gets the base: "workspace" form.
  • The path is glob-escaped with wax::escape and quoted with serde_json, so it is a valid string literal.
  • The compact vp run: line is unchanged.
  • docs/inputs.md gains a section on tasks that modify files they read.

The saved last-summary.json changes shape. A summary saved by an older version shows the existing "saved by a different version" message.

🤖 Generated with Claude Code

@wan9chi
wan9chi added this pull request to stack #785 October 1, 2026 14:56
@wan9chi
wan9chi force-pushed the claude/last-details-exclude-hint branch from fe1c986 to 5139902 Compare October 1, 2026 14:57
@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

fspy benchmark

linux

dynamic/launch             change  -1.00%  [ -7.71% ..  +7.26%]  overhead  +274.56%
dynamic/access             change  -0.01%  [ -3.68% ..  +2.35%]  overhead   +14.25%
dynamic/access-relative    change  +0.21%  [ -8.66% ..  +8.22%]  overhead   +61.38%
dynamic/access-contended   change  +2.12%  [ -5.56% .. +48.50%]  overhead   +20.95%
static/launch              change  +0.86%  [ -6.67% ..  +8.77%]  overhead  +716.07%
static/access              change  +0.03%  [ -4.71% ..  +6.87%]  overhead  +713.42%
static/access-relative     change  +1.38%  [ -3.09% ..  +8.13%]  overhead +1217.39%
static/access-contended    change  +1.90%  [ -1.36% .. +12.01%]  overhead +3107.03%

macos

dynamic/launch             change  +0.12%  [ -4.58% ..  +5.28%]  overhead  +219.66%
dynamic/access             change  +1.41%  [ -5.39% ..  +7.74%]  overhead    +4.64%
dynamic/access-relative    change  -3.60%  [-39.40% ..  +7.96%]  overhead  +252.17%
dynamic/access-contended   change  +3.80%  [ -5.19% .. +62.35%]  overhead    +4.55%

windows

dynamic/launch             change  +0.98%  [-12.70% .. +15.50%]  overhead   +23.52%
dynamic/access             change  -0.87%  [-12.83% .. +13.55%]  overhead    +2.20%
dynamic/access-relative    change  +1.38%  [-10.58% .. +23.76%]  overhead    +3.68%
dynamic/access-contended   change  -0.43%  [-11.46% ..  +7.57%]  overhead    +1.07%

@wan9chi
wan9chi marked this pull request as ready for review October 2, 2026 01:06
wan9chi and others added 2 commits October 2, 2026 09:07
…details

When a task isn't cached because it read and wrote the same file,
`--last-details` now says the task read and wrote it, and shows the
`cache.input` and `cache.output` entries that exclude it. The entries
keep `{ auto: true }` so that automatic tracking stays on. A file inside
the task's package gets a package-relative pattern; one outside it uses
`base: "workspace"`. The path is glob-escaped and quoted as a string
literal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A task that opens a directory for both reading and writing, e.g. with
Linux `O_TMPFILE`, reads and writes the directory's path. For the
workspace root that path is empty, and the hint's `"!"` pattern
resolved to `**`, which would exclude every input and output. Show no
exclusion for the workspace root, and use the workspace-based pattern
for the package directory itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wan9chi
wan9chi force-pushed the claude/last-details-exclude-hint branch from 9e6f4f4 to 05ad0a4 Compare October 2, 2026 01:08
@wan9chi
wan9chi merged commit ba309da into main Oct 2, 2026
19 of 32 checks passed
@wan9chi
wan9chi deleted the claude/last-details-exclude-hint branch October 2, 2026 01:13
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