Skip to content

expense-approval: two signatures, one person - #5

Closed
sajonaro wants to merge 1 commit into
entitlement-problemsfrom
expense-approval
Closed

sajonaro wants to merge 1 commit into
entitlement-problemsfrom
expense-approval

Conversation

@sajonaro

@sajonaro sajonaro commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Stacked on #4 (base entitlement-problems). Retarget to main once #4 merges.

Adds expense-approval/: one large expense moving through submit, manager approval, finance approval and payment, with reject/resubmit, cancel, and a bank-account change that throws away both signatures. Amounts are bands (small/large), because the rules only ask which side of the threshold an amount is on.

  • The safe process pays a large expense on two different signatories. Everything holds, exit 0.
  • The shortcut pays when both slots are filled. Bob is Ann's manager and finance's deputy, so submit → bob-approves-as-manager → bob-approves-for-finance → pay gets the expense paid on one person's say-so. derive paid-by lists 13 bob bob.
  • compare: never-on-one-person LOST, while the law it breaks (two-for-large) reads preserved, because laws compare by declaration. The README says so.
  • A process question the model raised: in the safe process, an expense Bob has signed twice can only be undone by rejecting it, cancelling it, or changing its bank account.

Differences from the plan: with reject, cancel and bank change in the model, the plan's paradox ("the shortcut is the one that terminates") does not occur. Both processes settle. In .rules, independence is a join, because a rules guard cannot compare a path with a path (the claims language can). That is a small asymmetry between the two engines.

Cross-check: 41 → 45 properties (43 compared; settles is the second fair property skipped). ./run-tests.sh all: 270 checks, 0 failed.

🤖 Generated with Claude Code

A large expense needs the manager's and finance's approval. The shortcut pays
when both slots are filled; Bob is manager and finance's deputy, so four
allowed steps pay on one person's say-so. Amounts are bands, not numbers.

compare reports never-on-one-person LOST while the law it breaks reads
preserved (laws compare by declaration); the README says so. In the rules,
independence is a join: a rules guard cannot compare a path with a path,
though the claims language can. Also documented: in the safe process the only
way to undo a signature is to reject, cancel, or change the bank account.

Cross-check 41 -> 45 properties (43 compared, 2 fair skipped); 270 checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sajonaro

sajonaro commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

Superseded: reached main through #10.

@sajonaro sajonaro closed this Oct 3, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 3, 2026
@sajonaro
sajonaro deleted the expense-approval branch October 3, 2026 17:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant