fix: inject --auto-servernum via executable property to fix xvfb-run on kernel restart#323
Merged
Merged
Conversation
…on restart The prior fix (Calysto#321) only injected --auto-servernum in _validate_executable, leaving _create_repl to use the raw executable without it. On kernel restart, xvfb-run would conflict with the already-running Xvfb and exit with status 1. Centralise the normalisation in an `executable` property so all callers automatically get the corrected command string. Simplify _validate_executable accordingly and move the xvfb tests to TestExecutableProperty. Closes Calysto#320
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #323 +/- ##
==========================================
+ Coverage 92.85% 92.90% +0.04%
==========================================
Files 6 6
Lines 434 437 +3
==========================================
+ Hits 403 406 +3
Misses 31 31
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
References
Closes #320
Description
Follow-up to #321. The prior fix injected
--auto-servernumonly in_validate_executable, but_create_replusedself.executabledirectly — without the flag. On kernel restart, when an Xvfb server was already running,xvfb-runwould exit with status 1 and the kernel would fail to start.Changes
executableto a property that normalises the xvfb-run command by injecting--auto-servernumwhen needed_executable; all callers (_validate_executable,_create_repl,_get_temp_dir) automatically get the corrected string_validate_executablenow that injection is handled by the property--auto-servernumtests fromTestValidateExecutableto a newTestExecutablePropertyclassBackwards-incompatible changes
None
Testing
Existing test suite passes (
uv run pytest tests/test_engine.py). The xvfb injection is now verified through the property tests rather than via_validate_executable.AI usage