CSE Roadmap

Common tier · about 6 hours · 14 parts

Part 10 of 14 · 2 min read

Mistakes that break sampling or elicitation

Each mistake with a symptom, a cause and a fix.

  1. Writing a side effect before the question. Symptom: a confirmed action happens twice, or happens even after a decline. Cause: the tool body reruns from the top on every round. Fix: move every write to after the last ctx.need, as in charge_good.
  2. Trusting requestState because the server wrote it. Symptom: a tampered token changes the price or the action. Cause: the state travels through a client that is not trusted. Fix: seal it, bind it to the principal and the request, and expire it.
  3. Treating a sealed token as single-use. Symptom: a voucher is redeemed twice from one valid token. Cause: signing proves integrity, not freshness. Fix: keep a server-side record of spent nonces.
  4. Asking for a secret in a form. Symptom: a password or API key passes through the client, its logs, and possibly the model. Cause: form mode was used where URL mode was required. Fix: route anything sensitive through a page outside the client.
  5. Skipping the identity check on a URL flow. Symptom: one person's account ends up connected to another person's data. Cause: the server only checked "did someone complete this," not "did the person who started it complete it." Fix: compare the web session's signed-in user against the request's user.
  6. Relying on the server's own question as the control. Symptom: a careless or hostile server author simply never asks. Cause: the decision to ask lives in code the server's own author writes. Fix: put the real approval in a host-side gateway that no server can skip.
For the curious Why requestState is untrusted

The client carries the state between rounds, so the person, or anything on the client, can change it. Seal it, bind it to the person and request, expire it, and keep a server-side record for one-time actions. Sampling is described as being retired, so this module treats it as legacy and shows the controls a host should keep if it still supports it.