Repository navigation
L2: python-introspect is the one dataclass codec and module-surface helper - #1169
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- openhcs/serialization/json.py and openhcs/core/public_api.py are deleted; every importer imports to_jsonable, the Json aliases and the public-name helpers from python_introspect directly. The agent DTO package and dto.common no longer re-export the Json aliases; mcp.dev_client no longer re-exports to_jsonable. - AgentDtoJsonCodec and DebugJsonCodec are deleted; dataclass_from_mapping is the only decoder and to_jsonable the only generic encoder. The UI bridge contract decodes its own payload instead of taking a decoder argument. - Lazy package exports (agent.dto, pyqt_gui, core.steps, benchmark, benchmark.adapters) declare their owners through lazy_exports; the dead lazy layers in core, processing and processors are deleted. - Submodule external/python-introspect -> 0.2.2 branch; pin >=0.2.2,<0.3. - Guards in tests/unit/test_l2_codec_public_api_guards.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Surface L2 (receipt: docs/refactor/consolidation-20261009/L2-codec-public-api.md). Lockstep library PR: OpenHCSDev/python-introspect#16 (python-introspect 0.2.2; this PR's submodule points at that branch, so merge #16 first).
openhcs/serialization/json.pyandopenhcs/core/public_api.pyare deleted. All importers (36 + 32 production modules, plus tests, scripts, benchmark, paper and validation) importto_jsonable,JsonValue/JsonObject/JsonScalarand the public-name helpers frompython_introspect. Re-exports throughagent.dto,agent.dto.commonandmcp.dev_clientare removed.AgentDtoJsonCodec(ui_bridge_transport, 99 lines) andDebugJsonCodec(core/debug) are deleted.dataclass_from_mappingis now the only decoder: wire payloads with undeclared fields fail loudly instead of being dropped silently. UI bridge contracts decode their own payload, so the decoder parameter is gone.agent.dto(the placeholder-swapping module class too),pyqt_gui,core.steps,benchmarkandbenchmark.adaptersnow go throughlazy_exports(globals(), {owner: names}), which also produces__all__. The dead lazy layers inopenhcs.core(CoreExportenum, no readers) andprocessing/backends/processorsare deleted.python-introspect>=0.2.2,<0.3. This stays inside ObjectState's<0.3bound, so ObjectState needs no change.tests/unit/test_l2_codec_public_api_guards.py.Tests: touched-test set (51 files) run on this branch and on main (bdf5b44). The failing sets are identical, except one UI-bridge test that fails only when a live bridge already occupies port 7796 on this machine; it passes when run alone. python-introspect suite: 167 passed.
L2 · PR #1169 · guards 3/3 · production −1034 +501 · tests −92 +163
🤖 Generated with Claude Code