Repository navigation
test: pin that drawImage's cache survives a pygame restart - #51
Merged
dmccoystephenson merged 2 commits intoOct 16, 2026
Merged
Conversation
drawImage skips the font cache's display-session invalidation because a loaded surface survives a pygame.quit()/init() cycle. Nothing tested that claim, so this adds a test showing the cached surfaces are reused and still draw correctly after a restart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (performed inline; no independent reviewer was available):
Findings:
This review was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
dmccoystephenson
deleted the
test/pin-draw-image-cache-survives-restart
branch
October 16, 2026 08:06
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stage B (unit-test expansion) cycle for
drawImage's image cache.test_draw_image_cache_survives_a_pygame_restart. The comment indrawImagejustifies skipping the font cache's display-session invalidation by saying that a surface frompygame.image.loadsurvives apygame.quit()/init()cycle ("verified empirically"). No test covered that claim, so a pygame upgrade that broke it would have gone unnoticed and the cache would blit stale surfaces. The new test draws an image, restarts pygame, rebinds the instance to the new display, and asserts:No tracking issue: the gap was found during triage.
Mutation check
A display-session invalidation was temporarily added to
drawImage, so that the cache was dropped after the restart. The new test then failed (assert ([('…/red.bmp',)], …) == ([], [])). Aftergraphik.pywas restored, the test passed again.Test plan
python3 -m py_compile src/main/python/preponderous/graphik/graphik.pySDL_VIDEODRIVER=dummy python3 -m pytest: 62 passed (61 before)conftest.py)Triage notes (deferred issues)
All four open issues were skipped this cycle because each needs a maintainer decision or a change to
.github/workflows/, which is excluded from autonomous change:publish.yml..github/workflows/test.yml.__init__.pydepends on sibling-project conventions, which is a maintainer call..github/workflows/publish.yml.A documentation sweep of
README.md,RELEASING.md,pyproject.tomland the in-code docstrings found no drift beyond what those issues already track.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