evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
{
"context": "Assesses whether the solution uses cacache's streaming write API to persist data under a key while surfacing the package-emitted integrity hash and byte counts. Emphasizes relying on cacache options/events for integrity, size enforcement, metadata, and proper stream completion.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Stream API",
"description": "Writes via `cacache.put.stream(cachePath, key, opts)` instead of manual file or buffer writes, piping the provided readable into that stream.",
"max_score": 25
},
{
"name": "Integrity capture",
"description": "Listens to the put stream's `integrity` event (or equivalent property) and returns the SRI produced by cacache rather than computing hashes independently.",
"max_score": 20
},
{
"name": "Size capture",
"description": "Obtains the byte length from the put stream's `size` event and returns it, avoiding separate byte counting that bypasses cacache's emitted size.",
"max_score": 15
},
{
"name": "Size enforcement",
"description": "Provides `opts.size` when creating the put stream and propagates the package's size-mismatch rejection (EBADSIZE) when streamed bytes differ from the expected length.",
"max_score": 15
},
{
"name": "Metadata option",
"description": "Passes `opts.metadata` into `cacache.put.stream` so the supplied metadata is persisted with the cache entry.",
"max_score": 10
},
{
"name": "Stream completion",
"description": "Resolves only after the cacache stream signals completion (finish/close) and propagates stream errors (including integrity/size failures) instead of resolving early.",
"max_score": 15
}
]
}