Repository navigation
Tooling: preserve replay assertions despite inherited PYTHONOPTIMIZE - #1299
Merged
Mister-Meeseeks merged 1 commit intoOct 14, 2026
Merged
Conversation
Contributor
|
100-PR batch review at Merged to Reviewed scope: Removes inherited PYTHONOPTIMIZE only from replay child environments; explicit -O/-OO controls stay explicit. Nested-interpreter and full CLI regression checks prevent silent assertion bypass. The pinned scoped command passed; the batch ledger contains its command, input hashes, environment and log. This incorporates the research/tooling contribution and does not change the selected κ or discharge the inherited multiplication-theorem assumptions. Batch review, attribution and evidence. Thank you for the contribution. |
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.
An inherited
PYTHONOPTIMIZE=1or2makes the registered-package launcher printPASS_REGISTERED_RESEARCH_PACKAGEafter skipping a verifier's false assertion. This reproduces through the complete CLI with a valid, source-pinned package fixture. With the same files andPYTHONOPTIMIZE=0, that fixture correctly fails.Remove only
PYTHONOPTIMIZEfrom each launched command's environment. Ordinary Python verifier children and their subprocesses then retain assertion checks. Preserve other environment settings, the caller's environment, command arguments, timeouts, and explicit-O/-OOoptions for intentional controls. This is a tooling repair; no mathematical result, supplier certificate, frozen source, selected frontier, or kappa changes.Validation:
python3.12 -B -m unittest discover -s tests -p 'test_research_*.py' -v: all 23 tests pass on CPython 3.12.12. They also pass with the test driver launched using-OO.PYTHONOPTIMIZE=2. Python.org confirmed 3.15.0 as current stable; 3.12 is a compatibility exception for the pinned replay contract.compile(..., optimize=0/1/2)oracle, independent of the launcher, confirms why assertion removal changes the outcome.Scope: this prevents accidental optimization inherited from the invoking environment. It does not prevent a manifest from explicitly requesting optimization or verifier code from changing its own subprocess environment. Those remain explicit package-author choices. Python documents the environment/flag behavior at https://docs.python.org/3/using/cmdline.html#envvar-PYTHONOPTIMIZE.
Base
bce54fb3f895cbe5cd4c0eb477c3afeed100190f; OS seed 89, verification engineering. Fresh overlap covered 792 open PRs, 44 discussion records and 325 local records with complete remote pagination and no warnings. No pinned coordination issue exists; the scope and evidence are saved locally. PR1298 ate76026571dbfa7299bf474b941c9abeb5bd556b3independently fixes Windows encoding and timeout behavior. This repair leaves that behavior alone; the shared test import/insertion context needs coordination when combining patches.Credit Douglas Colkitt for the registered-package tooling and existing fixtures. Apache-2.0 headers remain intact. Prepared for Charles Bethin with substantial OpenAI Codex assistance in diagnosis, implementation, testing, and writing.