# harness/csv-archive — raw Clockify CSVs for parser cross-validation

The M4 standing check (09-build-plan M4 + Day-0 #4): every real weekly
Clockify CSV that goes through the OLD app also lands here, and both
parsers must agree on it field-for-field until cutover.

## Convention

- **One file per real upload**, named `YYYY-MM-DD_<original-name>.csv`
  (date = upload date). Never edit an archived file.
- Source of files: the old app's CSV archiving (Day-0 item #4 — the
  old-app change that saves every uploaded CSV server-side). Until that
  lands, copy the weekly CSV here by hand when doing the shadow upload.
- These files contain real client/worker names — they stay in this
  private repo directory and are never committed anywhere public.

## The check

From `/srv/apps/with` (host side — needs the old app's node_modules
for the TS oracle):

```bash
.venv/bin/python -m scripts.cross_validate_csv harness/csv-archive/*.csv
```

`✓` per file = the Python port and `/srv/apps/work/lib/clockify.ts`
produced identical parses (entries, errors, totals, date range).
Any `✗` is a port-fidelity bug: fix `app/services/imports/clockify.py`
(or record a deliberate delta in docs/decisions.md) before the next
weekly shadow upload.

If node/tsx isn't available where you run it, see the --ts-json manual
path in `scripts/cross_validate_csv.py`.
