Repository navigation
fix(assets): hold each task's money under balance - #91
Merged
Merged
Conversation
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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) andevergreen_retirement(2,vested_balance).fr_FR:valbreuil_bourse(6,cash_balance) andcredit_mirabelle(1,checking_balance).de_DE:kranich_invest(5,cash_balance).Two commits:
balance. Three cash-out templates (TPL-KR-CASHOUT-CLOSE-001,TPL-VB-CANCEL-WITHDRAW-CLOSE-001andTPL-VB-CASH-OUT-001) wrote the amount in local notation (3.000,3 000) so their openings could name it, and as a balance3.000reads as 3 and3 000is not a number. Their nine openings now ask for all the cash, and the amount is a plain number such as12000.00, which the customer is told as12.000,00 €or12 000,00 €.SCHEMA.md'saccount_stateentry and the probe README's task-authoring guide say where an account's money goes.balance, and abalancethat 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 smokeandmake testexit 0 at both commits.make testreports 4391 and 4392 passed.make check-distandmake check-extensionsexit 0 at both commits.usersim validate-assets --domain financial_servicesreports the same results as onmainfor every bank.main, naming the nineteen templates. With the keys renamed but the localized amounts kept, it fails onde_DE's'3.000'and'12.000'.0,00 €or$0.00to the seeded amount in the locale's notation, such as12.000,00 €,$80,000.00and30 000,00 €.make health-checkpassed against a custom provider config, withHEALTH_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-001andTPL-KR-CASHOUT-CLOSE-001),get_accountsreturned the seeded balance and the assistant read it back as$3,000.00,4 000,00 €and12.000,00 €. Theen_USandde_DEcustomers 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.