refactor: narrow review_round_snapshot status enum to actual values#176
Merged
tomasz-tomczyk merged 1 commit intomainfrom May 5, 2026
Merged
refactor: narrow review_round_snapshot status enum to actual values#176tomasz-tomczyk merged 1 commit intomainfrom
tomasz-tomczyk merged 1 commit intomainfrom
Conversation
Closes #174 The snapshot status enum was [:added, :modified, :deleted, :renamed, :removed] but only :modified and :removed are ever produced. crit's files-mode share path (the only writer) emits "modified" for active files and "removed" for orphaned files; the other three values were dead schema. Narrow the enum to match reality. Includes a defensive backfill migration that folds any existing non-canonical status values to "modified".
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #176 +/- ##
=======================================
Coverage 79.14% 79.14%
=======================================
Files 56 56
Lines 1817 1817
=======================================
Hits 1438 1438
Misses 379 379
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Summary
ReviewRoundSnapshot.statusenum from[:added, :modified, :deleted, :renamed, :removed]to[:modified, :removed]:modifiedand:removedare ever produced by crit's files-mode share path; the others were dead schema"modified":modifiedinstead of:addedReview
Test plan
mix precommit— 627/627 tests passmake e2e-shareagainst this worktree — 23/23 share integration tests pass, includingTestShareSyncOrphanedFile(exercises:removedpath end-to-end)Closes #174
🤖 Generated with Claude Code