Title: ci(docspublish): make cli_interactive gif regeneration deterministic by bearomorphism · Pull Request #2009 · commitizen-tools/commitizen · GitHub
Open Graph Title: ci(docspublish): make cli_interactive gif regeneration deterministic by bearomorphism · Pull Request #2009 · commitizen-tools/commitizen
X Title: ci(docspublish): make cli_interactive gif regeneration deterministic by bearomorphism · Pull Request #2009 · commitizen-tools/commitizen
Description: Description Every push to master currently produces a noisy docs(cli/screenshots) auto-commit (20+ in a row in recent history) because VHS renders byte-different gifs from identical sources. This PR removes both sources of churn: CI guard -- a new Discard cli_interactive regeneration when render inputs are unchanged step diffs docs/images/*.tape, docs/images/shared/, and the commitizen/ package between github.event.before and HEAD; if nothing under those paths changed, the regenerated gifs are reset and never committed. The commitizen/ arm preserves legitimate code-driven screenshot updates (e.g. renaming a prompt in commitizen/cz/conventional_commits/conventional_commits.py or commitizen/commands/init.py). workflow_dispatch always keeps the regen so intentional refreshes still work. Missing/zero/unreachable before SHAs fall through to keeping the regen. Pin VHS to v0.11.0 so deliberate refreshes are reproducible across runs. It also rewrites the 5 .tape files to wait for cz prompt strings via Wait+Screen /regex/ (a v0.11 feature) instead of fixed Sleep delays. This removes the remaining frame-timing nondeterminism, and a future cz prompt rename will fail the 15s Wait timeout in CI instead of silently producing the wrong gif. Checklist I have read the contributing guidelines Was generative AI tooling used to co-author this PR? Yes (please specify the tool below) Generated-by: GitHub Copilot CLI (claude-opus-4.7-1m-internal) following the guidelines Code Changes N/A: no Python code path changed; CI workflow + VHS tape changes only. Run uv run poe all locally to ensure this change passes linter check and tests Pre-existing unrelated failures on Windows (test_bump_minor_increment_signed: local gpg setup; test_breaking_change_content_v1_beta: flaky in parallel run, passes in isolation). Not introduced by this PR. Manually test the changes: vhs validate passes on all 5 tapes. Wait+Screen regexes grepped verbatim from commitizen/cz/conventional_commits/conventional_commits.py, commitizen/commands/init.py, commitizen/commands/bump.py. Full render verification deferred to CI on first merge (native Windows vhs hangs on ttyd+WSL bash; not a tape issue). Expected Behavior Pushes that don't touch tape sources or any commitizen/ source file produce no docs(cli/screenshots) auto-commit. Pushes that modify a tape, or any code the tapes execute, still commit the new gif. Manual workflow_dispatch always commits the regen (intentional-refresh lever after a VHS bump). A future cz prompt rename fails the matching Wait+Screen after 15s in CI. Steps to Test This Pull Request # Validate tape syntax cd docs/images vhs validate bump.tape commit.tape init.tape shortcut_default.tape shortcut_custom.tape # (optional, Linux/WSL) Render and eyeball-diff against current gifs uv sync --group base uv run poe doc:screenshots End-to-end CI behaviour is observable on the next push to master after merge: should produce no docs(cli/screenshots) auto-commit unless the push touches a tape or commitizen/ source. Additional Context Follow-ups scoped out of this PR: Parallelize scripts/gen_cli_interactive_gifs.py (separate PR #2010). Drop the Set Shell bash + hardcoded /tmp/commitizen-example constraints in shared/base.tape so tapes can render natively on Windows. Switch the auto-commit step to open a PR instead of pushing directly.
Open Graph Description: Description Every push to master currently produces a noisy docs(cli/screenshots) auto-commit (20+ in a row in recent history) because VHS renders byte-different gifs from identical sources. This P...
X Description: Description Every push to master currently produces a noisy docs(cli/screenshots) auto-commit (20+ in a row in recent history) because VHS renders byte-different gifs from identical sources. This P...
Opengraph URL: https://github.com/commitizen-tools/commitizen/pull/2009
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:9be5f14b-87aa-3080-75f5-ed105b02fbc4 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | EAFC:33E28C:C9B374:114DEE9:6A62C5B0 |
| html-safe-nonce | 068902bb7e18af1c71c8ddf288ce2ed73271ef31639205f33966df438ee289ee |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQUZDOjMzRTI4QzpDOUIzNzQ6MTE0REVFOTo2QTYyQzVCMCIsInZpc2l0b3JfaWQiOiI0NzcwODYzNTA4MjcxMzE4NDQ4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ba9578fbaf5852adb95239cb7521212fa745f729456228834feac25bbcd11ad6 |
| hovercard-subject-tag | pull_request:3773273303 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/commitizen-tools/commitizen/pull/2009/files |
| twitter:image | https://avatars.githubusercontent.com/u/26526132?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/26526132?s=400&v=4 |
| og:image:alt | Description Every push to master currently produces a noisy docs(cli/screenshots) auto-commit (20+ in a row in recent history) because VHS renders byte-different gifs from identical sources. This P... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | df33b1b61ee7b9a0af988199bfc3503c9c1acafb1f1d40e1f140ea7c84f890dd |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/commitizen-tools/commitizen git https://github.com/commitizen-tools/commitizen.git |
| octolytics-dimension-user_id | 62252524 |
| octolytics-dimension-user_login | commitizen-tools |
| octolytics-dimension-repository_id | 106127589 |
| octolytics-dimension-repository_nwo | commitizen-tools/commitizen |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 106127589 |
| octolytics-dimension-repository_network_root_nwo | commitizen-tools/commitizen |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d41cd1bdb290013455c0ac430fa755621733f5eb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width