Course / Lectures / Lecture 20 / Lab Lab 20

The claim, the rule, the trace.

Eight expense claims, six rules, two exceptions, one human override. Check a claim and watch the engine name the rule that fired — or flag the case it cannot decide.

8 claims 6 rules + default 2 exceptions No install · runs in the browser

The compliance checker lab

Case queue

8 claims · illustrative policy · deterministic

EXP-1042

Client dinner · Cafe Lumen
Ready. 8 claims. Press Check case to evaluate the selected claim.

Rule trace

Select a case and press Check case. The trace will list each rule with pass, fail, review, or not applicable.

Policy switches

Exception policy

Decision

Not checked
Press “Check case” to evaluate the selected claim.

The trace will show every rule, the decisive rule, and any exception.

Manual override

Human decision

Check a claim first. A human override is allowed after a rejection or a review, and it is logged with a reason.

Audit log

  1. No events yet. Checks, overrides, and resets appear here in order.

Precedence

  1. R3 prohibited category
  2. R5 duplicate claim
  3. R6 currency conversion
  4. R1 receipt threshold
  5. R4 travel pre-approval
  6. R2 meal cap
  7. R0 default accept

The first failing rule in this order is decisive, and a hard failure outranks a review. The order is a policy choice, not a logical consequence. E1 and E2 can waive exactly one failed rule each; they never create a new fact.

WHAT TO NOTICE

A verdict is a small proof — or a flag.

MOVE 01 · PRECEDENCE

The rule that fired

EXP-1042 fails the meal cap at $62.00 per attendee against a $60.00 cap. With E1 on, the decision is accept with exception; with E1 off, it is reject R2. The trace shows both the failure and the exception, so a reader can see that the claim was not simply “fine.”

MOVE 02 · AMBIGUITY

Review is a verdict, not a failure

EXP-1045 is a EUR 540.00 flight with no FX rate. The engine cannot compute the USD value, so it returns review rather than guessing. Strict mode converts that review into a rejection. The difference is a policy about missing data, not a difference in arithmetic.

MOVE 03 · OVERRIDE

The human act is logged

EXP-1046 is rejected by R4 for travel without pre-approval. Choose a reason and override it: the decision becomes accept · override, the audit log records the original rule and the reason, and the rule trace is unchanged. An override does not rewrite the policy; it records a person taking responsibility for an exception.

What the lab is not

The six rules, the two exceptions, the $60 / $75 / $100 thresholds, and the eight claims are fixtures invented to make the mechanism visible. They are not a real expense policy, not legal or accounting advice, and not a model of any organization's controls. The lab has no learned extraction, no OCR, no currency service, no fairness metric, and no real audit trail storage. It isolates one mechanism: a decision that names the rule that produced it, keeps its exceptions visible, and records the human who overrode it.

Read the finance section · Read the common pattern · Slides