Skip to content

feat(preprod): Add snapshot comparison task#109382

Merged
NicoHinderling merged 4 commits intomasterfrom
create-compare-task-v1-part3
Feb 27, 2026
Merged

feat(preprod): Add snapshot comparison task#109382
NicoHinderling merged 4 commits intomasterfrom
create-compare-task-v1-part3

Conversation

@NicoHinderling
Copy link
Contributor

Summary

  • Add compare_snapshots instrumented task that loads manifests from objectstore, diffs matched images in pixel-budget batches, uploads diff masks, and writes comparison results
  • State machine guards with atomic transitions (PENDING → PROCESSING → SUCCESS/FAILED)
  • Handles added/removed/unchanged/changed/skipped/errored image categories
  • Register task import in server.py

Stack: 3/3 — depends on #109381

@NicoHinderling NicoHinderling requested a review from a team as a code owner February 25, 2026 21:55
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Feb 25, 2026
Copy link
Contributor Author

NicoHinderling commented Feb 25, 2026

@NicoHinderling NicoHinderling force-pushed the create-compare-task-v1-part3 branch from 1f0aee4 to 700c27e Compare February 25, 2026 23:52
@NicoHinderling NicoHinderling force-pushed the create-compare-task-v1-part2 branch from 99c5a0b to 6e0d8b2 Compare February 25, 2026 23:52

logger = logging.getLogger(__name__)

MAX_DIFF_PIXELS = 40_000_000
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where do these limits come from?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the same values used in the emerge code for now

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MIght be good to document that

@NicoHinderling NicoHinderling force-pushed the create-compare-task-v1-part3 branch from e1a67cb to 354c185 Compare February 26, 2026 22:28
@NicoHinderling NicoHinderling force-pushed the create-compare-task-v1-part2 branch from 0cf3c69 to 09b9a1a Compare February 26, 2026 22:28
comparison.images_added = len(added)
comparison.images_removed = len(removed)
extras = comparison.extras or {}
extras["comparison_key"] = comparison_key
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be open to adding this as a col in the future

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added an inline comment and linear ticket to track this

@NicoHinderling NicoHinderling changed the base branch from create-compare-task-v1-part2 to graphite-base/109382 February 26, 2026 22:51
Add compare_snapshots task that loads manifests from objectstore,
diffs matched images in pixel-budget batches via OdiffServer, uploads
diff masks, and writes comparison results with state machine guards.
@NicoHinderling NicoHinderling force-pushed the create-compare-task-v1-part3 branch from 354c185 to 309803f Compare February 26, 2026 23:29
@NicoHinderling NicoHinderling changed the base branch from graphite-base/109382 to master February 26, 2026 23:29
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants