LearnNewsExamplesServices
Frontmatter
titlefix(ai): surface oversized kb ingest skips (#13930)
authorneo-gpt
stateMerged
createdAtJun 23, 2026, 4:26 PM
updatedAtJun 23, 2026, 5:36 PM
closedAtJun 23, 2026, 5:36 PM
mergedAtJun 23, 2026, 5:36 PM
branchesdevcodex/13930-kb-oversized-diagnostics
urlhttps://github.com/neomjs/neo/pull/13931
contentTrust
projected
quarantined0
signals[]
Merged
neo-gpt
neo-gpt commented on Jun 23, 2026, 4:26 PM

Resolves #13930

Adds a Knowledge Base ingestion guardrail for local embedding providers so over-budget source-file inputs are skipped before temp JSONL/vector handoff. Safe chunks still embed normally; oversized raw fallback and client-parser chunks now surface skippedOversized, a bounded KB_INGEST_INPUT_SIZE_EXCEEDED error, ConsumerFriction, and KB logger diagnostics without exposing raw source content. The update also removes the ADR-0019-violating hard-coded tenant default fallbacks from the KB tenant-stamp/hash use sites; those paths now read the resolved AiConfig leaves only.

Evidence: L2 (unit + static validator coverage of local-provider oversized skip behavior before vector handoff, plus tenant-stamping/hash regression coverage) -> L2 required (ingest-time diagnostic contract). No residuals.

Related: #13928 Related: #13914 Related: #13924 Related: #11735

Deltas from ticket

No private deployment config changes, new public daemon surface, custom parser, or auto-splitting behavior is included here. Non-local embedding providers remain exempt because this guardrail is keyed to the local embedding context leaves.

The operator-surfaced ADR-0019 issue is included as a follow-up delta: no MCP response shape changes were needed for that cleanup, and the existing IngestSourceFilesResponse schema update remains limited to skippedOversized.

Test Evidence

  • npm run agent-preflight -- ai/services/knowledge-base/DatabaseService.mjs ai/services/knowledge-base/VectorService.mjs ai/services/knowledge-base/KnowledgeBaseIngestionService.mjs ai/mcp/server/knowledge-base/openapi.yaml test/playwright/unit/ai/services/knowledge-base/KnowledgeBaseIngestionService.spec.mjs
  • npm run test-unit -- test/playwright/unit/ai/services/knowledge-base/KnowledgeBaseIngestionService.spec.mjs test/playwright/unit/ai/services/knowledge-base/VectorService.tenantStamping.spec.mjs test/playwright/unit/ai/services/knowledge-base/VectorService.WorkVolumeBranching.spec.mjs — 57 passed
  • git diff --check

Post-Merge Validation

  • Run a real tenant-repo ingestion with an intentionally over-budget file and verify the KB tool response includes skippedOversized plus a bounded KB_INGEST_INPUT_SIZE_EXCEEDED diagnostic.
  • Confirm the daemon diagnostic work in #13914 / #13924 can consume the emitted KB log and friction surfaces without adding a new public connection path.

Commits

  • b51a485a9dfix(ai): surface oversized kb ingest skips (#13930)
  • 4b6b301046fix(ai): read kb tenant defaults from aiconfig (#13930)

Authored by Euclid (GPT-5, Codex Desktop). Session 1be84a2d-a911-424a-bfb0-10a51fff6303.

tobiu
tobiu APPROVED reviewed on Jun 23, 2026, 5:36 PM

No review body provided.