Repository navigation
Expand matcher behavior coverage to 99.56% with combined Mongoid 6/9 CI reporting - #263
Merged
Merged
Conversation
dblock
force-pushed
the
dblock/coverage
branch
from
October 17, 2026 12:11
2e003c2 to
a6d307a
Compare
Danger ReportNo issues found. |
dblock
force-pushed
the
dblock/coverage
branch
2 times, most recently
from
October 17, 2026 12:20
510ac4a to
60abe75
Compare
dblock
force-pushed
the
dblock/coverage
branch
from
October 17, 2026 13:06
60abe75 to
4184388
Compare
dblock
force-pushed
the
dblock/coverage
branch
2 times, most recently
from
October 18, 2026 13:32
77ab569 to
55a69d7
Compare
Exercise storage specs in the default suite, cover matcher failures and historical compatibility contracts, and document isolated MongoDB test databases. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dblock
force-pushed
the
dblock/coverage
branch
from
October 18, 2026 13:53
55a69d7 to
2fcb860
Compare
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.
Summary
_spec.rbsuffix).MONGODB_URIin the unit test harness and document database purging/isolation.No production behavior changes, coverage exclusions,
nocov, or tracked-file reductions.Coverage audit
Fresh upstream
masterbaseline atfc3e355c2ec1f06e82d796c8308970563b8f3a98:All 29 library files remain tracked. The 19-line denominator difference comes from executing/parsing the previously unloaded legacy index implementation and preloaded version entry point rather than SimpleCov's unloaded-file approximation; no source lines were removed or filtered.
The modern run still misses old association constants/metadata, ordering/counter-cache compatibility paths; the real legacy run covers those. The combined remaining 5 lines are:
lib/mongoid/rspec.rb:39: Mongoid 3 loader branch (the current supported CI matrix begins at Mongoid 4; its index implementation is separately exercised).lib/matchers/allow_mass_assignment.rb:63: unused privateaccessible_attributeshelper, unreachable through the public matcher.lib/matchers/validations.rb:116-117: redundant context-mismatch path after the same condition already filtered the validator.lib/matchers/be_stored_in.rb:43: defensive rescue for a dynamic storage value; modern Mongoid normalizes/rejects that value before the matcher receives it.These gaps remain visible rather than being hidden. This is line coverage, not a claim of complete branch coverage; existing instrumentation does not measure branches.
Accepted CI coverage
Coveralls build 82425438 accepted 99.5641% (1142/1147 lines; 5 missed) for final PR head
4184388dcef928911bc115c5b31c6f30b5e3115a(GitHub PR merge SHAfe2f6531b6f52f1aeb2010e6df602f911c3bf93b).This is the finalized server-side union, not only a local calculation: the supported Mongoid 6 / Ruby 2.7 job and Mongoid 9 / Ruby 3.4 job upload flags
mongoid_6andmongoid_9through the official Coveralls action withparallel: true. A dependent job sendsparallel-finished: trueonly after the complete test matrix succeeds. The CI runtime's relevant-line count differs by one from the local Ruby 3.3/2.7 measurement; both retain the same five missed lines.All 15 current-head checks passed, including all 11 Ruby/Mongoid matrix jobs, integration, lint, Danger, and coverage finalization: final Test run.
Validation
Both full unit suites pass; shoulda-matchers integration: 10 examples, 0 failures; RuboCop: 77 files, no offenses. MongoDB tests used dedicated databases on the existing MongoDB server; no shared application/test database was purged.
The storage fixtures use Mongoid 4's
sessionoption and Mongoid 5+'sclientoption; dynamic storage assertions run on Mongoid 6+, where the production matcher’spersistence_contextAPI exists.Posted by GitHub Copilot (AI) on behalf of @dblock.
Update: version tests now assert the already-loaded public constant directly. Removed constant hiding/replacement, version-file reloading, and manual cleanup used only to count assignments under coverage. Any coverage decrease is intentional; earlier percentages above predate this simplification. Genuine compatibility and integration tests remain unchanged.