Session 15. Defend the capstone — Fri 02 Oct

Demonstrating, and defending

The difference

A demonstration shows that something can work. A defence shows that you know when it does not, and what happens then. Only the second is evidence, because the first is satisfied by one lucky run.

Your buyer landing an espresso is the demonstration. The card is the defence: the judge changes the ask, the budget or the bytes, and your code has to notice without you.

What a defence sounds like

Weak, and common:

It checks everything before it signs. Let me show you.

Better:

It compares seven fields of the prepared bytes against the pin I wrote before the bytes existed. Here it refused on quantity: I asked for 2, Gecko prepared 1. It does not know whether my pin was right: if I pin the wrong product, it faithfully buys the wrong product. That is rank 1 in my docs/ISSUES.md.

The second answer names the mechanism, points at the refusal file, and states a limit before anybody has to find it.

The seven questions you will be asked

Whatever the demo, the room converges on these. Have the answer ready with a file attached. The same list is in your capstone repository's docs/DEFENCE.md.

The evidence

  1. How do you know it landed? Not "the terminal said so". The receipt: two ledger reads, the deltas, total_purchases going from n to n+1, and the explorer link.
  2. What does your receipt not prove? It proves what moved. It cannot prove that you asked for the right thing. Have the limit ready in docs/ISSUES.md.
  3. Your buyer refused. How does the person at the chat know it was right to? The refusal names one field and both values, and refusals/<stamp>-<field>.json keeps it.

The design

  1. Why does Gecko never hold your key, and what would change if it did? Know where your key lives, and which step in buyer/signer.py uses it.
  2. Which of your seven checks would you drop first, and what risk would you accept? Answer from buyer/check.py, field by field.
  3. What would change your mind about your ADR? The measurement that would reverse it. If nothing would, it was a preference, not a decision.

The limits

  1. What breaks it? You already know one thing. Say it before the card makes it obvious.