Skip to content

feat(storage): support generated relation replacement#3344

Open
huangruiteng wants to merge 1 commit into
volcengine:mainfrom
huangruiteng:codex/issue-2053-generated-relations
Open

feat(storage): support generated relation replacement#3344
huangruiteng wants to merge 1 commit into
volcengine:mainfrom
huangruiteng:codex/issue-2053-generated-relations

Conversation

@huangruiteng

Copy link
Copy Markdown
Contributor

Summary

  • add provenance and metadata to generated relation entries while preserving the existing manual-link on-disk shape
  • add an idempotent replace_generated_relations contract that replaces only one producer output and preserves manual/other-producer links
  • expose generated provenance on relation readback and validate producer/metadata inputs

Why

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.py
  • python -m py_compile openviking/storage/viking_fs.py tests/storage/test_generated_relations.py
  • git diff --check

Advances #2053.

@huangruiteng

Copy link
Copy Markdown
Contributor Author

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.

@huangruiteng

Copy link
Copy Markdown
Contributor Author

@Hao-Yu-la 请协助 review:本 PR 修复 关联 issue,改动是「feat(storage): support generated relation replacement」。必要性、验证与风险已写在 PR 描述中,谢谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant