This file describes cuda_bindings_13, the low-level CUDA host API bindings subpackage in the cuda-python monorepo. - Role: provide low-level, close-to-CUDA interfaces under cuda.bindings.* with broad API coverage. - Style: prioritize correctness and API compatibility over convenience wrappers. High-level ergonomics belong in cuda_core, not here. - Cross-platform: preserve Linux and Windows behavior unless a change is intentionally platform-specific. - Public module layer: Cython modules under cuda/bindings/ expose user APIs (driver, runtime, nvrtc, nvjitlink, nvvm, cufile, etc.). - Internal binding layer: cuda/bindings/_bindings/…
3.4k3mo agoReviewMountCreate a free account to mount
This file describes cuda_core, the high-level Pythonic CUDA subpackage in the cuda-python monorepo. - Role: provide higher-level CUDA abstractions (Device, Stream, Program, Linker, memory resources, graphs) on top of cuda.bindings. - API intent: keep interfaces Pythonic while preserving explicit CUDA behavior and error visibility. - Compatibility: changes should remain compatible with supported cuda.bindings major versions (12.x and 13.x). - Main package: cuda/core/ contains most Cython modules (*.pyx, *.pxd) implementing runtime behaviors and public objects. - Subsystems: - memory/resource stack: cuda/core/_memory/…
3.4k3mo agoReviewMountCreate a free account to mount
Package-wide conventions live in ../AGENTS.md; repository-wide ones in ../../AGENTS.md. This file covers conventions specific to the tests. A memory pool created without max_size reserves virtual address space similar in size to the installed physical device memory regardless of what the test actually allocates. The reservation is charged to the process address space even though it is not backed by physical memory, and it is not returned until the pool is destroyed and the stream-ordered frees of its outstanding allocations retire.…
3.4k3mo agoReviewMountCreate a free account to mount
This file describes cuda_pathfinder, a Python sub-package of cuda-python. It locates and loads NVIDIA dynamic libraries (CTK, third-party, and driver) across Linux and Windows. - Language: all implementation code in this package is pure Python. - Public API: keep user-facing imports stable via cuda.pathfinder. Internal modules should stay under cuda.pathfinder._*. - Behavior: loader behavior must remain deterministic and explicit. Avoid "best effort" silent fallbacks that mask why discovery/loading failed. - Cross-platform: preserve Linux and Windows behavior parity unless a change…
3.4k3mo agoReviewMountCreate a free account to mount
This file describes cuda_python, the metapackage layer in the cuda-python monorepo. - cuda_python is primarily packaging and documentation glue. - It does not host substantial runtime APIs like cuda_core, cuda_bindings_13, or cuda_pathfinder. - pyproject.toml: project metadata and dynamic dependency declaration. - setup.py: dynamic dependency pinning logic for matching cuda-bindings versions (release vs pre-release behavior). - docs/: top-level docs build/aggregation scripts. - Keep this package lightweight; prefer implementing runtime features in the component packages rather than here. - Be careful when…
3.4k3mo agoReviewMountCreate a free account to mount
The driver follows strict semantic versioning: breaking changes to the public surface require a major-version bump. Breaks are always measured against the latest released version of the assembly (the most recent published NuGet package), not against the current state of main. A public API that was added and then changed or removed within the current unreleased development cycle never shipped, so it is not a break. Releases are tagged v<major>.<minor>.<patch> (e.g. v3.9.0). Find the baseline with the GitHub release list,…
3.2k3mo agoReviewMountCreate a free account to mount
The BSON library: object model, binary/JSON I/O, and the serialization framework. Foundation for everything else in the driver. Three primary subdirectories partition the work cleanly (additional folders like Exceptions/ and various top-level files — BsonExtensionMethods.cs, BsonUtils.cs, etc. — also live here):
3.2k3mo agoReviewMountCreate a free account to mount
This file is the entry point for any work under src/MongoDB.Driver/. Over 200 .cs files at this directory root are predominantly the public API surface — client facades, builders DSL, fluent APIs, and option/result types — though a meaningful minority (~20%) are internal helpers that happen to live alongside it. Public API is not confined to this directory: Core/, Core/Events/, Core/Logging/, GridFS/, Search/, Linq/, GeoJsonObjectModel/, and the MongoDB.Bson project also expose public types. Subdirectories own their own deep concerns and…
3.2k3mo agoReviewMountCreate a free account to mount
The authentication subsystem under src/MongoDB.Driver/Authentication/ plus the optional sibling project src/MongoDB.Driver.Authentication.AWS/. Responsible for credential storage, mechanism negotiation, the SASL conversation, the speculativeAuthenticate handshake optimization, and integration with Core/Connections/ConnectionInitializer. Files: ScramShaSaslMechanism.cs, ScramShaFirstSaslStep.cs, ScramShaSecondSaslStep.cs, ScramShaLastSaslStep.cs, IScramShaAlgorithm.cs, ScramSha1Algorithm.cs, ScramSha256Algorithm.cs, ScramCache.cs. Conversation: client-first → server-first → client-final → server-final (RFC 5802). Salted password computed via PBKDF2; ClientKey, StoredKey, ClientProof, ServerSignature derived per the spec. DefaultAuthenticator picks the mechanism: if the hello reply includes saslSupportedMechs and SCRAM-SHA-256 is in the list, use SHA-256; otherwise SHA-1…
3.2k3mo agoReviewMountCreate a free account to mount
This is an optional project providing the MONGODB-AWS SASL mechanism. Kept separate from MongoDB.Driver so that consumers who don't need AWS IAM auth aren't forced to ship the AWS SDK / signing dependencies. For full coverage — credential resolution (explicit MongoCredential vs the AWS SDK's DefaultAWSCredentialsIdentityResolver chain; consult the AWS SDK for the authoritative source order), SigV4 signing of sts-service requests, region derivation from the STS host header (defaulting to us-east-1), and registration via the ISaslMechanismRegistry exposed by MongoClientSettings.Extensions.SaslMechanisms —…
3.2k3mo agoReviewMountCreate a free account to mount
This file covers the Server Discovery And Monitoring (SDAM) topology layer, connection pooling, wire protocol, and supporting infrastructure under src/MongoDB.Driver/Core/. Scoped subdirectories: Clusters/, Servers/, Connections/, ConnectionPools/, WireProtocol/, Configuration/, Misc/, plus wire compression, which lives outside Core/ at src/MongoDB.Driver/Compression/ (namespace MongoDB.Driver.Compression) but is still owned by this reviewer. (Core/Authentication/ and Core/Bindings/ also live under Core/ but are out of scope for this reviewer — see the auth-area and operations-area AGENTS.md.) Ownership boundary: the Operations layer (Core/Operations/, Core/Bindings/) sits above this and…
3.2k3mo agoReviewMountCreate a free account to mount
Bindings, sessions, and transactions are owned by the Operations, Sessions & Transactions area. See src/MongoDB.Driver/Core/Operations/AGENTS.md for full coverage: Public SemVer surface here. The binding interfaces and the concrete binding implementations are internal, but the session/transaction types CoreSession, CoreSessionHandle, CoreSessionOptions, CoreTransaction, CoreTransactionState, ICoreSession, ICoreSessionHandle, ICoreServerSession, WrappingCoreSession, and NoCoreSession are public — changes are SemVer-sensitive. (CoreTransaction's pinning members — PinnedChannel, PinnedServer, UnpinAll() — are internal.) Grepping pitfalls. The ICoreServerSession interface lives in a file with a triple-s typo — ICoreServerSesssion.cs — there…
3.2k3mo agoReviewMountCreate a free account to mount
Structured event publishing for command monitoring, connection-pool lifecycle (CMAP), per-connection lifecycle, server discovery & monitoring (SDAM), and cluster topology. Foundation for the structured-logging layer in Core/Logging/ and for any custom observability subscribers. ConnectionPoolReadyEvent has no *ing→*ed lifecycle partner — it fires once when the pool transitions to ready; the asymmetry is intentional (there's no observable "becoming ready" intermediate state to report). The checkout/*Failed triplets above are a separate asymmetry pattern, not a missing partner. - Connection — per-connection lifecycle (ConnectionOpening,…
3.2k3mo agoReviewMountCreate a free account to mount
Bridges the event subsystem (Core/Events/) to Microsoft.Extensions.Logging. When the user supplies a LoggerFactory via MongoClientSettings.LoggingSettings, events are offered to the configured logger as structured log entries; whether each entry is actually emitted depends on the logger's level filter. Every dispatched EventType must have a registered template provider — EventLogger dereferences the provider unconditionally, so a missing provider for a dispatched event throws rather than skipping silently. In practice every event currently dispatched is covered; if you add a new EventType…
3.2k3mo agoReviewMountCreate a free account to mount
The execution layer between the public driver surface and the wire. Every public CRUD/aggregate/admin call eventually constructs one of these operations and hands it to an executor. This file's scope is wider than its directory: the operations-reviewer also owns Core/Bindings/, the session/transaction state machines, and the surface-level ClientSession* types at the driver root. (src/MongoDB.Driver/AbortTransactionOptions.cs and CommitTransactionOptions.cs are also in scope but are currently internal sealed — the user-facing public abstraction is ClientSessionOptions.) Two operation interfaces defined in Core/Operations/IOperation.cs (both internal;…
3.2k3mo agoReviewMountCreate a free account to mount
This project wraps libmongocrypt (the C library that implements CSFLE and Queryable Encryption) and exposes both an explicit-encryption API (ClientEncryption) and the auto-encryption hook used by the main driver. Anything cryptographic happens here. The driver's user-facing AutoEncryptionOptions and provider registry live one layer up under src/MongoDB.Driver/Encryption/ (see that AGENTS.md).
3.2k3mo agoReviewMountCreate a free account to mount
The hooks the driver itself needs in order to delegate auto-encryption to libmongocrypt. The cryptographic engine lives in the sibling project src/MongoDB.Driver.Encryption/ — this directory is the bridge.
3.2k3mo agoReviewMountCreate a free account to mount
Strongly-typed GeoJSON (RFC 7946) for use with MongoDB geospatial filters and indexes. Used by FilterDefinitionBuilder.GeoIntersects / GeoWithin / Near / NearSphere, IndexKeysDefinitionBuilder.Geo2DSphere, and the $geoNear aggregation stage. PipelineStageDefinitionBuilder.GeoNear exposes two public static convenience overloads — one taking a GeoJsonPoint<TCoordinates> and one taking a double[] — that both delegate to an internal static generic overload taking a TPoint directly. There is no GeoNearOperation class; geoNear is expressed as a pipeline stage. Generic over a coordinate type TCoordinates. Two-tier hierarchy: Geometries accept…
3.2k3mo agoReviewMountCreate a free account to mount
GridFS stores binary files in two collections per bucket: <bucket>.files (metadata, one document per file) and <bucket>.chunks (binary data, many documents per file). Chunk size is configurable; default 255 KiB. GridFSBucket holds the cluster reference, an IBsonSerializer<GridFSFileInfo<TFileId>> (_fileInfoSerializer), and a BsonSerializationInfo for the _id field (_idSerializationInfo, which is what enforces the TFileId round-trip discussed in the pitfalls below). Mutating operations (Delete, Rename, OpenUploadStream, Drop) bind via GetSingleServerReadWriteBinding; reads (DownloadAsBytes*, DownloadToStream*, OpenDownloadStream*, Find) bind via GetSingleServerReadBinding. Either way, a single upload/download…
3.2k3mo agoReviewMountCreate a free account to mount
Translates C# Expression trees from IQueryable<T> into MongoDB aggregation pipelines. The current implementation is Linq3; Linq2 is gone. Subdirectory layout:
3.2k3mo agoReviewMountCreate a free account to mount