Files
manual_slop/conductor/tracks/mock_provider_hardening_20260305/spec.md
Ed_ c295db1630 docs: Reorder track queue and initialize final stabilization tracks
- Initialize asyncio_decoupling_refactor_20260306 track

- Initialize mock_provider_hardening_20260305 track

- Initialize simulation_fidelity_enhancement_20260305 track

- Update TASKS.md and tracks.md to reflect new strict execution queue

- Archive completed tracks and remove deprecated test performance track
2026-03-05 09:43:42 -05:00

1.2 KiB

Specification: Mock Provider Hardening

Background

The current mock_gemini_cli.py provider only tests the "happy path". It always returns successfully parsed JSON-L responses, which masks potential error-handling bugs in ai_client.py and AppController. To properly verify the system's robustness, the mock must be capable of failing realistically.

Objective

Extend mock_gemini_cli.py to support negative testing paths, controlled via an environment variable MOCK_MODE.

Requirements

  1. MOCK_MODE parsing: The mock script must read os.environ.get("MOCK_MODE", "success").
  2. malformed_json: If mode is malformed_json, the mock should print a truncated or syntactically invalid JSON string to stdout and exit.
  3. error_result: If mode is error_result, the mock should print a valid JSON string but with "status": "error" and an error message payload.
  4. timeout: If mode is timeout, the mock should time.sleep(120) to force the parent process to handle a subprocess timeout.
  5. Integration Tests: New tests must be written to explicitly trigger these modes using ApiHookClient and verify that the GUI displays an error state rather than crashing.