Skip to content

fix(assets): hold each task's money under balance - #91

Merged
3mei merged 2 commits into
mainfrom
yev/fix/finance-task-balance-key
Oct 26, 2026
Merged

3mei merged 2 commits into
mainfrom
yev/fix/finance-task-balance-key

Conversation

@3mei

@3mei 3mei commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

What changed and why

The account view that the read tools return, and the account details the simulated customer is given, both take a task's money from account_state.balance. Nineteen templates held it under another key, so the customer was told the account held 0.00 while the opening asks to move money out of it:

  • en_US: solstice_invest (4 templates, cash_balance), northwind_bank (1, checking_balance) and evergreen_retirement (2, vested_balance).
  • fr_FR: valbreuil_bourse (6, cash_balance) and credit_mirabelle (1, checking_balance).
  • de_DE: kranich_invest (5, cash_balance).

Two commits:

  • Assets: those keys are now balance. Three cash-out templates (TPL-KR-CASHOUT-CLOSE-001, TPL-VB-CANCEL-WITHDRAW-CLOSE-001 and TPL-VB-CASH-OUT-001) wrote the amount in local notation (3.000, 3 000) so their openings could name it, and as a balance 3.000 reads as 3 and 3 000 is not a number. Their nine openings now ask for all the cash, and the amount is a plain number such as 12000.00, which the customer is told as 12.000,00 € or 12 000,00 €. SCHEMA.md's account_state entry and the probe README's task-authoring guide say where an account's money goes.
  • Test: every committed bank's templates hold the account's money under balance, and a balance that reads as a number has at most two decimals. Amounts beside it, such as a second account's balance, a limit or a contribution, stay allowed.

How it was verified

Each commit passes on its own:

  • uv lock --check, make check-all, make check-license-headers, make check-doc-links, make check-notebooks-clean, make smoke and make test exit 0 at both commits. make test reports 4391 and 4392 passed.
  • make check-dist and make check-extensions exit 0 at both commits.
  • usersim validate-assets --domain financial_services reports the same results as on main for every bank.
  • The new test fails on main, naming the nineteen templates. With the keys renamed but the localized amounts kept, it fails on de_DE's '3.000' and '12.000'.
  • For every changed template and slot value, the balance the customer is told went from 0,00 € or $0.00 to the seeded amount in the locale's notation, such as 12.000,00 €, $80,000.00 and 30 000,00 €.
  • make health-check passed against a custom provider config, with HEALTH_PROBE=financial_services HEALTH_LOCALE=fr_FR. In live runs on the same config, one row per locale on a changed template (TPL-SI-CANCEL-WITHDRAW-CLOSE-001, TPL-VB-CASH-OUT-001 and TPL-KR-CASHOUT-CLOSE-001), get_accounts returned the seeded balance and the assistant read it back as $3,000.00, 4 000,00 € and 12.000,00 €. The en_US and de_DE customers quoted the same amount in later turns.

Results impact

Rows on these nineteen templates now see the seeded balance instead of 0.00, so their scores can move. On the three reworded templates, the opening asks for all the cash instead of naming an amount. Gold tool sequences, expected state changes and every other template are unchanged.

3mei added 2 commits October 25, 2026 12:45
The account view and the simulated customer read a task's money from
account_state.balance. Nineteen en_US, fr_FR and de_DE templates kept it
under cash_balance, checking_balance or vested_balance, so the customer
was told a balance of 0.00 while asking to move that money. Those keys
are now balance.

Three de_DE and fr_FR cash-out templates wrote the amount in local
notation (3.000, 3 000) so their openings could name it, and as a
balance 3.000 reads as 3 and 3 000 is not a number. Their nine openings
now ask for all the cash, and the amount is a plain number such as
12000.00. SCHEMA.md and the probe README say where an account's money
goes.

Signed-off-by: Yev Meyer <[email protected]>
The account view and the simulated customer read only
account_state.balance, so a template that sets another *_balance key
without a balance fails, and so does a balance that reads as a number
with more than two decimals, such as a localized 3.000 that reads as 3.
Amounts beside a balance, such as a second account's balance, a limit or
a contribution, stay allowed.

Signed-off-by: Yev Meyer <[email protected]>
@3mei
3mei requested a review from a team as a code owner October 25, 2026 16:46
@3mei
3mei merged commit 37a4631 into main Oct 26, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant