]> Piment Noir Git Repositories - freqai-strategies.git/commit
test(reforcexy): add the coverage gate and a shared QA harness
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 2 Oct 2026 07:47:23 +0000 (09:47 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 2 Oct 2026 07:47:23 +0000 (09:47 +0200)
commit5367df0dfe2e1b3755e5da1e2dd80e110facb50d
treef424ab68cff9ade9c9d2a8215feffa4a7b10c22c
parent80fcb5d9c283023eab2dcf561bb8da92e059990a
test(reforcexy): add the coverage gate and a shared QA harness

Brings ReforceXY to gate parity with QuickAdapter: a `.coveragerc`, a
coverage pin in the QA image, and the three modules that make the gate
auditable — a shared harness, a suite contract and a floor guard.

qa_support.py owns the mutable process globals and the fixture builders,
and installs the test-order shuffle. The suite contract pins import
identity: every measured file under exactly one dotted name, every test
module under its bare stem. That second guard is what closes the live
defect this change fixes — `test_training_observations.py` imported
`ReforceXY.tests.test_review_contracts`, registering a second module object
for a file discovery had already registered, so every reset in the harness
would have cleaned a module the code under test never touches. The three
existing modules are renamed to the file-derived `test_model_*` convention
and reparented onto the shared base.

The floor guard replaces QuickAdapter's text scan of coverage's default
exclusions with a differential parse using coverage's own parser, because
the scan over-approximates here (three `...` lines inside a docstring) and
is blind to the branch-level family, which removes 27% of this denominator
with no config key at all.

Measured 57.1% against a floor of 57. The agreed 70% target is not met:
`MINIMUM_FLOOR` is pinned to what was actually reached, not to the target,
because a floor the suite cannot clear is a control the project believes it
has and does not. The gap and the remaining rows are in the pull request.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
.github/workflows/quality.yml
README.md
ReforceXY/.coveragerc [new file with mode: 0644]
ReforceXY/.devcontainer/requirements-dev.txt
ReforceXY/tests/qa_support.py [new file with mode: 0644]
ReforceXY/tests/test_coverage_floor.py [new file with mode: 0644]
ReforceXY/tests/test_model_portfolio_returns.py [moved from ReforceXY/tests/test_portfolio_returns.py with 99% similarity]
ReforceXY/tests/test_model_review_contracts.py [moved from ReforceXY/tests/test_review_contracts.py with 94% similarity]
ReforceXY/tests/test_model_schedules_params_and_net.py [new file with mode: 0644]
ReforceXY/tests/test_model_training_observations.py [moved from ReforceXY/tests/test_training_observations.py with 99% similarity]
ReforceXY/tests/test_suite_contract.py [new file with mode: 0644]