Skip to content

refactor: narrow review_round_snapshot status enum to actual values#176

Merged
tomasz-tomczyk merged 1 commit intomainfrom
narrow-snapshot-status-enum
May 5, 2026
Merged

refactor: narrow review_round_snapshot status enum to actual values#176
tomasz-tomczyk merged 1 commit intomainfrom
narrow-snapshot-status-enum

Conversation

@tomasz-tomczyk
Copy link
Copy Markdown
Owner

Summary

  • Narrow ReviewRoundSnapshot.status enum from [:added, :modified, :deleted, :renamed, :removed] to [:modified, :removed]
  • Only :modified and :removed are ever produced by crit's files-mode share path; the others were dead schema
  • Add defensive backfill migration normalising any non-canonical values to "modified"
  • Update seeds to use :modified instead of :added

Review

  • Code review: passed (inline self-review)
  • Parity audit: N/A (backend schema only)

Test plan

  • mix precommit — 627/627 tests pass
  • crit make e2e-share against this worktree — 23/23 share integration tests pass, including TestShareSyncOrphanedFile (exercises :removed path end-to-end)

Closes #174

🤖 Generated with Claude Code

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
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.14%. Comparing base (952db51) to head (9a92eb0).

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           
Flag Coverage Δ
unit 79.14% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tomasz-tomczyk tomasz-tomczyk merged commit 247b262 into main May 5, 2026
4 checks passed
@tomasz-tomczyk tomasz-tomczyk deleted the narrow-snapshot-status-enum branch May 5, 2026 20:35
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.

Reconsider field naming alignment with crit (captured_at, snapshot status enum)

1 participant