compass sprint charts –output-dir is ignored by the gnuplot render step
Table of Contents
This page is a capture in the next bucket of the product backlog — a pre-sprint idea, not yet pulled into a sprint as a story.
What
compass sprint charts --output-dir <dir> advertises a general output
location override, and its Python data-prep step honours it (writes
sprint_activity.csv, sprint_progress.csv, pr_cycle_times.csv
into <dir>). But the four tangled gnuplot scripts under
scripts/ (sprint_prs_commits.gnuplot, sprint_line_churn.gnuplot,
sprint_pr_cycle.gnuplot, sprint_stories_done.gnuplot, all tangled
from doc/agile/sprint_charts.org) each hardcode both their CSV input
path (build/output/sprint_%s/sprint_activity.csv, printf-formatted
from the sprint number alone) and their PNG set output path
(doc/agile/versions/v0/sprint_%s/<name>.png) — neither honours
--output-dir at all. Reproduced this session: ran
compass sprint charts --sprint 22 --output-dir
doc/agile/versions/v0/sprint_22, which happened to still find a
stale build/output/sprint_22/sprint_activity.csv left over from an
earlier run (5 days of data, cut off at 2026-07-05, with a spurious
2026-06-30 row) and silently rendered all four charts from it — 4 days
short of the sprint's actual 9 days of activity. The bug was only
caught because the charts visibly stopped mid-sprint; a same-day
regeneration for the default output dir would have masked it
entirely by coincidence.
Why
Silent stale-data rendering is worse than an outright failure: the
charts looked plausible (axes, legend, and styling all correct) and
would have shipped into the sprint's health-review record showing 4
days of activity instead of 9, understating both commit load and PR
velocity right when a health review most needs accurate numbers. The
--output-dir flag's own --help text promises a general override
with no caveat that only half the pipeline respects it.
References
scripts/sprint_prs_commits.gnuplot,scripts/sprint_line_churn.gnuplot,scripts/sprint_pr_cycle.gnuplot,scripts/sprint_stories_done.gnuplot— all four hardcodebuild/output/sprint_%s/as the CSV read path anddoc/agile/versions/v0/sprint_%s/as the PNG write path.doc/agile/sprint_charts.org— literate source these scripts tangle from; the fix belongs there, then re-tangle.- Reproduced 2026-07-10 on sprint 22: stale
build/output/sprint_22/sprint_activity.csv(5 rows, last day 2026-07-05) silently used instead of the fresh 9-row CSV written todoc/agile/versions/v0/sprint_22/by the same invocation.