Skip to content

Reject invalid burndown dimensions before generating bars - #4226

Merged
djmitche merged 1 commit into
GothenburgBitFactory:developfrom
jatinninety9:fix/burndown-dimensions
Nov 13, 2026
Merged

djmitche merged 1 commit into
GothenburgBitFactory:developfrom
jatinninety9:fix/burndown-dimensions

Conversation

@jatinninety9

Copy link
Copy Markdown
Contributor

Related to #4224; follow-up to #4225 and the suggestion to reject invalid dimensions before generating dates.

An annual burndown at width 200 and height 1 can reach the date library's lower-year assertion before render() rejects the short window. Unlimited or excessively tall heights take the same path before their size diagnostic.

Extend the existing early guard in Chart::generateBars() to cover the four size limits already used by render(). Existing limits and diagnostic messages are preserved.

Regression tests cover too-short, unlimited, and too-tall heights across all four report periods. Additional controls check the minimum and maximum drawable graph heights. The failing annual cases use a fixed clock so the regression remains reproducible as the current year changes.

Validation:

  • Before the production change, the three invalid-height annual cases fail with the date assertion; the valid-height controls pass.
  • After the change, all nine burndown test methods pass.
  • GCC Debug build in WSL Ubuntu; full CTest run: 179/179 entries passed with a 600-second per-entry timeout. Existing skipped/expected-failure subtests remain.
  • clang-format 21.1.8, Black 25.12.0, and git diff --check pass.

Valid-size annual charts reaching the historical date boundary remain a separate problem. This PR does not claim to resolve every scenario in #4224.

@djmitche djmitche left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonderful, thanks!

@djmitche
djmitche merged commit c564bc3 into GothenburgBitFactory:develop Nov 13, 2026
17 checks passed
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.

2 participants