Skip to content

fix(pipeline): use git status for artifact warning, not workspace walk#1615

Merged
nextlevelshit merged 1 commit into
mainfrom
fix/unexpected-artifacts-warning
Apr 30, 2026
Merged

fix(pipeline): use git status for artifact warning, not workspace walk#1615
nextlevelshit merged 1 commit into
mainfrom
fix/unexpected-artifacts-warning

Conversation

@nextlevelshit
Copy link
Copy Markdown
Collaborator

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

  • `go build ./...` clean
  • `go test -run "Artifact|Unexpected|Workspace" ./internal/pipeline/` passes
  • Next impl-issue dispatch (manual implementation work below) will show clean warnings only on actual diffs

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.

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.
@nextlevelshit nextlevelshit merged commit 1cee68a into main Apr 30, 2026
10 checks passed
@nextlevelshit nextlevelshit deleted the fix/unexpected-artifacts-warning branch April 30, 2026 09:18
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