Use when code changes have been made to the DCI swarm and need to be verified through the live system โ exercises new features, endpoints, and behaviors via API calls and CLI commands against the...
Verify code changes to the DCI swarm by exercising them through the live system. You test through the API and CLI, never by reading source code or running unit tests. The running swarm is the source of truth.
Core principle: If you didn't exercise it through the live API, you didn't verify it.
When NOT to use:
The backend must be running at localhost:8000. Check with:
curl -s http://localhost:8000/api/v1/corps | head -c 100
If not running: ./dci forward-march or ./dci ten-hut.
List the features/endpoints that were added or modified. For each, determine the API call that exercises it.
For every changed feature, make the actual API call and verify the response:
# Example: testing a new query parameter
curl -s http://localhost:8000/api/v1/corps | jq '.[] | .corps_type'
# Example: testing a rejection case
curl -s -X POST http://localhost:8000/api/v1/seasons/test/corps \
-H "Content-Type: application/json" \
-d '{"corps_id": "system-corps-id"}'
# Expect: 400
Do NOT:
If the change touches a workflow (e.g., competition โ auto-critique), run the full flow:
# Create a test season
curl -X POST http://localhost:8000/api/v1/seasons -d '...'
# Register corps
curl -X POST http://localhost:8000/api/v1/seasons/<id>/corps -d '...'
# Run competition
curl -X POST http://localhost:8000/api/v1/seasons/<id>/competitions/<comp>/run
# Check results
curl http://localhost:8000/api/v1/seasons/<id>/competitions/<comp>/standings
For each feature tested:
If bugs are found:
| Mistake | Fix |
|---|---|
| Only clicking through Playwright UI | Make direct API calls with curl |
| Testing only happy paths | Test error cases, rejections, edge cases |
| Assuming code correctness from reading it | Exercise it live โ runtime bugs are invisible in source |
| Skipping multi-step workflows | If feature spans multiple endpoints, test the full flow |
| Not checking response bodies | Read the actual JSON, don't just check status codes |