Skip to content

fix(topic-memory): guard runtime profiles and reuse worker indexes - #1512

Merged
Teingi merged 6 commits into
oceanbase:masterfrom
frf12:fix/topic-memory-runtime-safety
Sep 9, 2026
Merged

Teingi merged 6 commits into
oceanbase:masterfrom
frf12:fix/topic-memory-runtime-safety

Conversation

@frf12

@frf12 frf12 commented Sep 8, 2026

Copy link
Copy Markdown
Member

Which issue or RFC does this PR close?

Follow-up to #1490 and RFC #1417. No additional issue is closed.

Rationale for this change

Empty Topic stores can change retrieval configuration, but already-running runtimes and spawned workers must not silently reuse or overwrite a different persisted shape/profile. Topic workers also do not need to recreate ordinary Memory/Experience indexes for every Source Window.

What changes are included in this PR?

  • Check the persisted retrieval shape/profile before and after Topic search, exact get, and current-head browse. Serialize empty-store reconfiguration with publication.
  • Filter SQLite and OceanBase vector candidates by embedding-profile fingerprint before applying candidate budgets.
  • Make worker bootstrap validate the existing Topic shape instead of configuring it. A stale worker specification fails without modifying the shape or Cursor; normal runtime startup retains empty-store reconfiguration.
  • Skip ordinary Memory/Experience index initialization in Topic workers, while preserving normal runtime recovery and Topic validation/publication guards.
  • Include the reviewed bilingual RFC docs(rfc): propose topic memory artifacts #1417 filename/ID migration and reference corrections. The RFC bodies and headings are otherwise unchanged; the example templates remain.

Are there any user-facing changes?

Stale runtimes fail with a typed retrieval-shape error instead of returning results from the wrong embedding space or overwriting current configuration. Topic worker startup avoids unrelated index rebuild work.

No public API or database migration is added. The Source fragmentation behavior merged in #1490 is unchanged. File-backed SQLite remains required for spawned Topic processing. The old 0000_topic_memory.md documentation paths are replaced by 1417_topic_memory.md, without redirects.

How was this change tested?

Validation on head be68e31bd73e9a7afcd48223d2d28b683fe51de0:

  • Focused persistence/runtime/processing suite: 139 passed, 1 skipped.
  • make test: 1790 passed, 26 skipped, 6 warnings.
  • make check: passed, including manifest tests, lock consistency, formatting, lint and type checks.
  • Cumulative git diff --check from the feat(topic-memory): add end-to-end topic memory #1490 merge: passed.
  • Real spawn regression covers an old FTS worker specification after switching the database to hybrid: bootstrap fails, persisted configuration and Cursor remain unchanged, and the new runtime can publish and search/get/browse.
  • SQLite tests cover read-only shape checks and profile filtering before candidate limits; OceanBase SQL-contract tests cover both vector channels.

On parent 93495aecd781f6fc36b70b0a9eac4b64c9642272, documentation validation passed (make docs-test, 663 exported pages, 47 anchors per RFC locale). Independent reliability validation on that parent also exercised OceanBase CE 4.3.5.6 vector/hybrid/detail-vector and stale-profile filtering. The final worker-bootstrap amendment has not been rerun against live OceanBase/SeekDB or real embedding providers.

AI usage statement

Implemented with OpenAI Codex and AI-assisted review. The changes were checked with automated regression tests, full local tests and quality gates; limitations are stated above.

frf12 and others added 6 commits September 8, 2026 18:32
Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


rongfeng.frf seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@Teingi
Teingi merged commit bec63d2 into oceanbase:master Sep 9, 2026
16 of 17 checks passed
frf12 added a commit to frf12/powercontext that referenced this pull request Sep 13, 2026
docs/superpowers/ is declared in .gitignore as local agent artifacts
(rule added in oceanbase#1323), but this brainstorming working spec was tracked
before that and slipped into upstream via oceanbase#1490, then got touched again
by oceanbase#1512. Its content (RFC 1417 persistence milestone design) is already
covered by docs/en/rfcs/1417_topic_memory.md and
docs/zh/rfcs/1417_topic_memory.md.
PsiACE pushed a commit that referenced this pull request Sep 13, 2026
docs/superpowers/ is declared in .gitignore as local agent artifacts
(rule added in #1323), but this brainstorming working spec was tracked
before that and slipped into upstream via #1490, then got touched again
by #1512. Its content (RFC 1417 persistence milestone design) is already
covered by docs/en/rfcs/1417_topic_memory.md and
docs/zh/rfcs/1417_topic_memory.md.
@frf12
frf12 deleted the fix/topic-memory-runtime-safety branch October 19, 2026 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants