Investigate AI-agent analysis report on the collation specification. This ticket tracks findings identified during a systematic review of the spec: missing test coverage, ambiguous normative language, and spec/test inconsistencies.
Missing Tests
- maxWireVersion [ 5: ALL operations with collation MUST raise an error — verify error is raised before sending
- Opcode-based unacknowledged writes with collation MUST raise an error
- create command MUST accept collation parameter — test collection creation with collation
- BulkWrite MUST fail the entire batch (not just the offending operation) if any operation has collation and
maxWireVersion < 5 - Unknown collation options MUST NOT raise an error; server validates — test forward compatibility
- RunCommand MUST NOT validate collation subdocument or check wire version — test passthrough behavior
- All CRUD ops MUST support collation option: aggregate, count, distinct, find, findAndModify,
geoNear, group, mapReduce, delete, update — one test per operation - Index management ops MUST support collation option: createIndex, dropIndex, hint
- Two indexes with identical keys but different collations can be created when given custom names
- Correct index is dropped when specifying index name on deleteOne
Ambiguities
- Error type for unsupported servers: Spec states "Drivers MUST throw an error" for maxWireVersion < 5 but does
not specify the error type, message format, or whether the error is raised pre-flight or at the wire protocol level. - BulkWrite rejection timing: "Fail the entire bulkWrite if a collation was explicitly specified" — unclear
whether the entire batch is rejected before any network call or only after the first operation fails.
→ DRIVERS-3483 / PR #1941 - Test plan vagueness: "Drivers should test each affected CRUD, Index Management API, and collection
creation/modification component" — no structured test format is provided.
Inconsistencies
- Header "Minimum Server Version: 1.8" vs maxWireVersion 5 requirement: Spec states support for "server versions
]= 3.4 (maxWireVersion 5)" but the header says the minimum is 1.8. These conflict.
→ DRIVERS-3478 / PR #1936 - Strict Collation model vs unknown options: Spec defines a strict typed Collation class but also says "MUST NOT
raise an error when a user provides unknown options." This creates tension between strict typing and server-side
validation.
Notes
- is related to
-
JAVA-2241 Support collation
-
- Closed
-
-
RUBY-1126 Support providing collation per operation
-
- Closed
-
-
DRIVERS-3483 Clarify BulkWrite pre-flight check timing in collation spec
-
- In Review
-
-
DRIVERS-3478 Fix collation spec "Minimum Server Version" from 1.8 to 3.4
-
- Closed
-
- related to
-
DRIVERS-3484 Spec gap analysis: missing tests, ambiguities, and inconsistencies across all 42 components
-
- Closed
-