# When this fixture's export destination directory is missing

Use these instructions only with the supplied synthetic exporter and a fresh case from `run.py --prepare-only`. Paths are relative to that case directory. Cases A and B intentionally lack a destination parent; case C has a different input-file error. Never substitute these toy paths for production configuration.

1. Enter case A and reproduce the failure:

   ```sh
   cd /tmp/support-guide-example-manual/A
   python3 export.py
   ```

   Expected: exit 1 and `Export failed: No such file or directory: reports/weekly.csv`.

2. Read the configuration checks:

   ```sh
   python3 diagnose.py
   ```

   For A, expect `Configured input: data/source.csv`, `Output parent: reports`, and `MISSING_OUTPUT_DIRECTORY`. The input exists, and the destination parent is absent. Confirm that `reports/weekly.csv` is the intended destination; that condition is specified in case A's source record.

3. Only for that diagnosis and confirmed destination, create its parent and retry:

   ```sh
   mkdir -p reports
   python3 export.py
   ```

   Expected: exit 0 and `Exported 22 bytes to reports/weekly.csv`. Confirm the actual contents too:

   ```sh
   python3 -c "from pathlib import Path; assert Path('reports/weekly.csv').read_bytes() == Path('data/source.csv').read_bytes(); print('Output matches source')"
   ```

4. Repeat with case B. Its configured destination is `exports/monthly.csv`; create `exports` only after the same checks, then compare that output with `data/source.csv`. The expected message is `Exported 22 bytes to exports/monthly.csv`.

5. Enter clean case C and run `python3 export.py`, then `python3 diagnose.py`. Export fails on `data/sources.csv`. Diagnosis prints `STOP_INPUT` and exits 2: the configured input is absent. **Do not apply the directory fix.** Its destination parent already exists. Record the exact failing path and compare the input configuration with the intended source before proposing a correction.

   In this teaching case only, the setup and source record establish that the real file is `data/source.csv`. Changing that confirmed filename is case C's separate resolution, exercised in `run.py`. The missing-directory guide stops at the diagnosis rather than guessing which source another user meant.

If diagnosis returns `STOP_OTHER`, or a retry has a different error or output, stop this guide. Keep the current configuration and error and ask the export owner to investigate that condition. Do not call it resolved merely because a directory now exists.
