Notes / 02 · Diagnosis

Change a response the code never reads.

A shipping estimate is stuck at seven days. Substituting the carrier response changes nothing, and the reason it changes nothing is the finding.

ExperimentalFigure: Interactive fixture, two runs

Two explanations for one number

A shipping estimate shows seven days and shouldn’t. Two explanations fit. The carrier’s quote is stale, or the service is answering from its cache and never asking the carrier at all. Reading the code tells you both paths exist. It doesn’t tell you which one this request took.

The experiment is small: run the request twice from the same starting state, and in the second run replace the carrier’s response with a value you choose. Play the figure, pick a response when it asks, and watch which steps are reached.

Interactive fixture

A · Baseline

requestcache.lookuprespondcarrier.quotelive · not called
  1. 01estimate(94107)fixed request
  2. 02cache.lookuphit, age 6 min, ttl 10 min
  3. 03carrier.quotenot called
  4. 04respond7 days

B · carrier.quote = 2 days

requestcache.lookuprespondcarrier.quotebound to 2 days · not called
  1. 01estimate(94107)fixed request
  2. 02cache.lookuphit, age 6 min, ttl 10 min
  3. 03carrier.quotenot called
  4. 04respond7 days
Bound responseThe carrier would say 2 days if asked.

The substituted carrier response was never read. A stale carrier quote did not cause the 7-day estimate. The cache is the next experiment.

Compare the baseline with a substituted carrier response.

The estimate not moving is not the evidence

Whatever response you substitute, the estimate stays at seven days. On its own that could mean several things, including that the service read the new quote and ignored it.

The evidence is in the trace of the second run: the carrier is never called. The cache entry is still fresh, so it answers first and the substituted response is never read. A stale carrier quote can’t explain an estimate the carrier took no part in.

What it leaves open

  • Whether the cached value is itself wrong. The run shows the cache answered, and nothing about how the entry got there.
  • What happens after a cache miss. A third run from an empty cache would exercise the carrier path, and the same substitution would then be read.

Each open item is the next experiment. This is experiment selection at its smallest: two explanations, one run, one left.