feat(commands): add @gittensory chat <question> — grounded LLM Q&A via local Ollama - #4985
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 767f73c | Commit Preview URL Branch Preview URL |
Jul 11 2026, 07:48 AM |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4985 +/- ##
==========================================
+ Coverage 94.31% 94.33% +0.01%
==========================================
Files 455 456 +1
Lines 39083 39185 +102
Branches 14256 14288 +32
==========================================
+ Hits 36862 36965 +103
Misses 1572 1572
+ Partials 649 648 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-11 07:51:06 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 7 non-blocking
Review context
Contributor next steps
Signal definitions
Visual preview
Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
…a local Ollama Extends the existing advisoryAiRouting capability set with a 5th, Ollama-only capability (chatQa) that never falls back to the frontier chain. The new generation service rewrites the same cached decision-pack facts ask/preflight already read into natural prose, structurally confined to the Q&A command catalog so it can never reach a write/action path. Closes #4595
27324b3 to
767f73c
Compare
Summary
Adds a new
@gittensory chat <question>command that answers a contributor's real question in natural prose, sourced from the same cached decision-pack factsask/preflightalready read — but generated entirely by local Ollama (env.AI_ADVISORY), never the frontier chain.src/services/ai-chat-qa.ts): enable-flag → shared daily neuron-budget gate → provider call → output-safety check, mirroringai-summaries.ts's shape. Redacts private decision-pack terms before they ever reach the prompt.chatQacapability flag onadvisoryAiRouting(defaultfalse), threaded through the type, both normalizers (+ engine-package twin), the focus-manifest merge, OpenAPI schema, and both yml config examples. Unlike the 4 existing capabilities, this one never falls back to the frontier chain — it declines instead.DEFAULT_COMMAND_AUTHORIZATION_POLICYas["maintainer", "collaborator"](narrower thanask's default — excludesconfirmed_minerfor v1), and inAI_COST_BEARING_COMMANDSfor the tighter per-command rate limit.ask's question text already is (neutralizePublicMarkdownText+sanitizePublicComment), since this is the first surface where model output — not just user input — is echoed into a trusted bot comment.Closes #4595
Part of #4594
Test plan
ChatQaResultstatus (disabled/unavailable/declined ×3/quota_exceeded/unsafe/ok/error) and the pure grounding-redaction helpers (test/unit/ai-chat-qa.test.ts)test/unit/ai-chat-qa-import-isolation.test.ts)test/unit/github-commands.test.ts)processors.tsactually reachesgenerateChatQaAnswerfor a realchatcommand (test/unit/queue-5.test.ts)npm run typecheck,npm run test:coverage(unsharded),npm run test:ci,npm audit --audit-level=moderateall greennpm run ui:openapiandnpm run command-referenceregenerated and committednpx tsx scripts/check-engine-parity.tspasses