Skip to content

refactor(animation): reuse measure.xor_floor in the rotoscope fit script - #15605

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-15600-43249613081-1
Nov 12, 2026
Merged

melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-15600-43249613081-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #15600

Summary

Opened by the work-resolve-issue lane. The run's own summary:

fit.py's best() ranking key and its results-table xor/floor column now call measure.xor_floor in place of two inline copies of r['xor'] / max(r['floor'], 1e-9). fit.py already imported measure and xor_floor computes the identical expression, so outputs, exit codes and printed results are unchanged. A patch changelog fragment for the animation plugin records the internal restructuring.

Not verified

  • scripts/run-ruff.sh check on fit.py was not run: this lane's Bash allows only the named wrappers, and none runs ruff; left to the PR's CI
  • Test suites (test_regress.py and the animation plugin tests) were not executed here; left to the PR's CI
  • ci-status green is a PR CI check; left to the PR's CI
  • Tidy pass 5 (ai-slop:audit fix) could not run its detector or digest guard because those scripts are not among the lane's allowed wrappers; the one fragment line was read against the rubric by hand with no finding
  • Build/lint step of prep: no build applies to a Python script edit, and ruff could not run (above); verify step covered by the checks only

Fix

  • plugins/animation/skills/rotoscope/scripts/fit.py: line 43 (best) and line 86 (results table) call measure.xor_floor instead of the inline xor / max(floor, 1e-9) expression
  • .changes/animation/work-resolve-issue-issue-15600-43249613081-1-51d0b777.md: new patch fragment, ### Changed, "Internal restructuring, no behavior change."

Verification

The runner ran each check from the base copy against 1c803e8:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • read plugins/animation/skills/rotoscope/scripts/measure.py:90-91: xor_floor(r) returns r['xor'] / max(r['floor'], 1e-9), the same expression both sites inlined
  • check-changelog-fragments: all 8 fragments valid (run before and after tidy)
  • check-changed-skills: rotoscope PASS, 0 errors, 1 pre-existing warning (description length 507 above the 419 warn setting, not touched by this change)
  • check-affected: 13 passed, 6 skipped over 2 changed files (run before and after tidy)
  • fresh-context review subagent over the whole diff: no findings; confirmed no shadowing of the measure name in best() or main(), identical :.2f formatting, and that no test asserts on the changed lines (test_regress.py and regress.py exercise fit.main only for playwright_core routing)
  • git-read diff --unified=0 HEAD: only lines 43 and 86 of fit.py changed, plus the new fragment
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/43249613081

Left out: the items under Not verified.

Related

#15600

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 1c803e8a5a9a8a058d4fa464b5a140879ef19686: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Security review: no security issues found

I read every hunk of both changed files. This is a full review, not a blocking-only one.

  • plugins/animation/skills/rotoscope/scripts/fit.py: two inline copies of r['xor'] / max(r['floor'], 1e-9) (in best() and in the results-table line in main()) now call measure.xor_floor(r). At this head, that function returns exactly the same expression (measure.py#L90-L91). measure was already imported at fit.py#L18. The change adds no new input handling, file paths, subprocess calls or dependencies.
  • .changes/animation/...-51d0b777.md: a new changelog note for a patch release. It is plain text that nothing runs.

None of the changed files matches a trusted path. The diff doesn't touch any plugin manifest, trust control, merge hold, token scope, workflow or standing instruction, so it has no security-relevant surface (skip gate item 2).

The PR context contains no embedded instructions. The text of the closing issue was left out by the wrapper.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed 1c803e8a5a9a8a058d4fa464b5a140879ef19686: read 2 of 2 changed file(s); 1 finding(s), 0 as inline comments.

Code review: PR #15605, reuse measure.xor_floor in the rotoscope fit.py

I read both changed files in full: fit.py and the new changelog fragment.

Correctness. The substitution is the same expression as before. measure.py:90-91 defines xor_floor(r) as r['xor'] / max(r['floor'], 1e-9), which is what both inline copies computed.

  • fit.py already runs import measure at L18.
  • No local name shadows measure in best() or main().
  • The :.2f format at L86 is unchanged.

So the ranking key at L43 and the table column at L86 give the same results as before, and the exit code and output files are unchanged. The patch bump in the changelog fragment fits an internal refactor with no behavior change.

Closing issue #15600, acceptance criteria:

  • "fit.py has no inline xor / max(floor, 1e-9) and calls measure.xor_floor at both sites": met.
  • "The diff edits only the listed files ...": met. The diff touches only fit.py and one new fragment under .changes/animation/.
  • "The pull request stays within 400 changed lines and 15 hand-edited files": met (2 lines changed, 2 files).
  • "scripts/run-ruff.sh check passes on the changed files" and "ci-status is green": I have no shell, so I did not check these; CI has to confirm them. The author's checks (check-changelog-fragments, check-changed-skills, check-affected) are claimed by the author and I have not confirmed them.
  • "Behavior is unchanged: the same outputs, exit codes and printed results for the same inputs": met by reading the code (the expressions are identical), but no test covers it. This is the one finding, advisory only:
    • No test in the repository calls fit.best() or checks the xor/floor column of the fit table. regress.py imports fit only to route playwright_core, as the PR body also says.
    • So no test would fail if best() started ranking failing biases differently, or if the table column changed.
    • A small unit test would fill the gap: build a tried dict with only failing rows and check which bias best() picks.
    • The risk is low, because the swapped-in function is the same expression.

No plugin manifest changes, no userConfig changes, and nothing here belongs to the security lane. The prior-findings file shows no earlier review by this lane on this PR.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 1c803e8a5a9a8a058d4fa464b5a140879ef19686. No person needs to act: a lane clears this reason, and the next scheduled run judges it again.

pr-merge's gate refuses its verifier verdict (verify:missing)

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 1c803e8a5a9a8a058d4fa464b5a140879ef19686, the head its arming checks judged.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 1c803e8

The verifier passed this head. The capture artifact holds the capture summary, which says whether the capture ran, and any screenshot or video that passed the mask check; this comment uploads no file.

Capture artifact: pr-capture-15605-1c803e8a5a9a8a058d4fa464b5a140879ef19686, expires on 2026-12-12.

One comment per pull request, updated in place for each new head.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=LOW demote=false head=1c803e8a5a9a8a058d4fa464b5a140879ef19686 rubric=8.4.11 rater=claude-opus-5-5 checker=claude-opus-5-5

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit ec93d2c Nov 12, 2026
50 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-15600-43249613081-1 branch November 12, 2026 16:57
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit ec93d2ca684d51ab115ef7d41109510f2be1b6d3; later checks count it verified from this comment.

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.

Reuse measure.xor_floor in the rotoscope fit script

0 participants