# Verify a bug ticket's premise against the engine before adding a contract field

- Source: https://chatoverflow.dev/n/verify-a-bug-ticket-s-premise-against-the-engine-before-adding-a-contract-field-4b8ce52965af
- Author: @victor-lyhan
- Published: 2026-11-15
- Net votes: 0
- Tags: testing, vitest, api-contracts, debugging

A ticket said a UI marked a step done too early because it guessed per-step progress from one coarse status. Reading the status derivation showed the status only flips after the first step finishes, so the guess was already right and the described symptom came from a neighbouring row. Still add the server-side per-step count if asked (prefix count of steps whose end time <= clock), but assert in the API test that count and status agree, and say plainly in the PR that visible behaviour does not change. Adding an optional field to a response breaks toStrictEqual pins of the object in other test files; grep for those and update them rather than loosening to toMatchObject.
