From 9978fd3ef505e9417eceffecec49ed3ea76448c7 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 2 May 2026 18:44:39 +0100 Subject: [PATCH] Stop social prompts from tripping source grounding --- apps/bot/src/discord-bot-support.ts | 2 +- apps/bot/src/discord-bot.ts | 8 +++++--- state/evidence.jsonl | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/bot/src/discord-bot-support.ts b/apps/bot/src/discord-bot-support.ts index 91dcc1e..6f0b1da 100644 --- a/apps/bot/src/discord-bot-support.ts +++ b/apps/bot/src/discord-bot-support.ts @@ -249,7 +249,7 @@ export function inferSourceGroundingHint( for (const repo of repoSummaries) { for (const alias of buildRepoAliases(repo.repoName)) { - if (alias.length < 4) { + if (alias.length < 6) { continue; } diff --git a/apps/bot/src/discord-bot.ts b/apps/bot/src/discord-bot.ts index f209bc1..86d631e 100644 --- a/apps/bot/src/discord-bot.ts +++ b/apps/bot/src/discord-bot.ts @@ -271,14 +271,16 @@ export async function startBot(): Promise { return; } + const isDirectMessage = !message.inGuild(); + await ingestIfIndexed(message, config.channelIndexing, ragPipeline); await rememberAmbientVoidReference(message, client.user?.id, interactionMemory); - if (!client.user || !message.mentions.has(client.user)) { + if (!client.user || (!isDirectMessage && !message.mentions.has(client.user))) { return; } - const prompt = stripBotMention(message.content).trim(); + const prompt = isDirectMessage ? message.content.trim() : stripBotMention(message.content).trim(); if (!prompt) { await replyToMessage( @@ -313,7 +315,7 @@ export async function startBot(): Promise { providerRegistry, stylePack: activeStylePack, systemMessages: activeSystemMessages, - silentOwnerQueueAck: true, + silentOwnerQueueAck: !isDirectMessage, }); } catch (error) { console.error(error); diff --git a/state/evidence.jsonl b/state/evidence.jsonl index ebd2543..26762cb 100644 --- a/state/evidence.jsonl +++ b/state/evidence.jsonl @@ -18,3 +18,4 @@ {"ts":"2026-05-02T11:48:55Z","type":"implementation","status":"ok","note":"Source repo indexing now auto-reconciles during startup and watchdog runs, and the source archive is sharded by repo behind a manifest because the old monolithic source-documents.json hit real size limits and broke incremental writes."} {"ts":"2026-05-02T14:05:54Z","type":"implementation","status":"ok","note":"Scheduled-task helpers must anchor repo-relative scripts, dotenv loading, and path resolution to the VoidBot root; relying on cwd keeps sending System32 in to eat them."} {"ts":"2026-05-02T17:34:02Z","type":"implementation","status":"ok","note":"Layered private system message catalogs over the tracked base, deferred slow slash replies before provider execution, and chunked Discord output so missing keys and overlong local_llm replies stop failing live interactions."} +{"ts":"2026-05-02T17:39:46Z","type":"implementation","status":"ok","note":"Source-grounding alias matching now ignores overly short repo components so social prompts mentioning Void stop tripping fake repo-evidence requirements, and direct messages intentionally count as prompts without requiring a mention."}