Repository navigation
Remove stale fixtures using explicit generated-file ownership - #120
Merged
Merged
Conversation
Mark generated YAML and remove only owned output when tables disappear. Warn on unmarked collisions while migrating recognized v1 manifests quietly. Refs #119.
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.
Rebuilding fixtures currently leaves YAML files behind when their tables disappear. Rails then tries to load those orphaned fixture sets against tables that no longer exist.
Generated fixtures now receive an exact first-line ownership comment. Rebuilds remove stale marked files, and the explicit clean task follows the same rule. Unmarked files survive cleanup; when generation must overwrite one, it warns and preserves the existing overwrite behavior.
Recognized pre-marker v1 manifests trigger one quiet migration rebuild, recording marker adoption only after generation and callbacks succeed. After updating the gem, the first normal fixture check performs this migration automatically and logs its reason; an initial diff adding ownership headers across existing generated fixtures is expected. The manifest version remains 1. Historical unmarked orphans still require manual inspection and removal; marker ownership intentionally does not protect subsequent manual edits to marked files.
The README documents a dedicated generated-fixture directory, test-runner registration, and separate Rails database-task configuration.
Refs #119.