fix(pipeline): use git status for artifact warning, not workspace walk#1615
Merged
Conversation
The "step wrote N file(s) outside declared output_artifacts" warning walked the entire workspace dir and flagged every pre-existing file as "unexpected". For worktree workspaces this meant ~2477 files (the full project checkout) showed up on every step, swamping signal with noise. Real-world hit: every Phase 3 impl-issue run on Wave itself logged the same 2477-file warning twice per step. Persona didn't actually write those files — they were just in the worktree. Fix: use `git status --porcelain --untracked-files=all` to enumerate only files the step actually created or modified relative to HEAD. Pre-existing tracked files no longer surface. Falls back to the WalkDir branch for non-git workspaces (mount/basic), keeping behavior unchanged there. Also extends the prune list (now language-agnostic) — node_modules, vendor, target, __pycache__, .venv, venv, .tox, .pytest_cache, .bundle, .cache, .gradle, .mvn, .next, .nuxt, .turbo. Keeps build-output names (dist, build, out, bin, obj) UNpruned because some projects commit them.
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.
Real-world signal
Every Phase 3 impl-issue run on Wave logged the same warning twice per step:
```
step wrote 2477 file(s) outside declared output_artifacts paths:
.github/workflows/docs.yml, .github/workflows/lint.yml, .github/workflows/release.yml,
.opencode/commands/speckit.analyze.md, .opencode/commands/speckit.checklist.md,
(+2472 more)
```
Persona did not write those files — they were just pre-existing files in the worktree workspace. The check walked the entire workspace dir and flagged every file not declared in `output_artifacts` as "unexpected".
Fix
`warnOnUnexpectedArtifacts` now uses `git status --porcelain --untracked-files=all` to enumerate only files the step actually created or modified relative to HEAD. Pre-existing tracked files don't surface. Falls back to the original WalkDir branch for non-git workspaces (mount/basic) to preserve behavior there.
Also: language-agnostic prune list
Old prune list: `.agents .claude project .git node_modules vendor` — Go-shaped.
New list adds: `target pycache .venv venv .tox .pytest_cache .bundle .cache .gradle .mvn .next .nuxt .turbo` — covers Rust, Python, Ruby, JVM, JS framework caches.
Build-output names (`dist build out bin obj`) deliberately NOT pruned because some projects commit them.
Test plan
Related
Discovered while watching #1610/#1611/#1612/#1613/#1614 dispatches. The warning was present long before Phase 3 but the noise scaled with worktree size. Caught now because we ran impl-issue on Wave-itself, where worktree = full Wave repo.