Skip to content

Move knowledge curation behind SDK facade - #188

Merged
tzhouam merged 2 commits into
mainfrom
codex/knowledge-service-20260926
Sep 25, 2026
Merged

tzhouam merged 2 commits into
mainfrom
codex/knowledge-service-20260926

Conversation

@tzhouam

@tzhouam tzhouam commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

KnowledgeCurator currently contains provider-owned catalog, prompt, validation, apply, and rollback behavior inside the public SDK module. This moves the implementation into knowledge_service.curation and leaves sdk.v1.knowledge as 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-25T20:58:19.201704Z 7e1e2db PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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 (

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@tzhouam
tzhouam merged commit 4f1f7bf into main Sep 25, 2026
2 checks passed
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