feat(topic-memory): complete generic Artifact APIs - #1615
Merged
Merged
Conversation
Zxf-xufeng
marked this pull request as ready for review
September 16, 2026 10:44
Zxf-xufeng
requested review from
PsiACE,
Teingi and
frf12
and removed request for
PsiACE and
Teingi
September 16, 2026 10:44
Teingi
reviewed
Sep 17, 2026
Zxf-xufeng
deleted the
codex/topic-memory-generic-api-implementation
branch
September 17, 2026 06:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue or RFC does this PR close?
Implements the design proposed in #1614. The RFC and implementation are intentionally separate draft PRs.
Rationale for this change
PR #1550 made Topic Memory readable through the generic Artifact APIs, but generic manual writes, tags, filtered listing, and complete cross-Scope publication were still unavailable. These operations must preserve the family's active head, immutable revisions, provenance, chunks, and configured search indexes as one consistent state.
What changes are included in this PR?
Are there any user-facing changes?
Topic Memory gains the seven capabilities described in #1614. Manual input requires complete nonblank title/summary/detail and is not rewritten by a generation model. Vector deployments perform synchronous embedding before success. Replacing existing content or tags requires
scope.admin; creation requiresscope.contribute. Default tag queries now include Topic Memory.Before upgrading existing databases, back up the database and pause old writers while the tag CHECK constraint is upgraded. Downgrades require evaluating compatibility with newly stored Topic Memory tags. No automatic repair of historically incomplete Topic Memory copies is attempted.
How was this change tested?
make check: passed (integration manifest, lock consistency, pre-commit checks, Ruff, and both type-check targets).make contract-test: passed, 48 tests; generated Python and JavaScript API checks passed.pytest tests/e2e/test_topic_memory_generic_api.py -q: 9 passed, covering SQLite FTS and vector-enabled writes, history, tags, publication, restart, migration rollback, two-instance races, storage-failure atomicity, and configured inference timeout.Tests clear inherited local server authentication/dashboard settings and use temporary databases. Product-chain tests use loopback-only test services.
AI usage statement
OpenAI Codex assisted with codebase analysis, RFC translation, implementation, regression tests, and verification. The changes are submitted as a draft for maintainer review.