Interface CoTMocking


public interface CoTMocking
Facilities for testing CoT workflows without contacting an AI engine. Use CoTProcess.mockMode to set a process-wide default and CoTTask.mockMode to opt individual tasks in or out.

Precedence: a task's setting overrides the process default:

  • task.mockMode:true ? this task mocks, even if the process is not mocking.
  • task.mockMode:false ? this task calls the real AI, even if the process is mocking.
  • task.mockMode:null (or unset) ? inherit CoTProcess.mockMode.
When mocking is in effect for a task, the framework calls CoTTask.mockOutput() (if defined), otherwise CoTProcess.mockOutput(). The returned Object is processed exactly like real AI output (validation, history, state updates, routing).

MockData Capture and Replay

For regression testing, you can capture real AI responses during a live run and replay them later without contacting the AI. Set captureMockData:true to record responses, then use mockMode:true with the captured CoTProcess.mockData array for replay.

Note: Replay is sensitive to environment differences. See CoTProcess.captureMockData for details on avoiding false regressions.