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 solution uses @nestjs/mongoose schema tooling to handle nested documents, maps, raw literal objects, lazy references, and ambiguous type detection for the blueprint models.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Decorated models",
"description": "Classes Profile, BlockSetting, Block, and Blueprint are annotated with @Schema and @Prop (or equivalent decorator options) and compiled via SchemaFactory.createForClass so nested subdocuments and arrays are generated from the class graph.",
"max_score": 25
},
{
"name": "Map typing",
"description": "Map fields (e.g., flags on BlockSetting and labels on Blueprint) are declared with @Prop({ type: Map, of: <type> }) so compiled schemas preserve map semantics instead of plain objects.",
"max_score": 15
},
{
"name": "Raw literal layout",
"description": "The layout and metadata literal objects are modeled with raw(...) or RAW_OBJECT_DEFINITION so required keys (canvas.width, canvas.height, theme, accent, weight) are enforced while allowing passthrough extras.",
"max_score": 20
},
{
"name": "Lazy references",
"description": "ownerRef and reviewer relationships use function-wrapped refs (e.g., ref: () => Profile with ObjectId type) so references resolve even when the class is declared later, matching the lazy reference requirement.",
"max_score": 20
},
{
"name": "Ambiguous type error",
"description": "ambiguousSchemaBuilder invokes DefinitionsFactory.createForClass (or SchemaFactory.createForClass) on AmbiguousShape and surfaces the package's CannotDetermineTypeError for the trouble union type rather than falling back silently.",
"max_score": 20
}
]
}