Skip to content

feat(knowledge): replace Python with native background builds - #1966

Merged
santoshkumarradha merged 4 commits into
devfrom
feat/knowledge-native-go
Oct 26, 2026
Merged

santoshkumarradha merged 4 commits into
devfrom
feat/knowledge-native-go

Conversation

@santoshkumarradha

Copy link
Copy Markdown
Member

Summary

Knowledge compilation and page updates currently require Python. Replace that runtime with native Go and one profile-wide SQLite database, and populate knowledge from saved chats across projects.

Memory → Build knowledge base → durable background worker
Saved chats across projects → source queue → native compiler
                                      ↓
                         SQLite pages + indexed search
                                      ↓
                         reader / editor / agent recall

Existing history waits for the Build action. Empty profiles show “Knowledge will populate as you chat.” Later saved chats update knowledge automatically. Builds continue while users chat or navigate. Edits and deletion tombstones survive rebuilds.

The native port includes extraction, exact source validation, corrections, reviewed learning, question maintenance, topics, links, proposals, source-window revisits, recall and frozen support-contract replay. The embedded Python compiler and prototype viewer are removed.

Evidence

  • Before: compilation and page edits launch python3; knowledge is scoped to the selected project.
    After: live compilation and later-chat population passed with Python unavailable: 3 sources, 2 searchable cited pages. Every recorded model role used OpenRouter deepseek/deepseek-v4.1-flash.
  • Before: no profile-wide saved-history build flow.
    After: tests cover all-project import, first-chat population, progress/navigation, interrupted-job recovery, unreadable-chat isolation, and edits/deletes across rebuilds. The actual application displays the Build action for saved history and the waiting message for an empty profile.
  • Frozen source-support contracts: 6/6 passed live (correction retirement, proposals, agent reports, scope isolation, negation and abstention).
  • make pr-ready, release build and knowledge race tests passed. Independent Standards and Spec reviews found no remaining correctness blockers.
  • Actual terminal Memory navigation, five alternating runs per revision: baseline median 65.22 ms (62.50–70.56), native median 69.02 ms (65.36–75.14), zero navigation failures. These measure key-to-screen response only; startup and model latency are excluded. Overlapping ranges and terminal/polling overhead make the performance comparison inconclusive.

Merge Danger

Door: two-way

This unshipped feature rebuilds from saved chats; existing Python vault files are not migrated. Original chat logs remain the recovery source.

Blast Radius: knowledge

This is a broad compiler/storage rewrite. Hosted remote Knowledge remains unsupported. Search is indexed, unchanged pages avoid reindexing, and model input batches are bounded; publication still materializes and compares the complete page projection. This does not establish unlimited-vault scalability or general semantic accuracy.

@santoshkumarradha
santoshkumarradha marked this pull request as ready for review October 26, 2026 16:35
@santoshkumarradha
santoshkumarradha merged commit 334cab9 into dev Oct 26, 2026
8 checks passed
@santoshkumarradha
santoshkumarradha deleted the feat/knowledge-native-go branch October 26, 2026 16:38
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.

1 participant