Repository navigation
B2.4: Validate analytics with deterministic C13 fixtures - #1051
thomas-pham101 wants to merge 9 commits into
Conversation
…tics-Fixture-Validation
…tics-Fixture-Validation
|
The deterministic analytics tests cover the intended totals and filter combinations, but this PR currently targets the fixture-generator branch rather than main. Please wait for #1047 to be completed and merged, then retarget this PR to main. Confirm that the remaining diff contains only the intended analytics validation and rerun the combined fixture and analytics suite, including collection isolation. Approval remains pending completion of that dependency and verification. |
|
Hi Maneesh, C13 #1047 has now been merged into main and I’ve completed the final B2.4 reconciliation and validation. The remaining diff is limited to the intended B2.4 analytics fixture validation and documentation. Verification completed: +) B2.4 analytics fixture suite: 11 passed The analytics integration tests were run against the local MongoDB instance using --noconftest, because the shared test configuration patches PyMongo with mongomock, which does not support the $type aggregation expression used by the current analytics pipeline. Could you please re-review the latest changes when you have a chance? Thank you. |
Maneesh-Kumar-Maddini
left a comment
There was a problem hiding this comment.
Thanks, Thomas. I confirmed that #1047 is merged, this PR now targets main, and the remaining diff is limited to the intended analytics tests and documentation.
Two test-isolation issues remain:
-
The fixture patches MongoDB collections but leaves the normal Redis cache active. I reproduced an existing cached total of 99 overriding the expected fixture total of 12. Please isolate or bypass the cache so these tests reliably exercise their own fixture data and cannot read or overwrite normal application cache entries.
-
Under the standard backend mongomock configuration, the new suite produces 3 passed and 8 failed because $type is unsupported. The documented --noconftest command explains your real-MongoDB run, but the integration tests still enter the normal mocked backend suite and fail. Please separate or explicitly gate the real-MongoDB tests while retaining a supported integration-test command.
Please rerun the isolated analytics suite and combined C13 regression after these corrections. Approval remains pending.
|
Hi Maneesh, I’ve addressed both remaining B2.4 test-isolation issues. The analytics integration fixture now bypasses the normal Redis insights cache by patching insights.get_json to return None and insights.set_json to a no-op, so cached application values can no longer override the deterministic fixture results. I also explicitly gated the real-MongoDB analytics tests when the normal Backend mongomock configuration is active. The full integration suite remains available through the documented --noconftest real-MongoDB command. Validation after the corrections: +) Normal mocked B2.4 collection: 3 passed, 8 skipped Could you please re-review the latest changes when you have a chance? Thank you. |
Summary
Implements Sprint 2 B2.4 by reusing the C13 deterministic fixture generator
to verify known analytics totals and the latest B2 filter behaviour.
Changes
insights.pycollection architectureDeterministic Dataset
12 detections:
Sensors:
Expected baseline analytics:
Filter Validation
Known deterministic expectations include:
species=Sus Scrofa→ 4 detectionssensorId=2→ 6 detections2026-09-03to2026-09-06→ 4 detectionsspecies=Dingo+sensorId=3→ 2 detectionsDatabase Isolation
Tests use dedicated collections inside EchoNet:
_b2_4_test_events_b2_4_test_microphones_b2_4_test_nodesNormal Project Echo collections are not modified.
Validation
Combined C13 + B2.4 regression suite:
26 passedThis includes:
Dependency
This PR depends on C13:
EB/TP/C13-Seed-Fixture-GeneratorOnce C13 is merged into
main, this PR can be retargeted tomain.