Plots are never regenerated in CI: mtime cache is meaningless on a fresh checkout
- Dominant language
- Python
- Stars
- 0
- Forks
- 1
- Avg merge
- 20h
- Merged PRs (30d)
- 2
Description
The nightly `daily-update.yml` job installs the latest con-duct release and runs `con-duct-gallery generate`, but every run since the images were first committed logs `Using cached plot` for all examples (e.g. run 34802961470, 2026-09-14). The images on master were rendered with con-duct 0.20.1 and have not changed since 2026-04-25, despite 0.21.0 and 0.22.0 changing plot output.
Cause: `should_regenerate_plot` in `plotter.py` regenerates only when the SVG is missing or `usage.json` is newer than the SVG by more than 1s. `actions/checkout` gives every file the checkout time, so the comparison never triggers. The same applies to any clone.
Options:
- key the cache on what actually affects the output: con-duct version + plot options, stored in a sidecar or an SVG comment, and regenerate on mismatch
- or simply pass `--force` in the nightly job; a full run takes about 20s, and the existing "only commit if something besides the timestamp changed" guard already prevents churn if the SVG output is deterministic (to verify: matplotlib SVGs may embed a creation date)
The first option keeps local incremental runs cheap; the second is a one-line workflow change.
*Generated with Claude Code, reviewed by @asmacdo*
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with `daily-update.yml` and `should_regenerate_plot` in `plotter.py`; inspect the checkout timestamps, cache decision, and existing commit guard. Run the gallery generation locally and check the referenced nightly CI behavior. Done means changed con-duct output is regenerated in CI while deterministic unchanged output does not cause timestamp-only churn.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, python
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100