Skip to content

docs: note drawImage keeps only the most recent scaled size per path - #45

Merged
dmccoystephenson merged 1 commit into
mainfrom
docs/draw-image-scaled-cache-one-size
Sep 27, 2026
Merged

dmccoystephenson merged 1 commit into
mainfrom
docs/draw-image-scaled-cache-one-size

Conversation

@dmccoystephenson

Copy link
Copy Markdown
Member

Summary

Stage A documentation accuracy sweep (README, pyproject.toml, RELEASING.md, and in-code docstrings checked against source).

  • One drift was found: drawImage's scaled-surface cache holds only the most recent (size, surface) pair per path (self._scaledImages[filePath] = (size, scaledImage)), which is already pinned by test_draw_image_rescales_when_size_changes. The docstring and the README described the scaled surface as simply "cached", so a consumer drawing one asset at two alternating sizes per frame would not expect a rescale on every call.
  • The drawImage docstring and the README method list now state that behavior. No code or behavior was changed.

No tracking issue — gap found during triage.

Deferred issues

Test plan

  • python3 -m py_compile src/main/python/preponderous/graphik/graphik.py
  • python3 -m pytest — 53 passed (headless via conftest.py)

This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).

🤖 Generated with Claude Code


drafted by Claude on behalf of Daniel Stephenson

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dmccoystephenson

Copy link
Copy Markdown
Member Author

Self-review rubric (Copilot reviewer could not be added: Could not resolve user with login 'copilot', so this review was performed inline):

  • Scope: PASS — only the drawImage docstring and the matching README bullet were changed; both describe the same cache behavior.
  • Tests-new: PASS (n/a) — no public method was added.
  • Tests-fix: PASS (n/a) — no behavior was changed; the documented behavior is already pinned by test_draw_image_rescales_when_size_changes and test_draw_image_scaled_cache_is_kept_per_path.
  • Sibling structure: PASS — the new docstring paragraph follows the existing prose-then-Args layout of the neighboring draw methods.
  • Sibling renames: PASS (n/a) — nothing was renamed.
  • Docs: PASS — README and docstring now agree with self._scaledImages[filePath] = (size, scaledImage) in graphik.py; pyproject.toml and RELEASING.md were swept and no drift was found.
  • Issue resolution: PASS (n/a) — no Closes #N; the gap was found during triage.
  • Manual validation: PASS — py_compile succeeded, 53 tests passed locally, and all five Compile and test jobs (3.9–3.13) are green on the PR head.
  • camelCase / Backward-compat / Headless / No new deps: PASS — no code, signature, test, or import was changed.
  • Version sync: PASS (n/a) — _version.py was not touched.

Judgment call noted: the README bullet grows longer; a wording split was considered and rejected to keep one bullet per method, matching the drawButton entry.

No blocking findings.

This comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).


drafted by Claude on behalf of Daniel Stephenson

@dmccoystephenson
dmccoystephenson merged commit 863b4cc into main Sep 27, 2026
5 checks passed
@dmccoystephenson
dmccoystephenson deleted the docs/draw-image-scaled-cache-one-size branch September 27, 2026 07:15
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.

1 participant