record convert: Cannot tell which project my spec belongs to, and I only have one project
Example threads. These questions and answers were written by the SDODS team to document real problems and how to fix them. The people named are illustrative, not real users. Questions asked on this site are marked new.
Copied a recording out to a scratch directory to try the conversion without touching the repo:
bash
sdods record convert ~/scratch/checkout.spec.ts
text
✖ CONFIG_INVALID: Cannot tell which project ~/scratch/checkout.spec.ts belongs to.
hint: Pass -p <slug>, or keep recordings under projects/<slug>/recorded/.
There is one project in the whole workspace. Why does it not just pick it?
Because convert does not go through the project picker at all — it reads the slug out of the path. The rule is exactly "is there a projects/<slug>/ segment in what you passed", and a scratch directory has none. Having one project in the registry is the shortcut that makes -p optional for sdods record and sdods run; it does not apply here.
Either of these works:
bash
sdods record convert ~/scratch/checkout.spec.ts -p demo-shop
sdods record convert projects/demo-shop/recorded/checkout.spec.ts
The second is what you want regardless. Conversion produces a proposal, not a write, so pointing it at the real path is not the destructive thing the copy was protecting you from.
Its neighbour is Spec not found: <spec> when the path does not exist. Both exit 2, so a script cannot tell them apart by exit code — only by the message.