Repository navigation
feat: implement knowledge-base plugin with revisioned chunks and Dashboard - #2658
Conversation
|
Regarding the changes to |
hidb4ai
left a comment
There was a problem hiding this comment.
Reviewed commit 3079efca9579d349cbfa72b5068ea09318034750. Three reproduced correctness issues need fixes: import-root containment under directory replacement, recovery after default-space access revocation, and conflict-status recovery after cursor commit. Details are attached inline.
|
On the framework changes in this PR: please do not merge them yet Besides the knowledge-base plugin, this PR changes the plugin framework (
On the storage database name: the code comment says hashing avoids aliases between Review comments on the plugin itself ( |
|
Following up on "binding access to the transaction connection inside the write transaction" from the previous comment: reproduced, confirmed as a framework defect, and we will fix it. Reproduction: on this PR's head (3079efc), remove only the access binding in |
|
Addressed the framework ownership feedback in 6080d1b. The PR diff against master now contains no The plugin uses the upstream The RFC and usage guides state the dependency explicitly. Integration was verified against #2660 at |
hireview001
left a comment
There was a problem hiding this comment.
- CI failed: CI result (failure).
- CI failed: Upgrade release gate (failure).
- CI failed: tests (3.11, unit) (failure).
- CI did not complete: tests (3.12, unit) (cancelled).
- CI did not complete: tests (3.11, e2e) (cancelled).
- CI did not complete: tests (3.14, e2e) (cancelled).
- CI did not complete: tests (3.14, unit) (cancelled).
- CI did not complete: tests (3.13, unit) (cancelled).
- CI did not complete: tests (3.12, e2e) (cancelled).
- CI did not complete: tests (3.13, e2e) (cancelled).
- Additional CI issues: PR checks.
…e-review-alignment
|
Framework-side confirmation: the prerequisites are merged and nothing is outstanding at the framework boundary #2659 and #2660 are both on master (#2660 merged as c143960). Thank you for moving the framework changes out and for revalidating after merging master. We checked the framework-related parts at
This covers the framework boundary only and is not a full review of the plugin's own logic; @hidb4ai's review stands for that. Two items remain before merge, both already stated in your description:
|
hidb4ai
left a comment
There was a problem hiding this comment.
Re-reviewed b75c066646eff4e1aa99d552db7f453249f94280. I did not reproduce a remaining correctness defect in the updated canonical-caller storage or plugin API handlers. Native storage upgrade, real Server routes and restart behavior were checked. The remaining cross-PR coordination and stale scope description are covered in the existing discussion. This feature adds plugin tables and APIs, so approval remains a manual decision under the requested review criteria.
frf12
left a comment
There was a problem hiding this comment.
Re-reviewed 6d4ca1250cdc4e58734b7c8ed0126db41e8632f0. The earlier CI admission concern is addressed: plugin-related changes and full validation select this suite; core/framework-only changes do not.
Two reproduced findings are attached below. Please address the import-completion refresh issue; the duplicate-ID validation discrepancy is non-blocking. The documented #2710 merge prerequisite and subsequent CI rerun still apply.
|
@Zxf-xufeng 为何这个 pr 的 github ci 全部失败了? |
|
@AlexStocks Regarding your CI question: the latest Main run was intentionally cancelled while we wait for #2710. The current checks show 28 cancelled, 14 skipped and 1 successful; these are not all failing tests. We removed the duplicated core usage-accounting fix and unrelated CI changes from this knowledge-base PR to keep its scope limited to the plugin. #2710 owns the shared fixes and remains open. The intended order is to merge #2710, synchronize this branch with master to include those fixes, and then rerun the full CI suite on the updated head. CI is paused until that dependency is incorporated; we are not rerunning the current head or duplicating the core fixes here. |
…e-integration-20261119
Which issue or RFC does this PR close?
Implements RFC #2570; refs #2440, #2441, #2442, #2443 and #2444. Uses the public plugin contracts from #2659 and #2660.
Dependency integration: #2710 is merged into this branch at
16ab67ae0, together with master atc1a1bc42e. #2710 owns the shared CI/cache/test-sharding changes and the SQLite usage-recorder setup-expiry fix. CI validates this combined branch. Merge #2710 into master first, then refresh this branch and verify the final diff before merging the plugin; the dependency is not a separate knowledge-base implementation of those core fixes.Rationale for this change
Users need to import Markdown and standalone text images, search selected knowledge bases, and maintain chunks with revision evidence. One business plugin owns the
documentfamily. Each knowledge base is a core Scope; organizational spaces, defaults and membership are plugin-owned data.What changes are included in this PR?
plugins/knowledge-base: OpenDAL local snapshots, immutable original and processing Sources, RapidOCR, structural Markdown chunking, and public cursor/Supervisor consumption.The knowledge-base implementation uses public framework APIs and plugin-private storage. Outside the plugin directory, its own changes are limited to the frontend, guides/tests, optional dependencies and generated locks, type-check/license configuration, and plugin CI admission/job. The branch also includes the explicitly merged #2710 dependency, whose shared CI, usage-accounting and related test changes remain visible against master until that PR lands. The upgrade-support review preserves current master's schema declaration and #2710's accounting rationale with a recalculated combined digest; this merge adds no migration. The generic Dashboard implementation is inherited unchanged from master.
Are there any user-facing changes?
Install
powercontext[server,knowledge-base]and copy the plugin into the Server plugin directory. Server and Worker share a local snapshot directory. SQLite, embedded SeekDB and OceanBase MySQL tenants use framework-provided dedicated storage. Independent deployments sharing a SQL tenant must isolate plugin databases/accounts.The plugin uses its own pinned
BAAI/bge-small-zh-v1.5embedding configuration. Host navigation and global Scope selection are unchanged. No core columns or generated HTTP contract change. PDF/Office, generated answers, remote storage, restoration, permanent cleanup, online model switching and large-corpus performance guarantees are outside this release.How was this change tested?
uv run --no-sync pytest tests/knowledge_base tests/e2e/test_knowledge_base*.py tests/e2e/test_plugin_pages.py -q— 48 passed, 7 skipped, including real Chromium Dashboard regressions against isolated Servers. New coverage exercises browser upload and local-directory import, partial acceptance, closing the dialog/tab navigation, publication invalidation, preserved query criteria and fresh v2 retrieval. API coverage verifies duplicate rejection and valid batch ordering.uv run --no-sync pytest tests/test_ci_cache.py tests/test_ci_changes.py tests/test_ci_pipeline.py tests/test_ci_shard_collection.py tests/test_workflow_actions.py tests/builtin/runtime/test_model_usage_recorder.py -q— 330 passed, 5 skipped on the combined branch.make check, finaluv run --no-sync prek run -a, explicit pluginty check, frontend production build andgit diff --checkpassed.Optional native SQL/real-model cases were not exercised in this review-fix validation. Existing local test-instance data was untouched. CI is rerun on the combined branch; its remote result must be checked separately from these local results.
AI usage statement
OpenAI Codex assisted with implementation, review fixes, regression tests, documentation and validation.