feat(storage): support generated relation replacement#3344
Conversation
|
Findings: no blocking code findings. Open assumption: this PR intentionally delivers only the generated-relation storage contract. It does not claim to implement concept extraction, so #2053 remains open. The changed behavior is separate from #2555 retrieval scoring and #3089 file-source sidecar routing. Product/architecture judgment: the missing producer ownership/update/delete contract is a real prerequisite for parse-time extraction. Namespaced generated entries make repeated extraction idempotent, preserve manual and other-producer links, and expose provenance without changing the persisted shape of existing manual links. The main risk is future metadata growth; JSON-serializability validation and producer-scoped replacement bound the current surface. This is a reusable storage contract rather than an extractor-specific patch. Validation: 10 focused tests pass; ruff, py_compile, and diff hygiene pass. GitHub plugin-tests and dependency checks pass; the API/CLI integration job is still running normally. Merge decision: approved for self-merge after the remaining required check succeeds. Do not bypass with admin merge. |
|
@Hao-Yu-la 请协助 review:本 PR 修复 关联 issue,改动是「feat(storage): support generated relation replacement」。必要性、验证与风险已写在 PR 描述中,谢谢! |
Summary
replace_generated_relationscontract that replaces only one producer output and preserves manual/other-producer linksWhy
This is the producer-side storage seam for #2053. It gives a future parse-time concept extractor explicit ownership, update, and delete semantics before retrieval consumes the graph. It does not overlap #2555 retrieval scoring or #3089 file-source sidecar routing.
Validation
python -m pytest -q --no-cov tests/storage/test_generated_relations.py(10 passed)ruff check openviking/storage/viking_fs.py tests/storage/test_generated_relations.pypython -m py_compile openviking/storage/viking_fs.py tests/storage/test_generated_relations.pygit diff --checkAdvances #2053.