molecule-core/sdk/python/molecule_plugin
Hongming Wang 741c782f6d fix(gate-4): add missing import json in sdk/python/molecule_plugin/builtins.py
PR #63 code-review caught that the SDK copy of AgentskillsAdaptor uses
json.loads/json.dumps in _merge_settings_fragment + _rewrite_hook_paths
+ _deep_merge_hooks but never imports json. The runtime copy
(workspace-template/plugins_registry/builtins.py) already has the
import; this brings the SDK side in line.

Bug surfaces only when a plugin shipping settings-fragment.json (any
of the 5 hook plugins or 2 workflow plugins in this PR) is installed
through the SDK path — would NameError on the first json.loads call.
The drift test catches behavioral drift via fixture install scenarios
but not import-level drift in helper code paths.

Verified: json is now importable (`hasattr(molecule_plugin.builtins,
'json')` → True), drift test still passes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 12:29:32 -07:00
..
__init__.py initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
__main__.py initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
builtins.py fix(gate-4): add missing import json in sdk/python/molecule_plugin/builtins.py 2026-04-14 12:29:32 -07:00
channel.py initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
manifest.py initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
org.py initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
protocol.py initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00
workspace.py initial commit — Molecule AI platform 2026-04-13 11:55:37 -07:00