Skip to content

[test-build] PluginContainer.from_dict drops install metadata during roundtrip #61

@huanghuoguoguo

Description

@huanghuoguoguo

Background

While continuing the SDK test-build coverage work, a runtime container roundtrip test found that PluginContainer.from_dict() does not preserve install metadata emitted by PluginContainer.model_dump().

Reproducer

container = PluginContainer(
    install_source='marketplace',
    install_info={'id': 'tester/demo'},
    ...
)
restored = PluginContainer.from_dict(container.model_dump())

assert restored.install_source == 'marketplace'
assert restored.install_info == {'id': 'tester/demo'}

Expected: serialized container metadata roundtrips.

Actual: from_dict() does not pass install_source or install_info, so the restored container falls back to default empty values.

Risk

  • Plugin install provenance can be lost after persistence/cache roundtrip.
  • Runtime management, upgrades, diagnostics, or marketplace-origin logic may make decisions with missing metadata.
  • model_dump() and from_dict() are not inverse operations.

Test Signal

Locked in test-build as an xfail(strict=True) contract test:

tests/runtime/plugin/test_container.py::test_plugin_container_roundtrip_should_preserve_install_metadata

No source fix is included in the test-build branch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions