Skip to content

Preserve generated classification in watch updates - #22

Merged
odvcencio merged 1 commit into
mainfrom
fix/watch-generated-classification-20260824
Aug 24, 2026
Merged

Preserve generated classification in watch updates#22
odvcencio merged 1 commit into
mainfrom
fix/watch-generated-classification-20260824

Conversation

@odvcencio

Copy link
Copy Markdown
Owner

Summary

  • recompute generated-file metadata from the current path and source during changed-file watch updates
  • preserve default generated-code filtering after subfile-incremental reparses
  • cover metadata and WithoutGenerated behavior with a focused regression

Baseline evidence

On exact main 41439d48c60c7f5d5f9ea237874ec1cc536f76cc, the regression starts with one generated api.pb.go file and fails after ApplyWatchChanges because the generated file count becomes zero.

Validation

  • focused regression on baseline: fails at the expected generated-classification assertion
  • focused regression on feature: 20 consecutive passes
  • go test ./pkg/index -count=1
  • go test -race ./pkg/index -count=1
  • go test ./... -count=1
  • go test -race ./... -count=1
  • live filesystem watch: saved cache retained protobuf / filename generated metadata after a structural update
  • live dead-code CLI: default view excluded the generated functions; --include-generated exposed both
  • gofmt, diff check, and gitleaks clean

- Populate Generated summary via detector in ApplyWatchChanges
- Maintain code-generated file classification during incremental updates
- Add test verifying metadata persistence and filter behavior

Buckley-Change-Hash: sha256:1acc7cd22c7e1e6c2564cdcb6552726f0eaf42ae5fbd76ae50b08fcf883d1451
Buckley-Change-Stats: files=2 insertions=65 deletions=0 binaries=0
@odvcencio
odvcencio marked this pull request as ready for review August 24, 2026 06:17
@odvcencio
odvcencio merged commit 62aba07 into main Aug 24, 2026
1 check passed
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