Skip to content

Add failing tests for squashed current_revision losing VALIDATION_FAILED state#88

Merged
koenvo merged 3 commits into
mainfrom
fix/squash-revision-validation-failed-state
Jul 2, 2026
Merged

Add failing tests for squashed current_revision losing VALIDATION_FAILED state#88
koenvo merged 3 commits into
mainfrom
fix/squash-revision-validation-failed-state

Conversation

@koenvo

@koenvo koenvo commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Dataset.current_revision squashes multiple revisions into a new Revision without a state (defaults to PENDING_VALIDATION), dropping the VALIDATION_FAILED state set by invalidate_revisions. FetchPolicy.should_refetch then returns False and the dataset is silently skipped instead of refetched.

Tests (failing, documenting the bug):

  • test_invalidate_multi_revision_dataset_refetches: invalidated 2-revision dataset must refetch.
  • test_squashed_state_failed_when_a_current_file_comes_from_a_failed_revision: with two files where only one is fixed in a later revision, the squashed state must be VALIDATION_FAILED (a current file still comes from a failed revision).
  • test_squashed_state_ok_when_all_current_files_come_from_good_revisions (passes): guards against always-failed / refetch-forever.

koenvo added 3 commits July 2, 2026 10:38
…LED state

Dataset.current_revision squashes multiple revisions into a new Revision without
a state (defaults to PENDING_VALIDATION), dropping the VALIDATION_FAILED state set
by invalidate_revisions. FetchPolicy.should_refetch then returns False and the
dataset is silently skipped instead of refetched.

Tests (failing, documenting the bug):
- test_invalidate_multi_revision_dataset_refetches: invalidated 2-revision dataset
  must refetch.
- test_squashed_state_failed_when_a_current_file_comes_from_a_failed_revision: with
  two files where only one is fixed in a later revision, the squashed state must be
  VALIDATION_FAILED (a current file still comes from a failed revision).
- test_squashed_state_ok_when_all_current_files_come_from_good_revisions (passes):
  guards against always-failed / refetch-forever.

Fix follows in a separate commit.
Dataset.current_revision squashed multiple revisions into a new Revision without
a state, defaulting to PENDING_VALIDATION. This dropped the VALIDATION_FAILED
state set by invalidate_revisions, so FetchPolicy.should_refetch returned False
and invalidated multi-revision datasets were silently skipped instead of refetched.

Derive the squashed state per-file from the revisions that actually contribute
the current files: if any current file still comes from a VALIDATION_FAILED
revision, the squash reports VALIDATION_FAILED (invalid data -> refetch);
otherwise it takes the latest revision's state (no refetch-forever).

Makes the failing tests pass.
Patch release: fix squashed current_revision dropping VALIDATION_FAILED state,
which caused invalidated multi-revision datasets to be silently skipped.
@koenvo koenvo force-pushed the fix/squash-revision-validation-failed-state branch from 1b5b1d1 to a6f9d10 Compare July 2, 2026 09:04
@koenvo koenvo merged commit d214cf3 into main Jul 2, 2026
13 checks passed
@koenvo koenvo deleted the fix/squash-revision-validation-failed-state branch July 2, 2026 09:06
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