Skip to content

fix(variation): track longest same-size shot run#290

Open
ketpatil77 wants to merge 1 commit into
calesthio:mainfrom
ketpatil77:codex/openmontage-variation-consecutive
Open

fix(variation): track longest same-size shot run#290
ketpatil77 wants to merge 1 commit into
calesthio:mainfrom
ketpatil77:codex/openmontage-variation-consecutive

Conversation

@ketpatil77

Copy link
Copy Markdown

Summary

  • track the longest run of equal shot sizes instead of counting all equal adjacent pairs
  • report the true run length in the violation text
  • add regression coverage for split pairs, true runs of three, and unspecified gaps

Testing

  • C:\Users\Jayesh\AppData\Local\Programs\Python\Python314\python.exe -m pytest tests/tools/test_variation_checker.py

Closes #268

@ketpatil77 ketpatil77 requested a review from calesthio as a code owner July 4, 2026 14:09
calesthio
calesthio previously approved these changes Jul 5, 2026

@calesthio calesthio left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Approved. I verified the reported variation-checker issue is real on main: separated same-size pairs are incorrectly accumulated into a "3 consecutive same-size shots" violation, while an actual run of three same-size shots is not flagged. On this PR, separated pairs no longer trigger the consecutive-shot violation, true runs of three are flagged, and an unspecified shot breaks the run as intended.

Reviewed per docs/PR_REVIEW_GUIDE.md. Local checks passed: tests/tools/test_variation_checker.py, tests/contracts/test_phase0_contracts.py, py_compile for the changed files, and git diff --check. python -m pytest tests/eval -q found no pytest-discoverable tests. GitHub's Validate Python check was still pending at review time.

@ketpatil77

Copy link
Copy Markdown
Author

Rebased on current main to clear the merge conflict. Functional logic is unchanged; this only refreshes the branch onto latest upstream so the approved fix can merge cleanly.

@ketpatil77 ketpatil77 force-pushed the codex/openmontage-variation-consecutive branch from 680e4c1 to d9962a6 Compare July 6, 2026 15:14
@ketpatil77 ketpatil77 force-pushed the codex/openmontage-variation-consecutive branch from d9962a6 to 466a51b Compare July 6, 2026 15:39
@ketpatil77

Copy link
Copy Markdown
Author

Rebased on latest main, resolved the lib/variation_checker.py conflict against upstream changes, and force-pushed the refreshed branch. The same variation fix and tests are still in place.

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.

check_scene_variation miscounts 'consecutive same-size shots' (counts non-consecutive pairs)

2 participants