Each article takes one mechanism and follows the same order: the problem it solves, the design, the code that carries it, the ways it can fail with the test that covers each, and the limits I know about.

The first three belong together. A run is saved as a state machine, a lease decides who may change it, and a small set of keys decides what may happen only once. The next two cover money and access. The last two cover the measurement itself: how a provider failure is kept out of the numbers, and how the numbers become a claim a customer can act on.

  1. 1 A run is a persisted state machine One request becomes hundreds of paid calls. The run is saved before it is accepted, moves through six states by conditional updates, and can end as partial instead of lost. 6 min read·backs CV: Execution state
  2. 2 Leases, heartbeats and the reaper A worker stamps its owner id on a lease and renews it every 30 seconds. If the process dies, the lease expires and a reaper closes and refunds the run once, without touching a live one. 6 min read·backs CV: Execution state
  3. 3 Exactly once: scheduled runs, settlement and reused results Five places where doing something twice costs money, and the key that makes each happen once: a schedule claim, a request key, a settlement claim, a refund key and a daily gate. 7 min read·backs CV: Exactly once
  4. 4 Credits and payments A stored balance protected by conditional updates, an append-only ledger, refunds that apply at most once, and payment order ids the client cannot forge into a skipped renewal. 7 min read·backs CV: Permissions and billing
  5. 5 An MCP server that exposes the same use cases to customer agents Customer agents reach TRAIL Search through MCP with scoped, expiring API keys. Tools call the web app's own routes in-process, and a read-only key is refused before any route is reached. 6 min read·backs CV: Permissions and billing
  6. 6 Provider adapters: a failed measurement is not a zero Every answer engine sits behind one adapter interface. Retries, a fallback path and four observation axes keep a provider failure from being reported as a brand that was not mentioned. 6 min read·backs CV: Caught from execution records
  7. 7 Scoring and significance: one vote per unit How cells become a visibility rate, why repeats of one prompt cast a single vote before a Wilson interval is computed, and how versioned keys keep a model change from reading as a visibility change. 7 min read·backs CV: Caught from execution records

All function names, field names, constants and test names in these articles are the ones in the code. Code excerpts are shortened and their comments translated from Korean.