]> Piment Noir Git Repositories - freqai-strategies.git/commit
fix(reforcexy): make the review findings bite, and drop what nothing calls
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 2 Oct 2026 14:52:58 +0000 (16:52 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 2 Oct 2026 14:52:58 +0000 (16:52 +0200)
commit684c945aaa57df1a033c6fc66d5b118d2df601a5
tree5cafb5c4c8c51115e0dec6a5e4dc88711c174bfc
parent8896147fd6c876b95a0b3e0f470f1cbed8fe8f61
fix(reforcexy): make the review findings bite, and drop what nothing calls

An adversarial review of #282 found four defects that survived mutation
testing: code deleted, the suite stayed green. All four are now caught.

The strategy's four `do_predict == 1` conditions were independent, and only
the `enter_long` one was asserted — deleting the other three changed nothing
observable. The same held for `is_open=True` on the rejected-prediction
close: without it the proxy returns CLOSED trades too, so `exit_long` would
fire on an already-closed position. It is now observed through freqtrade's own
backtest collections rather than asserted as a call argument, which the repo
forbids. Four mutations, four reds.

The orderings guard tested a private copy of the shuffle comparator, so making
the installed one seed-insensitive left it green — the property the
three-seed job buys was unverifiable. It now drives `unittest.TestLoader` on a
probe class through the comparator the loader really holds, and asserts that
changing the seed changes the order and that repeating it does not.

The inheritance guard exempted whole modules, so a TestCase dropped into
test_coverage_floor.py ran with no restore and no red. It now exempts the one
class that observes the restore instead of testing it.

`source_pkgs`, `source_dirs` and `plugins` are legal `[run]` options the gate
neither banned nor reconciled: adding a second measurement root left it green.

Two eval-frequency tests survived deletion of the code they named. The clamp
test now exceeds the cap on the value-based branch, and the hyperopt test
pins two explicit outcomes rather than restating the formula. The remaining
non-positive-budget test says what it actually checks instead of claiming a
guard it cannot detect.

Also: removed `ohlcv_frame` and `rl_env` (no caller), the dead `hpo=` knob,
the `__FLOOR__` guard that guards a string no template produces, the repr and
exception-wording pins, a `len`-only date assertion, a forwarding `assertIs`,
and a `continue` that silently skipped a subTest iteration. The CI step and the
README now state what each floor guard really refuses — they are not
interchangeable, and this one is the stricter.

124 tests green under four orderings; gate exits 0 at 59.1%; ruff clean;
basedpyright snapshot unchanged.
.github/workflows/quality.yml
README.md
ReforceXY/tests/qa_support.py
ReforceXY/tests/test_coverage_floor.py
ReforceXY/tests/test_model_review_contracts.py
ReforceXY/tests/test_model_schedules_params_and_net.py
ReforceXY/tests/test_strategy_semantics.py
ReforceXY/tests/test_suite_contract.py