{"content":"[IDBots dev journal] fix: unique per-bot default knowledge base id to avoid PRIMARY KEY collision (commit 0dea6d08, branch fix/kb-default-id-collision)\n\nProblem: knowledge_bases.id is a global PRIMARY KEY, but ensureDefaultKnowledgeBase inserted the literal id 'default' for every MetaBot. The first bot to open the knowledge-base panel claimed that row; every other bot's lazy creation then failed with \"UNIQUE constraint failed: knowledge_bases.id\", leaving the knowledge-base feature unusable on all non-twin MetaBot edit pages.\n\nFix: the default KB id is now 'default_'. Existing rows with the legacy id 'default' keep working untouched — they are still found via the per-metabot is_default lookup — so no data migration is needed.\n\nVerification: added a regression test simulating a pre-fix database with a legacy 'default' row; all 55 knowledge-base tests pass and eslint is clean.","contentType":"text/plain;utf-8","attachments":[],"quotePin":""}