Ruby gauge climbs to 99%, completing the cross-driver 99–100% band
Summary: Ruby gauge climbs to 99%, completing the cross-driver 99–100% band (v0.5.0b18).
The mongo-ruby-driver conformance gauge moved from 94.6% to 99.0% across this release. Four discrete fixes did the work, each driven by a specific test that previously failed:
writeConcernErrorfor unsatisfiablew— single-nodesecantusadvertises one member, so any integerw > 1can't be satisfied. Real mongod attaches awriteConcernError(code 100CannotSatisfyWriteConcern) to the otherwise-successful reply in that case; we now do the same. SevenINVALID_WRITE_CONCERN = {w: 4000}tests acrosscreate/drop/createIndexes/dropIndexesstart raisingOperationFailureas expected. (The intentional trade-off: one test that passesw: 2and expects success — a structural assumption about multi-node test clusters — flipped to failure, documented in the backlog.)wildcardProjectionvalidation oncreateIndexes— when the option is present, it must be a non-empty document and the base index key must be a wildcard form ($**orfield.$**). TwoMongo::Index::View#create_onespecs match the error by regex; both now pass.commitQuorumerror shape — the existing validator was checking the wrong location (per-index option, not top-level), so unknown values fell through silently. Moving the check to the top-level command body and rewording the error toNo write concern mode named '<value>' found in replica set configuration/ code 79 lights up theunsupported-valuespecs.listIndexeswithcursor.batchSize: -100— real mongod rejects withBadValue; we had been silently clamping to the default.Mongo::Collection#indexessession test now sees the error it expects.$collStats.storageStatsfor capped collections — previously the stage returned a generic stats payload; the capped fields (capped,max,maxSize— the last is the user-setsizerenamed per mongod's wire shape) are now surfaced from the stored collection options. Theapplies the optionscapped spec passes.
This puts every driver gauge in the 99–100% band: pymongo 100%, mongo-java-driver 100%, mongo-go-driver ~99–100% (one documented flake), and now mongo-ruby-driver 99.0%. Three Ruby tests remain — one intentional (the w: 2 topology mismatch), two flagged structurally risky (deliberately-broken invalid: true option tests that need a per-command option whitelist with non-trivial blast radius).