[codex] Delete public WithHandler shim#476
Merged
proboscis merged 1 commit intoJun 12, 2026
Merged
Conversation
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
WithHandler(h, body)compatibility shim and its deprecation-message constants.handler(raw_handler)as the explicit raw-dispatcher ->Program -> Programinstaller and exported it fromdoeff.WithHandler(...)to directh(body)composition or explicit raw-dispatcher wrapping.doeff_vm.WithHandlerand added architecture/semgrep guards against public shim reintroduction.tests/test_withhandler_shim_deprecation.pyand addedtests/architecture/test_no_public_withhandler_shim.py.Root Cause
doeff.program.WithHandlerwas a permanent compatibility shim that silently preserved two legacy paths: forwarding new-style handlers and wrapping raw@dodispatchers. That violated the no-compat-shim policy and kept the old idiom alive across tests/packages with runtime deprecation warnings.Validation
Baseline on
mainbefore this branch:uv run python -m pytest tests -q->880 passed, 90 skipped, 55108 warnings in 54.51suv run python -m pytest packages/doeff-conductor/tests packages/doeff-vm/tests -q->421 passed, 507 warnings in 33.49sFinal on this branch:
uv run python -m pytest tests -q->881 passed, 86 skipped, 51 warnings in 66.23suv run python -m pytest packages/doeff-conductor/tests packages/doeff-vm/tests -q->421 passed in 27.70suv run pyright->0 errors, 0 warnings, 0 informationsgit diff --name-only --diff-filter=ACM -- '*.py' | xargs uv run ruff check->All checks passed!grep -rn "from doeff.program import WithHandler\|program.WithHandler" --include="*.py" .-> 0 hitsgrep -rn "def WithHandler" doeff/-> 0 hitsgrep -c "WithHandler(h, body)\|raw @do-dispatcher\|WithHandler.*deprecated" /tmp/core-withhandler-final-tests.log /tmp/core-withhandler-final-packages.log-> both0semgrep scanwith the newdoeff-no-public-withhandler-shimrule only -> passNote: full-repo
.semgrep.yamlstill reports pre-existing unrelated findings, so I validated the new guard rule independently in addition to ruff/pyright/tests.Refs: core-withhandler-compat-shim-delete