Reported by the #12252 dev as a judgement call beyond its instruction, and filed here by the domain:engine PM seat. Small, mechanical, and independent of #13222's disposition.
The gap
PR #13224 inverts the assertion in packages/drivers/driver-mongodb/src/mongodb-driver.test.ts to pin the divergence #13222 owns: a canonically-spelled lookup gets noidx_<field>_lookup on MongoDB.
⚠️ That suite is describe.skipIf(!sharedMongod) — gated on OS_TEST_MONGODB_MEMORY_SERVER_ENABLED=1, which is opt-in because of the ~123 MB binary download #5517 retired from default runs. It runs on no ordinary CI lane.
So the pin is inert in both directions:
A pin that cannot fail records a fact for human readers but enforces nothing. That is materially weaker than what the inverted-in-place convention assumes: its whole justification is that from main, a pin's disappearance and the divergence silently reopening must not look identical — which only holds if something runs it.
The fix
packages/drivers/driver-mongodb/src/mongodb-schema-declared-indexes.test.ts tests the same function, is driven by a fake Db recorder with no server at all, and does run on every lane. Its own header states the function under test runs verbatim.
Add the equivalent assertion there: a { type: 'lookup', reference: '…' } field produces no idx_<field>_lookup, with the type: 'user' positive control alongside it so the day the arm is removed entirely, the case fails loudly rather than passing vacuously.
⚠️The positive control is the load-bearing half. Without it, not.toContain passes just as happily against a function that produces no indexes at all, a renamed index, or a harness that never called the function — the exact vacuity that makes a negative assertion worthless.
Cross-reference the two pins so a future editor of either finds the other.
Scope
One test file, additive. ⛔ Do not change the driver — that is #13222. ⛔ Do not un-skip or re-enable the opt-in suite; #5517's merge-queue hazard is the reason it is opt-in and this card does not reopen it.
Why it is worth its own card
It holds whichever way #13222 goes, and it is what makes #13222's eventual outcome observable: if the lookup arm is ever taught to read reference, this is the assertion that turns red and tells someone to retire the divergence note rather than leaving a stale "disposition open" comment behind.
Related
#13224 (the PR that creates the pin) · #13222 (owns the divergence) · #12252 · #5517 (why the covering suite is opt-in)
Reported by the #12252 dev as a judgement call beyond its instruction, and filed here by the
domain:enginePM seat. Small, mechanical, and independent of #13222's disposition.The gap
PR #13224 inverts the assertion in
packages/drivers/driver-mongodb/src/mongodb-driver.test.tsto pin the divergence #13222 owns: a canonically-spelledlookupgets noidx_<field>_lookupon MongoDB.describe.skipIf(!sharedMongod)— gated onOS_TEST_MONGODB_MEMORY_SERVER_ENABLED=1, which is opt-in because of the ~123 MB binary download #5517 retired from default runs. It runs on no ordinary CI lane.So the pin is inert in both directions:
reference_to— a key the spec REFUSES — so no authored lookup field has ever been indexed on MongoDB #13222 is fixed and lookups start getting indexed, nothing goes red — the pin's own "flips back totoContaindeliberately" instruction has no mechanism to remind anyone;A pin that cannot fail records a fact for human readers but enforces nothing. That is materially weaker than what the inverted-in-place convention assumes: its whole justification is that from
main, a pin's disappearance and the divergence silently reopening must not look identical — which only holds if something runs it.The fix
packages/drivers/driver-mongodb/src/mongodb-schema-declared-indexes.test.tstests the same function, is driven by a fakeDbrecorder with no server at all, and does run on every lane. Its own header states the function under test runs verbatim.Add the equivalent assertion there: a
{ type: 'lookup', reference: '…' }field produces noidx_<field>_lookup, with thetype: 'user'positive control alongside it so the day the arm is removed entirely, the case fails loudly rather than passing vacuously.not.toContainpasses just as happily against a function that produces no indexes at all, a renamed index, or a harness that never called the function — the exact vacuity that makes a negative assertion worthless.Cross-reference the two pins so a future editor of either finds the other.
Scope
One test file, additive. ⛔ Do not change the driver — that is #13222. ⛔ Do not un-skip or re-enable the opt-in suite; #5517's merge-queue hazard is the reason it is opt-in and this card does not reopen it.
Why it is worth its own card
It holds whichever way #13222 goes, and it is what makes #13222's eventual outcome observable: if the lookup arm is ever taught to read
reference, this is the assertion that turns red and tells someone to retire the divergence note rather than leaving a stale "disposition open" comment behind.Related
#13224 (the PR that creates the pin) · #13222 (owns the divergence) · #12252 · #5517 (why the covering suite is opt-in)