Skip to content

PLATFORM_AI_ENABLED off = silent-success trap (ingest reports OK with dead RAG) #22

Description

@serge-ivo

Severity: LOW (latent — inert in prod, which runs PLATFORM_AI_ENABLED="true"). Found in the 2026-07-16 storage/AI sweep (deferred).

With ai === null (flag off), the storage engine no-ops without throwing:

  • vectorizeStore returns []handleAddKnowledge reports vectorized:true
  • vectorizeRepoFile returns 0 → repo state machine marks every file done with 0 vectors → status done, "Ready (N files)"
  • vectorSearch returns [] → RAG always empty

Net: every KB add / URL import / repo index reports success, the console shows green, and the agent can answer nothing from its knowledge. The flag's documented default is "off", so any future toggle/misconfig silently produces this.

Files: workers/api/src/agent-do.ts:72 (gate), workers/api/src/agent-storage.ts (vectorizeStore :51, vectorizeRepoFile :222, vectorSearch :115).

Fix sketch: when the platform AI binding is intentionally off, either surface a clear "indexing disabled" state to the console/prompt instead of green "Ready", or make the ingest/search paths return an explicit disabled signal rather than empty-success.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions