Repository navigation
refactor(cortex): remove the notes index - #6775
Merged
Merged
Conversation
Owner decision 2026-11-24: agents search files on demand, so o8 no longer indexes markdown note folders into Brain facts. Removed: - the knowledge-rescan loop (60 s) and the fs.watch on note folders started with the repo doc watcher - note reading, chunk distillation, and reconciliation on settings saves - the /api/cortex/sources route, its MCP tool (cortex_knowledge_sources) and the `o8 brain sources` CLI command - the answer-validity guard that only fired for note-derived facts; the facts retriever now skips facts whose source is a note folder Kept: the knowledgeSources setting and its write guard (assertNotKnowledgeSource, operator-only edits, root validation), which still keep agents from writing into protected folders. Cortex facts, directives and proposals are unchanged. The knowledge_chunks table and existing facts stay on disk. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hurttlocker
enabled auto-merge
November 25, 2026 01:02
📝 o8.run docs may need updatingThis PR changes source that the public docs describe. Review whether these pages are still accurate (and bump their stamp in o8-site if so):
Flagged by docs-drift against https://o8.run/api/docs/manifest. Docs only — nothing is auto-edited. |
🔍 PR Review Bot
Automated review — CI workflow |
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.
Owner decision 2026-11-24 (item 15): cut the notes index. Agents search files on demand, so o8 no longer reads markdown note folders into Brain facts.
Removed
knowledge-rescanloop (60 s timer) and thefs.watchon note folders that started with the repo doc watcher.src/lib/cortex/knowledge/{index,read-notes,reconcile,sources-route,answer-validity}.ts)./api/cortex/sources(route and registry entry), thecortex_knowledge_sourcesMCP tool, ando8 brain sources.source_kind = 'knowledge'facts, so old note facts no longer reach answers.Kept
knowledgeSourcessetting and its write guard (assertNotKnowledgeSource,knowledgeSourceWriteRefusal, root validation, operator-only edits). Twelve writers still use it to keep agents out of protected folders.knowledge_chunkstable and existing rows, untouched on disk.There was no native Knowledge sources settings page or Brain dock piece for it. The native settings window and Brain dock never showed sources, so nothing changed there. The phone app does not call any removed route.
Tests
tests/knowledge-sources-real-path.test.ts(covered only the removed indexer) and the reconciliation cases ino8d-settings-window-ownerando8d-knowledge-owner.knowledge-source-direct-writers: the source-admission case now goes through the settings writer and asserts the same refusal.typecheck:fast, lint, the nine enumerating suites, and verify:ci integration (changed files) pass. Two failures,mcp-deferred-tools(tool-count floor) ando8d-cortex-ask-answer-native(401 vs 403), fail the same way on main. Neither file is changed.🤖 Generated with Claude Code