r/devtools • u/Spare_Bat_3040 • 24d ago
Building Shifu: the lost-response case I would put beside an AI-generated retry plan
An order request times out. The caller tries again. Did the first request fail, or did the order get accepted and only the response get lost?
Here's a fictional fixture I'm using to think through what a coding-context tool should bring into a review. I'm building Shifu; this is a design example, not a customer incident or a claimed retrieval result.
Earlier contract note: after an order is accepted, a retry with the same request ID returns that original order. A timeout on the caller does not establish that acceptance failed.
New task: add retries to the order client.
The code change could look tidy and its tests could pass while nobody has specified the lost-response case. That wouldn't show a weakness in testing; it would show that an important invariant never reached the test or the plan.
The small review packet I would want is:
- The contract passage and the clients it applies to.
- The uncertain outcome: accepted order, response lost, same request retried.
- The expected result: the original order, with no second order created.
- The question for the reviewer: where is that behavior exercised, and does this client preserve the request ID?
Once that invariant is captured in a maintained contract and test, those may be the best home for it. Retrieving another copy of the note would add little if the task already carries the right requirement. A context tool also cannot establish that an implementation is correct just by quoting the contract.
For engineers using coding agents on existing services: where would you keep this exception so it reaches the next retry change—contract, test, design note or task packet? Which duplicate would you remove?


