docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
{
"context": "Evaluates whether the service wires MongoDB models and connections through @nestjs/mongoose injection helpers instead of constructing them manually. Checks correct token usage for default and named connections plus transaction handling via the injected connection/session.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Model injection",
"description": "Order model is obtained via @nestjs/mongoose tokens (e.g., @InjectModel or getModelToken for the order schema) on the default connection instead of creating a model from the driver directly.",
"max_score": 25
},
{
"name": "Connection token",
"description": "A connection instance is injected with @InjectConnection or getConnectionToken rather than calling mongoose.connect/createConnection, and it is the source of any sessions used.",
"max_score": 20
},
{
"name": "Named audit model",
"description": "Audit model injection specifies the named connection (e.g., @InjectModel with connection name or getModelToken using that name) so audit queries run against the intended connection.",
"max_score": 20
},
{
"name": "Shared session use",
"description": "Transactional paths start a session via the injected connection (startSession/withTransaction) and pass the same session to both order and audit model operations.",
"max_score": 20
},
{
"name": "No manual setup",
"description": "Implementation avoids manual mongoose model/connection construction (no mongoose.model/connection.model or raw driver calls) and relies on MongooseModule.forFeature/forFeatureAsync-registered tokens.",
"max_score": 15
}
]
}