Repository navigation
Characterize the headless harness's scenario checks and SDL driver defaults - #69
Merged
Merged
Conversation
…faults Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (the review was performed in the same session that wrote the change, so it is not independent):
Findings:
No blocking 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
feature/characterize-headless-run-checks
branch
November 15, 2026 05:12
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
headless_run.py. The README's Running without Docker or a display section states that a scenario fails if no entry is recorded inenvironments.json, if the render loop does not draw the requested number of frames, or if Pygame is left initialised, and that the dummy SDL drivers are used unlessSDL_VIDEODRIVERorSDL_AUDIODRIVERis already set. Before this PR, only the "main() raised" path and the end-to-end frame-count path were exercised; the other checks and the driver default had no test.Five tests are added to
tests/test_headless_run.py; no production code is changed:TestRunScenario— each ofrunScenario's three post-run checks is triggered on its own, and the exactFAIL <scenario>: <problem>line is asserted:environments.jsonwith no entry for the grid size (main.mainreplaced by a function that writes{})rendered 0 render-loop frame(s), expected 2)pygame.get_initpatched to returnTrue, with the realmain()otherwise running)TestSdlDrivers—run()sets both drivers todummywhen they are unset, and leaves values that are already set in place (runScenarioandinstallVironStubsare patched out, so no window is opened).Test plan
python3 -m unittest discover -s tests: 214 tests run, OK (209 before)python3 -m py_compile main.py graphik.py __init__.py headless_run.pypassesos.environ.setdefault("SDL_VIDEODRIVER", ...)replaced by plain assignment,test_drivers_that_are_already_set_are_left_in_placefails; with thepygame.get_init()check disabled,test_a_scenario_that_leaves_pygame_initialised_failsfails. Both mutations were reverted andheadless_run.pyis unchanged in the diff.Manual validation against a live Viron is not applicable: no rendering or Viron-service code is touched.
Deferred issues
All open issues were skipped this cycle, since each one is waiting on a decision by the maintainer and none can be implemented as specified yet:
Vironsubmodule needs explicit authorizationNo tracking issue — gap found during triage.
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