Skip to content

Updates TEST_COVERAGE.md with rules from $push#262

Draft
alinaliBQ wants to merge 7 commits into
documentdb:mainfrom
alinaliBQ:push-test-coverage
Draft

Updates TEST_COVERAGE.md with rules from $push#262
alinaliBQ wants to merge 7 commits into
documentdb:mainfrom
alinaliBQ:push-test-coverage

Conversation

@alinaliBQ
Copy link
Copy Markdown
Contributor

Updates TEST_COVERAGE.md with additional coverage rules discovered while writing$push accumulator tests (#257).

Section 1 – Data Type Coverage:

• Added array traversal via field paths (e.g. $a.b on arrays-of-objects) to
the nested structure coverage guidance

Section 2 – Arithmetic Operator Coverage:

• Added rule for testing special float values (NaN, Infinity, -Infinity, -0.0)
mixed with non-numeric types (string, boolean, null, object, array) in
operators that collect or pass through values

Section 15 – Pipeline Stage Coverage:

• Added rule for testing multiple $group stages in a single pipeline, where
each stage performs actual grouping (not just _id: null) and the second re-
aggregates the output of the first

Section 18 – Accumulator Coverage:

• Added Actual Grouping Requirement: accumulator tests must include at least
one multi-group test per test category, not rely exclusively on _id: null
• Added Multiple Accumulators in Single $group: test multiple instances of the
same accumulator in one $group with actual grouping to verify independent
field collection without cross-contamination
• Added Large-Scale Result Verification: prefer verifying actual content over
count-only checks at scale; use loops for expected results and fall back to
server-side content checks ($sum/$min/$max) when full element-by-element
comparison is impractical

alinaliBQ added 7 commits June 1, 2026 16:16
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
Signed-off-by: Alina (Xi) Li <Alina.Li@improving.com>
@documentdb-triage-tool documentdb-triage-tool Bot added the documentation Improvements or additions to documentation label Jun 2, 2026
@documentdb-triage-tool
Copy link
Copy Markdown

🤖 Auto-triaged by documentdb-triage-tool.

Applied: documentation
Project fields suggested: Component docs · Priority P3 · Effort S · Status In Progress
Confidence: 0.90 (mixed)

Reasoning

component from path globs (docs); effort from diff stats (13+0 LOC, 1 files); LLM: Updates TEST_COVERAGE.md with new rules and guidance discovered during $push accumulator test work — purely a documentation improvement with no code changes.

If a label is wrong, remove it manually and ping @patty-chow so the rules can be tuned. The bot will not re-label items that already have component labels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant