docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
{
"context": "Evaluates how the solution configures MongoDB connections in NestJS using @nestjs/mongoose, including synchronous and asynchronous setup, option handling, and connection scoping. Emphasizes use of the library's primitives (forRoot/forRootAsync, connection tokens) instead of custom wiring.",
"type": "weighted_checklist",
"checklist": [
{
"name": "forRoot setup",
"description": "Uses MongooseModule.forRoot with the provided URI (and dbName when supplied) to create the default connection, passing through options such as retryAttempts, retryDelay, or lazyConnection as defined in the spec options.",
"max_score": 25
},
{
"name": "Async factory",
"description": "Configures MongooseModule.forRootAsync with a factory/class/existing provider so that async options are awaited, dependencies are injected via inject/useClass/useExisting, and the resolved object maps to the expected connection options (uri, dbName, retryAttempts, retryDelay).",
"max_score": 25
},
{
"name": "Connection names",
"description": "Applies the connectionName option to create and expose a named connection via @nestjs/mongoose (e.g., getConnectionToken(name) or InjectConnection(name)) while leaving the default connection untouched when both are present.",
"max_score": 20
},
{
"name": "Retry handling",
"description": "Relies on @nestjs/mongoose retry/backoff features (retryAttempts/retryDelay or handleRetry) rather than custom loops to manage transient connection failures as specified by options.",
"max_score": 15
},
{
"name": "Exports for DI",
"description": "Exports or re-exports the configured MongooseModule so downstream providers can inject the connection tokens produced by @nestjs/mongoose without redefining them manually.",
"max_score": 15
}
]
}