chore(scripts): render cli_interactive tapes in parallel#2010
chore(scripts): render cli_interactive tapes in parallel#2010bearomorphism wants to merge 1 commit into
Conversation
🔍 Commitizen bump previewMerging this PR will produce the following bump: |
b274aaa to
fc38683
Compare
🔍 Commitizen bump previewNo commits in this PR are eligible for a version bump. |
fc38683 to
68fadd8
Compare
|
Slimmer rewrite at 68fadd8: PR diff dropped from +151/-29 to +100/-29 by inlining helpers ( |
🔍 Commitizen bump previewNo commits in this PR are eligible for a version bump. |
`scripts/gen_cli_interactive_gifs.py` now renders tapes through a ThreadPoolExecutor (default capped at `min(len(tapes), 4)`, override via `-j`), so a full re-render takes one slow tape's runtime instead of the sum of all five. Make `shared/base.tape` and `shared/cleanup.tape` use a per-tape `mktemp -d` workdir instead of the hardcoded `/tmp/commitizen-example`, so concurrent vhs runs do not race on the same directory. Generated-by: GitHub Copilot CLI (claude-opus-4.7-1m-internal) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
68fadd8 to
daffcb6
Compare
🔍 Commitizen bump previewNo commits in this PR are eligible for a version bump. |
|
Trimmed further at daffcb6: dropped the tape-name filtering (CLI positional + |
Description
Follow-up to PR #2009 (deterministic gif regeneration) that makes local iteration faster:
Parallelism in
scripts/gen_cli_interactive_gifs.py. Tapes now render through aThreadPoolExecutorwith the default capped atmin(len(tapes), 4);-j Noverrides. Errors are reported per tape with a final summary instead of aborting on the first failure. The poe taskdoc:screenshotsstill callsgen_cli_interactive_gifs()with no args (zero-arg compatible signature), so nothing changes for the standardrender everythingpath.Per-tape workdir in
shared/base.tape+shared/cleanup.tape. Both files used to hardcode/tmp/commitizen-example, which would race once multiple tapes ran concurrently. Replaced withmktemp -d "${TMPDIR:-/tmp}/commitizen-example.XXXXXX"saved in a per-tape$WORKDIRshell variable and cleaned up at the end. Rendered gifs are unchanged (the setup runs insideHide).Checklist
Was generative AI tooling used to co-author this PR?
Generated-by: GitHub Copilot CLI (claude-opus-4.7-1m-internal) following the guidelines
Code Changes
uv run poe alllocally to ensure this change passes linter check and testspoe lintclean (ruff + mypy). Same pre-existing Windows-only flakes as PR ci(docspublish): make cli_interactive gif regeneration deterministic #2009 (gpg setup + a parallel-test race), unrelated to this change.python scripts/gen_cli_interactive_gifs.py --help-- argparse output renders.vhs validatepasses on all 5 tapes after theshared/patch.uv run poe doc:screenshotsis unchanged.Expected Behavior
uv run poe doc:screenshotscontinues to render all five interactive gifs (now in parallel, with the same outputs).python scripts/gen_cli_interactive_gifs.py [-j N]renders all tapes with up to N parallel workers (defaultmin(len(tapes), 4)).mktemp -ddirectory.Steps to Test This Pull Request
Additional Context
Depends conceptually on but does not require PR #2009 (deterministic gifs). The two PRs touch disjoint files except for
shared/base.tapeandshared/cleanup.tape, which only PR B modifies.