Skip to content

[design] Clarify persistence manager import and registration boundary #2206

@huanghuoguoguo

Description

@huanghuoguoguo

Background

Follow-up from #2176.

After rebasing onto current master, the original isolated import failure was not reproducible in the same form. Still, the persistence layer relies on import-time registration and application-level imports, so the intended testability/runtime boundary should be made explicit.

Questions to decide

  • Should persistence database implementations be importable and testable without constructing the application graph?
  • Should manager/database registration live in import-time decorators, explicit registry setup, or dependency injection?
  • Is repeated registry initialization in a single Python process supported?
  • Should tests assert circular-import freedom at module-import level, or only through application startup flows?

Suggested next step

Decide the supported lifecycle first, then add a regression/import-boundary test that reflects that contract.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug?Bug或Bug修复相关 / maybe a bugm: Lifecycle启动/关闭流程 / Bootstrap & application life cyclepd: Need designpending: 需要进一步设计的功能 / wait for us to design

    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