-
Notifications
You must be signed in to change notification settings - Fork 0
Consolidate history and baseline into single file #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
af34da7
Consolidate history and baseline into single file
rwdaigle 39b965b
Update docs to reflect consolidated history file
rwdaigle a4c9480
Fix final-review skill to use origin/main for comparisons
rwdaigle 4323c8a
Bump version to 0.4.1
rwdaigle c8bb22e
Fix legacy .baseline migration when no .history exists
rwdaigle 336333d
Update Cargo.lock
rwdaigle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 validate_baseline fails to account for migrations covered by existing baseline
The
validate_baselinefunction prevents moving a baseline forward when migrations covered by an existing baseline are not in the applied history.Click to expand
Scenario
1f700(migration files deleted, baseline recorded)1f710and1f720(these get recorded in history)1f720Root Cause
At
src/baseline.rs:64-71, the validation checks that ALL migrations at or before the target version are in theappliedlist:However, the function receives
existing_baseline(line 41) but only uses it to check for backward movement (lines 50-57). It doesn't consider that migrations at or before the existing baseline version should be treated as "applied" for validation purposes.Impact
Users cannot advance their baseline once they have an initial baseline set, unless all prior migrations happen to still exist in the applied history. This breaks the intended workflow of progressively moving baselines forward over time.
(Refers to lines 64-71)
Recommendation: Modify the validation to also consider migrations covered by the existing baseline as 'applied'. Add a check like:
if let Some(b) = existing_baseline { if version_lte(&migration.version, &b.version) { continue; } }before checking the applied_ids.Was this helpful? React with 👍 or 👎 to provide feedback.