test(strix): A3 fear-modulation monotonicity + FFI NaN/Inf rejection (tests-only)#20
Merged
Conversation
… tests (A3) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds regression tests to lock in existing fear-modulation monotonicity/sanitization behavior in strix-swarm, and to assert non-finite (NaN/Inf) position rejection at the Python FFI boundary—without changing any runtime code paths.
Changes:
- Add a new Rust integration test suite covering monotonicity, clamping, and NaN/Inf sanitization for
modulate_detection_configandmodulate_gossip_fanout. - Add Python tests asserting
ValueErrorfor NaN/Inf positions forDroneStateandParticleNavFilterconstructors.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| python/tests/test_ffi.py | Adds pytest coverage to ensure NaN/Inf positions are rejected at the PyO3 boundary via existing finite validation. |
| crates/strix-swarm/tests/fear_modulation.rs | New integration tests asserting fear-modulation monotonicity, clamping, and NaN/Inf sanitization using the public strix_swarm::fear_adapter API. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
A3 bug-hunt slice — TESTS-ONLY, asserts EXISTING behavior, zero source/behavior/claim change.
crates/strix-swarm/tests/fear_modulation.rs(NEW): integration test on the public, non-phi-simmodulate_detection_config/modulate_gossip_fanout— evade_distance strictly ↑ with fear, closing_rate_threshold strictly ↓, gossip_fanout non-decreasing & ≤ 3×base, F>1 clamps to 1, NaN/+Inf sanitize to 0.python/tests/test_ffi.py: NaN/Inf position rejection (ValueError) forDroneState+ParticleNavFiltervia the existingvalidate_finiteFFI boundary; mirrors the existing skip-if-not-built guard.Gates:
cargo test --workspacegreen;cargo clippy -p strix-swarm --all-targets -- -D warningsclean;pytest python/tests/test_ffi.py23 passed. Nosrc/changes, no public docs, nothing underProject_Docs/bug_hunt/.🤖 Generated with Claude Code