gui+cli+core: anticipated-delivery warning, task #67 amount checks, CLI tools

GUI - "Building your will" row (owner request):
- when a rebuild anticipates the delivery date by one day, show
  "Anticipated - new delivery date: <date>" on the "Building your will" row
  instead of a plain "Ok";
- the detection compares the will's minimum locktime BEFORE and AFTER the
  rebuild, so it also covers relative recipes ("1y"/"30d") that the previous
  stored-vs-built comparison missed;
- the sign explanation stays on its own "Signing your will" row so it no
  longer overwrites the anticipation warning.

Task #67 - "Checking variables" stuck on "Wait":
- core: Will.check_amounts only requires a fixed amount to be funded when it
  is > 0, and only requires percentages to total 100% when the will actually
  has percentage heirs; fixed-only / empty-wallet wills no longer raise;
- gui: the amount warning is written on the "Checking variables" row itself
  (COLOR_WARNING) instead of being overwritten by the next row; the redundant
  "adjustment of the amounts" sentence was dropped.

CLI - will-executor helpers:
- willexecutors_update accepts promo_code;
- willexecutors_select supports bulk apply with only_valid;
- willexecutors_export supports selected/valid subsets;
- import overwrites existing records with sane defaults;
- raise NoServersForChainError with a clear user-facing message; map
  NotCompleteWill / HeirChange / WillexecutorChange in _user_facing.

Tests and docs:
- tests for the anticipation row, the CLI helpers and the amount checks;
- i18n catalogs refreshed; CHANGELOG section 67; agent task memory updated.
This commit is contained in:
2026-10-15 21:55:03 -04:00
parent c9f3f77a15
commit f3deccb626
14 changed files with 1396 additions and 1010 deletions

View File

@@ -3759,3 +3759,64 @@ into children that are still present in the will.
clean on the touched files.
**Outcome:** DONE.
---
## 67. "Checking variables" stuck on "Wait" + redundant amount-adjustment wording
**Date:** 2026-10-14
**Symptom (owner report):** in the "Building Will" dialog the "Checking
variables" row always stayed on "Wait" and never became "Ok", even though the
will itself was fine ("Checking your will" showed "Ok"). It should show its
result before the "Checking your will" row is written.
**Root cause (two bugs):**
1. UI - when `Will.check_amounts` raised `AmountException` /
`WillExecutorFeeTooHighException`, `BalBuildWillDialog.task_phase1` wrote the
warning to the **"Checking your will"** row (`msg_set_checking(...)`) and the
very next `self.msg_set_checking()` call immediately overwrote it. So on an
amount warning the warning was lost AND the "Checking variables" row kept its
initial "Wait" forever (the success path set "Ok" only when the amount check
passed).
2. Core - `Will.check_amounts` had two false positives that made perfectly valid
wills raise:
- `fixed_amount >= wallet_balance` also fired when `fixed_amount == 0`
(all-percentage or empty/fully-committed wallet: `0 >= 0`);
- `perc_amount != 100` also fired when the will has NO percentage heirs at
all (a fixed-only will reports `perc_amount == 0`).
**What changed:**
- `bal/gui/qt/dialogs.py` (`task_phase1`, AmountException branch): the warning is
now written on the **"Checking variables"** row itself with `COLOR_WARNING`, so
the row always reaches a real outcome and the warning is never lost. The
wording was also reduced to the first sentence only - "In the inheritance
process, the entire wallet will always be fully emptied." - dropping
"Your settings require an adjustment of the amounts" (owner request).
- `bal/gui/qt/window.py` (`build_inheritance_transaction`, AmountException
branch): same message reduction; the appended exception detail (`.format(e)`)
was removed with the sentence it belonged to.
- `bal/core/will.py` (`check_amounts`): the fixed-amount checks now only apply
when `fixed_amount > 0`, and the 100% check only when the will actually has
percentage heirs (`perc_heirs`). Valid fixed-only / empty-wallet wills no
longer raise.
- i18n catalogs refreshed (`pybabel extract` + `update`); the new unified msgid
"In the inheritance process, the entire wallet will always be fully emptied."
is translated in `it_IT` and `es_ES`; the old
"...adjustment of the amounts.{}" entry is now obsolete.
**Verification:**
- `Will.check_amounts` matrix (fixed-only/percentage/empty wallet) behaves as
expected; core/offline suites plus `test_gui_prepare_will_history.py`,
`test_sync_locktime_built_txs.py`, `test_rebuild_on_close_setting.py`,
`test_translations.py` and the smoke test pass.
- Offscreen repro of `task_phase1`: "Checking variables" shows green "Ok" on
success and the (shortened) warning on the row on `AmountException` - never
"Wait".
- `py_compile` clean; `ruff check` adds no new violations (only the pre-existing
`I001` in `dialogs.py`).
**Outcome:** DONE (pending the owner's test of the ZIP).