docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
{
"context": "This criteria evaluates how well the engineer uses the promise.allsettled package to handle iteration over various iterable types and map items to promises, leveraging the package's robust iteration and mapping capabilities.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses promise.allsettled",
"description": "The solution imports promise.allsettled (via require('promise.allsettled')) and calls it as a function, OR imports the shim (require('promise.allsettled/shim') or require('promise.allsettled/auto')) and then uses Promise.allSettled, rather than implementing custom settlement tracking.",
"max_score": 30
},
{
"name": "Maps items to promises",
"description": "The solution correctly transforms input items into promises by mapping the processor function over the iterable (e.g., using Array.from().map() or similar approach to apply processorFn to each item).",
"max_score": 25
},
{
"name": "Handles iterable inputs",
"description": "The solution properly handles various iterable types (arrays, Sets, etc.) by converting them to an appropriate format for processing, not assuming the input is always an array.",
"max_score": 20
},
{
"name": "Preserves result order",
"description": "The solution maintains the order of results corresponding to the input iteration order by leveraging promise.allsettled's guarantee of order preservation.",
"max_score": 15
},
{
"name": "Returns correct structure",
"description": "The solution returns the promise.allsettled result format directly or passes it through unchanged, with each result having 'status' property and either 'value' (for fulfilled) or 'reason' (for rejected).",
"max_score": 10
}
]
}