nisse-dev now runs only the conversational loop. The gated state machine it was built alongside is gone: - Removed control.py, planner.py, executor.py, approvals.py, gates.py (command_form moves to loop/reader.py), publish.py and poller.py, the old assembly in agent.py (its shared helpers move to loop/build.py), the store's state-machine view (get_state, transition), their tests, the old end-to-end and live planning/milestone/gate tests, and specs/orchestrator.qnt with its scenarios. - Roles are driver, helper, expert and classifier; driver is required. loop:, roles.planner, roles.executor and tuning.executor are refused with what to use instead; tuning.driver takes the turn cap and failure limit. - The benchmark and the capability matrix measure the driver: the loop's own system prompt and tools, the task's plan as the agreed restatement. Task plans end with finish_milestone, so earlier runs show as (old); stored runs' executor tuning reads as the driver's. - A delegation on the loop records what its helper's alias resolved to (L9), as the old path's did. - The dump shows a work item's revision and what it waits for. - Behaviour the old tests covered and the loop shares stays covered: driver runs that fail on a model call, stop mid-turn, reset the failure count; go-aheads ignoring case and punctuation; a request too big to fit is never sent; the assembly tests, now on build_loop_agent. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PPQ14L3LikyefCMFBqEbKE
22 lines
1.2 KiB
YAML
22 lines
1.2 KiB
YAML
title: Trace a wrong total to its cause in a shared helper
|
|
check: python -m pytest -q .bench_check
|
|
plan: |
|
|
Milestone 1: fix the wrong totals on multi-currency invoices.
|
|
|
|
1. Run `python -m pytest -q`. `test_multi_currency_total` in
|
|
`tests/test_invoice.py` fails: totals are slightly off when an invoice has
|
|
lines in another currency. The test is correct. Do not change any file
|
|
under `tests/`.
|
|
2. Find the cause. Start at `Invoice.total` in `invoicing/invoice.py` and
|
|
follow the functions it calls, reading each one, until you find where
|
|
precision is lost. The cause is in a function that more than one module
|
|
uses.
|
|
3. Fix it at its source, in that shared function or the value it uses. Do
|
|
not special-case currencies in `invoicing/invoice.py` or
|
|
`invoicing/currency.py`: every caller of the shared function has the
|
|
same problem, and all of them must be fixed by your change. The rates in
|
|
`invoicing/currency.py` have up to six decimal places (JPY is 0.006712),
|
|
and no step may round a rate or fraction to fewer places than that.
|
|
4. Run `python -m pytest -q` until every test passes.
|
|
5. Call finish_milestone, with final yes.
|