Skip to content

fix(registry): harden enumeration, import recovery, and duplicate resolution - #548

Open
rikkurea-boop wants to merge 4 commits into
OpenDCAI:mainfrom
rikkurea-boop:publish/p05-01-prompt-registry-full-enumeration
Open

rikkurea-boop wants to merge 4 commits into
OpenDCAI:mainfrom
rikkurea-boop:publish/p05-01-prompt-registry-full-enumeration

Conversation

@rikkurea-boop

@rikkurea-boop rikkurea-boop commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fix registry enumeration, failed-import recovery, and non-deterministic duplicate-name resolution.

This PR consolidates the original prompt registry enumeration fix with related registry recovery and deterministic lookup improvements.

Changes

  • Fix full enumeration of mixed prompt modules and nested packages.
  • Restore registry state after failed imports, preserving existing registrations and retry behavior.
  • Prevent incomplete module imports from leaving stale registry entries.
  • Resolve built-in duplicate names deterministically without eagerly importing unrelated modules.
  • Use AST-qualified discovery to recognize valid registrations and avoid unnecessary imports.
  • Preserve explicit user registrations and existing lazy-loading behavior.

Testing

  • All 4 combined validation environments passed on Ubuntu and Windows.
  • Python 3.10 and 3.12 validated.
  • 22 focused registry tests passed per environment.
  • CPU/API suite: 168 passed, 1 skipped on Python 3.10; 177 passed on Python 3.12.
  • Regression coverage includes full enumeration, import failure recovery, duplicate precedence, AST qualification, and lazy-loading isolation.

Limitations

Dynamic registrations and concurrent imports are not fully covered by the recovery guarantees. External import side effects cannot always be rolled back.

The changes are limited to the registry module and its regression tests.

@rikkurea-boop rikkurea-boop changed the title fix(registry): enumerate mixed prompt module trees fix(registry): harden enumeration, import recovery, and duplicate resolution Oct 15, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant