Repository navigation
Conversation
- Move EmbeddingProfile into powercontext.artifacts.indexes; builtin Memory models import it from there, so existing import paths still work. - Import artifact_plugins in the core installation role smoke check. Refs oceanbase#2085 (N3)
hidb4ai
left a comment
There was a problem hiding this comment.
One upgrade compatibility regression remains in the moved model; details inline.
…ating it Moving EmbeddingProfile into powercontext.artifacts.indexes dropped "Memory" from its docstring. Pydantic emits that docstring as $defs.EmbeddingProfile.description, so an unchanged plugin with an EmbeddingProfile field generated a different content schema and reloading a registration persisted by the previous release failed with a 409 artifact_schema conflict. Restore the original docstring and cover reloading such a registration through the Server.
hidb4ai
left a comment
There was a problem hiding this comment.
The persisted-schema regression is fixed: the previously registered plugin reloads successfully on this head. The new regression test still blocks the required type check; details inline.
…ng them - Read the family schema and binding spec with scalar_one(), so ty no longer reports a possibly-None subscript and a missing row fails the test directly. Refs oceanbase#2085 (N3)
hireview001
left a comment
There was a problem hiding this comment.
- CI failed: CI result (failure).
- CI failed: harness-validation / Acceptance (sqlite) (failure).
- CI failed: dsh-package (failure).
- CI failed: Main (failure). Failed steps: dsh-package / Test built plugin in the real DSH runtime; harness-validation / Acceptance (sqlite) / Run deterministic scenarios; harness-validation / Acceptance (sqlite) / Require all selected acceptance work and evidence.
hidb4ai
left a comment
There was a problem hiding this comment.
Both previous findings are addressed. Rechecked type validation and reloading the pre-upgrade SQLite registration on this head; the persisted schema and existing import paths are preserved. No new database tables or public interfaces. The remaining DSH setup and harness CI failures still block merging; the harness evidence shows an ACP dependency import failure (text_block).
| SearchMode = Literal["text", "vector", "hybrid"] | ||
|
|
||
|
|
||
| class EmbeddingProfile(BaseModel): |
There was a problem hiding this comment.
[P2] Preserve the profile's historical schema identity
For plugin content containing both the builtin profile and a distinct model named EmbeddingProfile, this move changes Pydantic's module-qualified $defs keys and $ref values, as reproduced against the base definition. Consequently, ArtifactPluginManager._validate_identity rejects the unchanged plugin on reload with an artifact_schema conflict; preserve the historical schema identity and add regression coverage for colliding model names.
Which issue or RFC does this PR close?
Refs #2085 (N3). This PR does not close the umbrella issue.
Rationale for this change
powercontext.artifact_pluginsis a core public export. A core-only installation (pip install powercontextwithout extras) cannot import it.from powercontext import *also fails:The core module
artifacts/indexes.pyimportsEmbeddingProfilefrom the builtin Memory package. That import loads the full Memory package and its optional HTTP dependencies.The installation role CI did not find this problem. The role smoke check imported
artifact_pluginsonly when extras were installed.What changes are included in this PR?
EmbeddingProfileinto the core modulepowercontext.artifacts.indexes. The builtin Memory models import it from there. Existing import paths stay valid, and the class is the same object. The docstring stays the same, because Pydantic writes it into the generated schema, and the plugin manager compares persisted content schemas verbatim.artifact_pluginsfor every role, includingcore.Are there any user-facing changes?
Yes. A core-only installation can import
powercontext.artifact_pluginsand runfrom powercontext import *. No public import path is removed. The model fields, the serialized format, and the generated JSON schema do not change. Plugins registered by the previous release reload without a schema conflict.How was this change tested?
scripts/ci_role_smoke.py corefails with the old wheel and passes with the new wheel.scripts/ci_installation_roles.pypasses for all five roles:core,builtin,cli,builtin,cli,server,cli.test_reload_accepts_embedding_profile_schema_persisted_by_existing_registration: it writes the schema that the previous release persisted, then reloads the plugin through the Server. If the docstring changes, the reload returns 409 and the test fails.powercontextare identical on63f021d6and on this branch.make checkuv run pytest -n 8on the 68 test files that useEmbeddingProfile,VectorIndex, orartifact_plugins: 1399 passed, 293 skipped.make docs-testAI usage statement
I used Claude Code (Claude Opus 5.5) to write this change. I chose the approach after I read the analysis of the import chain. I examined the tests.