Skip to content

Repair the public CSS arrival interval matcher - #975

Open
wangyinz wants to merge 3 commits into
masterfrom
codex/issue-832-css-arrival-matcher
Open

Repair the public CSS arrival interval matcher#975
wangyinz wants to merge 3 commits into
masterfrom
codex/issue-832-css-arrival-matcher

Conversation

@wangyinz

@wangyinz wangyinz commented Aug 13, 2026

Copy link
Copy Markdown
Member

Fixes #832

Repairs the public CSS arrival interval matcher contracts, including inclusive MongoDB bounds, deterministic nearest-arrival selection, collection configuration, and error logging. Adds focused real-Mongo regression coverage for boundary, multi-match, missing-field, and custom-collection behavior.

Renewed resource-lifecycle review

The first version materialized a PyMongo cursor for multi-match selection but returned or raised without closing it; its list-based test double hid that leak. Commit a38586dd wraps the complete multi-match selection in try/finally, closes the cursor on success and failure, and adds a real cursor-like test double that proves both paths. It does not change the arrival-selection formula or error policy.

Validation: focused contract 14 passed, 1 skipped (the only skip was the absent local MongoDB service); Black 26.5.1, Python 3.12/3.13 py_compile, and git diff --check passed.

This PR intentionally remains draft pending human data/API review.

@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.30769% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.65%. Comparing base (61b06b9) to head (a38586d).

Files with missing lines Patch % Lines
python/mspasspy/db/matcher.py 92.30% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #975      +/-   ##
==========================================
+ Coverage   68.35%   68.65%   +0.30%     
==========================================
  Files         173      173              
  Lines       34397    34402       +5     
  Branches     2474     2474              
==========================================
+ Hits        23511    23620     +109     
+ Misses      10002     9898     -104     
  Partials      884      884              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@wangyinz
wangyinz marked this pull request as draft August 14, 2026 06:03
@wangyinz
wangyinz marked this pull request as ready for review August 14, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Repair the public CSS arrival interval matcher

1 participant