Repository navigation
test: strengthen attack, loader, and journey regression coverage - #24
Merged
Merged
Conversation
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
tests/test_attacks.py: share synthetic setup and verify canonical filenames, mandatory hashes, same-size corruption, candidate qualification, and operating-cohort identity.tests/test_attack_constraints.py: independently assert policy validation, projection bounds, integer rounding budgets, immutable features, and input preservation.tests/test_data_loader.py: test each missing scaler file independently, exact holdout transformations, unchanged artifacts, and malformed CICIDS shapes.tests/test_journey.py: verify first-case selection, repaired errors, absent outcomes, calibrated scores, threshold equality, and inverse preprocessing.The work is split into four logical commits on the existing Sprint 5 branch. The temporary chore branch has been deleted.
Why
Protect high-risk research-integrity and numerical contracts with assertions that detect regressions, rather than adding coverage-only checks. Preserve all existing tests and optional skips.
How tested
make lintand pre-commit hooks passed before each commit.python -m pytest --cov=src --cov=api --cov=dashboard --cov=scripts --cov-report=term-missing). This runs the same suite asmake test/make coverage.The six existing skips are three opt-in real-data checks and three unavailable optional CleverHans cases. No speedup or flaky-test repair is claimed. Security scans, Docker checks, and real-MNIST regeneration were not rerun for this test-only change.
Checklist
.env, or MLflow outputs committed.No new production bug was confirmed. Documentation/contract updates and a new production security assessment are not applicable to this test-only PR.