Skip to main content

Review trace practice

Answer before running the lab or reading the calibration below.

  1. Rows contain (a,7,Ada), (b,7,Bo), (b,8,Bea). What should (b,7) return if rows are reversed?
  2. A correct filter feeds an id-only cache. Predict (a,7) followed by (b,7).
  3. Predict (a,8) followed by (b,8) with an id-only cache that stores None.
  4. Why can mutating a returned record break the next lookup even after the filter and key are repaired?
  5. A colleague demands a Factory class before approving. What evidence would justify that request? How would you respond without treating it as automatically right or wrong?
  6. Why is “revert the patch” an inadequate recovery plan here?
  7. Does a correct tenant filter prove the caller may use that tenant?

Calibration after an attempt​

  1. Bo; input ordering must not affect a unique tenant/id match.
  2. Ada then incorrectly Ada; cache scope must preserve lookup scope.
  3. None then incorrectly None; a miss can be cached under the wrong scope too.
  4. Returning internal dictionaries leaks mutable ownership. Fresh copies suffice only under this lab's flat string-valued schema.
  5. Ask what construction variation or boundary the factory addresses and compare a plain function. Record the reason for accepting or declining it.
  6. It can restore the defect; a safe uncached tenant-filtered path preserves the repaired contract. Previously disclosed data cannot be recovered by source reversal.
  7. No. That requires a separate trust and authorization contract.

Retake with different ids and request order after a delay. Recognition of these answers is not transfer evidence.