Trim PyMongo 4.18 wheel size for the Agent #25548
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 248 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.330
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #25548"
general
weight: 0.35
aiuto
What does this PR do?
Reduces the installed size of PyMongo 4.18.2 in the Agent from 3.47 MiB to about 1.9 MiB on linux x86_64, slightly below the 1.77 MiB of PyMongo 4.8.0 plus the new SRV public suffix list. This PR targets #25517.
_cmessageand_cbsonwith DWARF debug info (about 0.7 MiB on x86_64 and 1 MiB on aarch64); building with ourLDFLAGS=-Wl,--strip-debugremoves it. This is how 4.8.0 was already built, since it had no cp313 wheel on PyPI.pymongo/asynchronous/andgridfs/from the packaged wheel (about 0.9 MiB on every platform), along with the three lines that importpymongo.asynchronouseagerly. No integration usesAsyncMongoClientor GridFS, and the sync client does not depend on either package.Motivation
The PyMongo upgrade in #25517 increases the Agent's on-disk size enough to fail the static quality gates. Most of the increase comes from upstream shipping both a sync and an async copy of the client since 4.9, and from unstripped extensions in the PyPI wheels.
Validated by running the builder's
clean_wheelon the 4.18.2 wheel and by exercising the trimmed, stripped install against MongoDB 8.0 on linux/amd64: connect, insert, count, index creation,explain,$currentOp,$indexStats,collStats, andlistDatabases, with the C extensions loaded and themongodb+srvresolver importable. Dependency resolution needs to rerun on this branch to rebuild the wheels and update the lockfiles.Review checklist (to be filled by reviewers)
qa/requiredif this PR needs QA validation, orqa/skip-qaif it does not. Exactly one of the two is required.backport/<branch-name>label to the PR and it will automatically open a backport PR once this one is merged