Repository navigation
Move knowledge curation behind SDK facade - #188
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7e1e2db06f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| from time import monotonic, sleep | ||
| from typing import Any, Final | ||
|
|
||
| from ..sdk.v1.models import ( |
There was a problem hiding this comment.
Avoid importing models through the eager SDK package
When infermatrix_copilot.knowledge_service.curation is imported directly, this import first initializes sdk.v1.__init__, which eagerly imports the knowledge facade; that facade immediately imports KnowledgeCurator back from the still-partially initialized curation module and raises ImportError. The updated tests miss this because they import infermatrix_copilot.sdk.v1 before importing curation, but a fresh import infermatrix_copilot.knowledge_service.curation fails. Move the shared models below the SDK package boundary or make the facade export lazy so the provider-owned module works independently of import order.
Useful? React with 👍 / 👎.
KnowledgeCuratorcurrently contains provider-owned catalog, prompt, validation, apply, and rollback behavior inside the public SDK module. This moves the implementation intoknowledge_service.curationand leavessdk.v1.knowledgeas a compatibility facade for the unchanged public class and error imports. Direct capability detection uses the internal implementation instead of a private SDK helper. The README now describes the bot's actual local-patch handoff rather than retired fork-push/PR publication.Validation: 1,528 local tests passed. An installed wheel was built and smoke-tested for public import, curation construction, and Direct capabilities. Existing public SDK imports and curated apply/rollback tests remain green.