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 effectively the engineer uses the promise.allsettled package to implement robust type checking and validation for tracking promise settlements. The focus is on proper usage of the package's validation capabilities and correct handling of various input types.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Package Import",
"description": "The solution correctly imports the promise.allsettled package (e.g., using require('promise.allsettled') or one of its specific exports like getPolyfill or shim)",
"max_score": 10
},
{
"name": "Core Function Usage",
"description": "The solution uses the allSettled function (either from the package directly, via getPolyfill(), or via shim()) to track promise settlements rather than implementing custom settlement tracking logic",
"max_score": 25
},
{
"name": "Iterable Validation",
"description": "The implementation leverages the package's built-in type checking for iterable validation, allowing TypeErrors to propagate naturally when non-iterable inputs are provided",
"max_score": 20
},
{
"name": "Context Validation",
"description": "The implementation properly handles context validation by either using the package as a standalone function or correctly applying it with .call()/.apply() to allow the package's internal context validation to work",
"max_score": 20
},
{
"name": "Mixed Input Handling",
"description": "The solution relies on the package's capability to handle both promise and non-promise values in the iterable without requiring custom preprocessing logic",
"max_score": 15
},
{
"name": "Result Format",
"description": "The solution correctly returns the result format provided by allSettled (array of objects with 'status' and either 'value' or 'reason' properties) without additional transformation",
"max_score": 10
}
]
}