Skip to content

refactor(playwright): simplify the demo-video scripts - #14793

Merged
melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-14700-42645381730-1
Nov 10, 2026
Merged

melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-14700-42645381730-1

Conversation

@melodic-automation-lanes

@melodic-automation-lanes melodic-automation-lanes Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Closes #14700

Summary

Opened by the work-resolve-issue lane. The run's own summary, updated for the follow-up commit:

Simplified four of the five demo-video scripts without changing their behavior, part of the /simplify epic. build_edl.py gets a single anchor_area helper in place of the caption-anchor rectangle math that was written out twice, a direct if/elif for the hold duration, and an O(n) first-clip-per-caption pass in place of a quadratic scan. produce.py draws the caption badge circle once; pydeps.py finds the '--' split once; demo_common.py builds the font candidate list without the list copy. frame_seek.py is already minimal (two short functions), so it is unchanged.

The follow-up commit returns four lines to their base form because the pr-verify verifier could not confirm them behaviour-neutral without base-side context: the EDL's literal 'fps': 30, the pre-loop audio = [] / retime() / caption_spans() setup in build_edl.py, and in produce.py the int() around the paste offsets and the conditional preset merge. Those lines are now byte-identical to main.

Not verified

  • Python test suites (test_demo_video.py, demo-video.test.sh, install-python-deps.test.sh) not run: this lane cannot run an interpreter; left to the PR's CI
  • ci-status green is a PR CI check, left to the PR's CI
  • Review found one theoretical-only divergence: with a zero-width camera rect AND an empty captions.anchors list, the old code raised ZeroDivisionError where the new code raises ValueError later (or nothing in anchor_clear). Camera rects never have zero width and anchors is never empty, so left as is
  • tidy recorded as skipped: passes 1-4 ran with no edits needed; pass 5 (/ai-slop:audit fix) ran its rubric read by hand on the single fragment line (no tells), but its detect.sh and digest-guard.sh scripts cannot run under this lane's Bash allowlist
  • cant-fail-scan not applicable: it scans test files and this change touches none
  • frame_seek.py unchanged: two short functions with nothing to simplify

Fix

  • plugins/playwright/skills/demo-video/scripts/build_edl.py: load_clip builds the narration.wav path once; hold duration chosen by if/elif/else instead of computing a value and overwriting it; first narration clip per caption found in one pass (dict) instead of a scan per clip; caption-anchor page area computed by one anchor_area helper used in anchor_clear and the caption placement check
  • plugins/playwright/skills/demo-video/scripts/produce.py: caption badge circle drawn once with its color picked by kind
  • plugins/playwright/skills/demo-video/scripts/pydeps.py: main finds the '--' split index once for both the trailing script args and the argparse slice
  • plugins/playwright/skills/demo-video/scripts/demo_common.py: font() iterates (path, *FONT_CANDIDATES) or FONT_CANDIDATES without building a list
  • .changes/playwright/work-resolve-issue-issue-14700-42645381730-1-f72c4863.md: patch fragment, '### Changed' with 'Internal simplification, no behavior change.'

Verification

The runner ran each check from the base copy against 8962400:

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

The run reports:

  • check-changelog-fragments: all 4 fragments valid (run before and after tidy)
  • check-changed-skills: demo-video PASS, 0 errors, 1 pre-existing warning (description length 568 > 419), run before and after tidy
  • check-affected: 13 passed, 6 skipped over 5 changed files (run before and after tidy)
  • fresh-context review subagent, given the diff and the files: no behavior difference for any input the pipeline produces; tests (test_demo_video.py, demo-video.test.sh, hooks/install-python-deps.test.sh) run the scripts and assert on outputs, not source text
  • diff size: 4 code files plus 1 fragment, within the issue's 400-line / 15-file limit
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42645381730
  • Follow-up commit: git diff against the merge base shows no hunk left on the four restored lines; both edited scripts pass python3 -m py_compile

Left out: the items under Not verified.

Related

#14700

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

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: PR #14793, incremental (8962400 → 76c3f73)

I found no security issues in this push.

This review covered only the push since 8962400. I read every hunk of both files in the incremental list. Neither one matches a trusted-path glob. The push touches no plugin manifest, no userConfig key, no workflow, no trust control and no instruction surface. This lane had already reviewed an earlier head, so this review reported blocking findings only.

The push puts four lines back to how they read on main:

  • build_edl.py:
    • It restores the setup before the loop: audio = [], total = retime() and captions = caption_spans(total).
    • The EDL's 'fps' field goes back to the literal 30.
    • Both changes are local values and arithmetic. No new input reaches a path, a subprocess or a file write.
  • produce.py:
    • It restores int() around the paste offsets. That only affects drawing.
    • It restores the conditional preset merge {**edl['encode'], **({'preset': a.preset} if a.preset else {})}. a.preset still comes from the local CLI, the same as before.
    • The encode values and how they reach ffmpeg are unchanged from the base, so this push adds no injection surface.

The PR context file contains no embedded instructions aimed at the review lane. The settled threads cover correctness points on these same lines; they are not security findings, and I am not raising them again.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review (incremental, blocking only): no findings

Scope: this review covers only the push since 89624006. It read every hunk in both listed files: build_edl.py and produce.py. An earlier head was already reviewed, so this pass reports blocking findings only.

The push puts four lines back to how they are on main, as the PR description says:

  • build_edl.py
    • The setup before the loop is back: audio = [], total = retime() and captions = caption_spans(total), at head lines 466–468.
    • The EDL writes the literal 'fps': 30 again.
  • produce.py
    • img.paste takes (int(ox0), int(oy0)) again.
    • enc uses the conditional preset merge again: {**edl['encode'], **({'preset': a.preset} if a.preset else {})}.

I searched the full PR diff (.claude-lane/pr.diff) for these lines. None of them is still a + or - line, so they match base. The only hit is a context line. Putting the base code back can't change behavior, so this push keeps #14700's "Behavior is unchanged" criterion. It also cuts the diff, so the size criterion still holds.

Closing issue #14700: the push touches only files the issue lists. ci-status green and the test suites are left to CI. I didn't run anything myself. The PR body's py_compile and git diff checks are the author's claim and unverified.

Prior findings: the lane's earlier summary had no findings, so nothing carries over.

Manifests: this push changes no plugin manifest.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 1 of max 4 on 8962400.

@melodic-automation-lanes

melodic-automation-lanes Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor Author

The pr-unblock lane stopped address-feedback on this pull request: the merge gate refuses this head verify:earlier-fail, and the lane found every note of that earlier pr-verify FAIL already addressed by the diff, so it pushed nothing; only a session can move the head for the verifier to judge again. The lane labels it needs-session for a session builder, who makes the change this lane cannot, and the run ends in a failing pr-unblock/address-feedback status on the head the lane gated.

When a retry on this head can change the outcome, the lane runs one on its own, up to its per-head cap, and edits this comment if it stops again; a run that does not stop clears the status. When no retry can (a review thread the lane does not take or settle, or a failing check after the retries are spent), a person resolves the threads or gets the checks green, then dispatches the workflow below: that run finds the cause gone and clears the status. On a pull request the lanes App opened, the dispatchers start that run once per stop; on any other, a person does. A new commit to the branch starts clean.

To run it again on this head now, dispatch the pr-unblock workflow:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=14793 -f activity=address-feedback

@melodic-automation-lanes melodic-automation-lanes Bot added the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 9, 2026
@kyle-sexton kyle-sexton removed the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 9, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 89624006a268bc326eafef228a1e20da75d2b08b. 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:fail)

The pr-verify verifier could not confirm four edits were behaviour-neutral
without base-side context, so they return to the base form: the EDL's
literal 'fps': 30, the pre-loop audio/retime/caption_spans setup in
build_edl.py, and in produce.py the int() around the paste offsets and the
conditional preset merge. The other simplifications stand.

Refs: #14700

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01UJUn7LHacpQzdBfX6kFxEe
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 2 of max 4 on 76c3f73.

@melodic-automation-lanes melodic-automation-lanes Bot added needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. and removed needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. labels Nov 10, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 76c3f73

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-14793-76c3f73875f683e4f24fd42bea73d53090b23d46, expires on 2026-12-10.

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

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 10, 2026
Merged via the queue into main with commit 97a2585 Nov 10, 2026
87 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14700-42645381730-1 branch November 10, 2026 03:06
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 97a25852c5cd736d6f2aceb134e521c99e78f41f; 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.

Simplify the demo-video playwright plugin code

1 participant