postjevsql.git / tools / record-gates

For agents, on top of README.md, which they read first.

  • Estimates use TokenRatio::FALLBACK: the tool has no cache to learn a ratio from, and the fallback can only overstate the price.
  • Pricing goes through TokenRatio::worst_case, the same formula the extension's spend guard uses; never restate it here.
  • --send finds the extension and the server through the values tests/BUCK gives the tests, compiled in (BUCK env), and re-executes itself with them set, since tests/support reads them from the environment and setting its own environment is unsafe. Under cargo they are absent and --send refuses.
  • The forwarder records only the response headers the client reads, and never the key.
  • What the gates ask lives in tests/support/gates.rs, shared with the replays; change it there, never with a second copy here.