RAG-grounded code generation — retrieves attune context and emits answers with source citations

Failure modes

Symptom Cause Fix Severity
RuntimeWarning: coroutine 'RagCodeGenWorkflow.execute' was never awaited execute called without await It is a coroutine — await it or use asyncio.run high
error is "query argument is required" execute called with an empty/missing query Pass a non-empty query high
RuntimeError: ... needs the attune-rag package ... attune-rag (a core dependency) is not installed pip install attune-rag high
error is "RAG retrieval failed: ..." The pipeline raised (corpus I/O, connection, timeout, bad variant) Check corpus availability / connectivity; retry medium
error is "k argument must be an integer ..." k wasn't an int (e.g. k="bad") Pass an integer k low
error is "unknown model ..." model isn't in MODEL_REGISTRY Use a registered model id, or omit model low
DeprecationWarning about cwd= Passing the deprecated cwd alias Use path= instead low

Risk areas

Diagnosis order

  1. Confirm you are awaiting: await workflow.execute(query="...").
  2. Check result.success; if False, read result.error.
  3. If the error mentions attune-rag, pip install attune-rag.
  4. For a retrieval failure, check corpus availability and connectivity.
  5. Inspect result.metadata["citation"] to see what was retrieved.