Queries that set rawData:true currently share a query shape (and query shape hash) with the same find/aggregate/count/distinct command when rawData is omitted. That breaks two behaviors teammates already rely on: (1) setQuerySettings applied to the base shape also affects rawData:true executions (e.g. reject), and (2) $queryStats merges rawData:true with rawData-absent/false into one entry.
Fix query shape computation so that:
- rawData:true is part of the representative query shape and yields a distinct query shape hash from the same command without rawData.
- rawData:false is normalized like absent: it must not appear in the shape and must not change the hash relative to omitting the field.
- Commands with no rawData (and no other new common options) must keep their existing query shape hashes.
- When a shape is built for a representative query (including inside setQuerySettings), rawData must come from that command’s fields—not from whether the ambient operation context is currently a rawData operation.
- Cover find, aggregate, count, and distinct (including the mongos/cluster count path that records query shape hashes).
Existing query_settings tests around rawData already describe the intended settings isolation and hash inequality; enable/extend coverage accordingly rather than inventing a different product behavior.
Work only inside this repository checkout. Make the code change the task
describes, keeping the diff focused — no drive-by refactors.
When you are done, leave your changes committed or in the working tree;
they are collected automatically.
Stay on this snapshot checkout (`task/ycb_mongo_c87935b4c06b7`). Never checkout, pull, or rebase onto `main`. That branch is a README-only orphan.
Stay on this HEAD. Do not fetch another default branch. Push only on the Cursor-created `crazy-cursor/…` side branch from this HEAD.
Some past runs of this task were launched with a different prompt (the prompt template changed since, or those runs predate this benchmark's stored prompt). Each run persists the exact prompt it sent at launch — that per-launch record is the audit trail; this page shows only the current one.
Reference diff
The task commit's diff against its first parent — the judge's comparison target.