From 3f437a8e1bb0d0299fb7a0b71d4ee670c2d450ae Mon Sep 17 00:00:00 2001 From: Yaraslau Tamashevich Date: Sun, 6 Sep 2026 23:10:27 +0200 Subject: [PATCH] DEMO ONLY, DO NOT MERGE: revert one ledger scenario to the integer enum spelling Negative control for #473 / morph#462. Reverts scripts/scenario/scenarios/ledger/categorise-an-account.scenario to its pre-8a67ffe7 form, where every ledger enum is spelled as its underlying integer -- the exact form morph#460 measured as 16-of-16 refused. The whole diff of this pull request is one file under scripts/scenario/, so it also demonstrates the second half of #473: before that change the ladder path filter did not match scripts/scenario/ at all and `ladder-tests` would have been skipped outright. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01C6uB9zxdSG8qp3VNAAyFvF --- .../scenarios/ledger/categorise-an-account.scenario | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/scenario/scenarios/ledger/categorise-an-account.scenario b/scripts/scenario/scenarios/ledger/categorise-an-account.scenario index adc7fd37..54543d02 100644 --- a/scripts/scenario/scenarios/ledger/categorise-an-account.scenario +++ b/scripts/scenario/scenarios/ledger/categorise-an-account.scenario @@ -26,10 +26,10 @@ expect ok capture who=$.principal client books model=LedgerModel session principal=$who token=$token -do OpenAccount ledgerId=1 name="Categorised cash" kind="Asset" currency="EUR" +do OpenAccount ledgerId=1 name="Categorised cash" kind=0 currency=1 expect ok capture cash=$.id -do OpenAccount ledgerId=1 name="Categorised coffee" kind="Expense" currency="EUR" +do OpenAccount ledgerId=1 name="Categorised coffee" kind=1 currency=1 expect ok capture coffee=$.id client budgets model=BudgetModel @@ -51,7 +51,7 @@ expect ok client rules model=RuleModel session principal=$who token=$token -do CreateRule ledgerId=1 trigger="DescriptionContains" matchText="flat white" action="SetCategory" actionValue="Categorised drinks" +do CreateRule ledgerId=1 trigger=0 matchText="flat white" action=0 actionValue="Categorised drinks" expect ok capture rule=$ use books @@ -71,7 +71,7 @@ use budgets do CreateBudget ledgerId=1 name="Categorised budget" categoryId=$drinks expect ok capture budget=$ -do SetBudgetLimit budgetId=$budget month="2026-08" limit={"num":50000,"den":1,"dp":2} currency="EUR" +do SetBudgetLimit budgetId=$budget month="2026-08" limit={"num":50000,"den":1,"dp":2} currency=1 expect ok use books @@ -85,7 +85,7 @@ use budgets # the second SetCategory -- so the entry above is counted once for each side. do GetBudgetReport budgetId=$budget month="2026-08" expect ok field limit.num == 50000 -expect ok field currency == "EUR" +expect ok field currency == 1 # ── The refusals ────────────────────────────────────────────────────────── do LinkAccountToCategory accountId=999999 categoryId=$drinks @@ -101,4 +101,4 @@ expect err message == "SetCategory: no such account or category" # Nothing the refusals touched changed: the ledger still reads. do GetLedger ledgerId=1 -expect ok field accounts ~ "\"id\":$coffee,\"name\":\"Categorised coffee\",\"kind\":\"Expense\",\"currency\":\"EUR\",\"balance\":.\"num\":350" +expect ok field accounts ~ "\"id\":$coffee,\"name\":\"Categorised coffee\",\"kind\":1,\"currency\":1,\"balance\":.\"num\":350"