evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
{
"context": "Evaluates whether the solution uses cacache's integrity and size enforcement knobs to implement the cache helper: enforcing digests, honoring allowed algorithms, leveraging precomputed integrity emitters, and reporting verified metadata. Scoring is entirely about correct, explicit use of cacache APIs for integrity/size control rather than general code quality.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Write integrity check",
"description": "Uses cacache.put or cacache.put.stream with opts.integrity to validate stored bytes and surfaces the library's EINTEGRITY error on digest mismatch.",
"max_score": 25
},
{
"name": "Integrity emitter reuse",
"description": "Accepts and forwards opts.integrityEmitter into cacache.put.stream (or equivalent streaming path) to reuse external hashing without re-computing, returning the digest emitted by that integrityEmitter.",
"max_score": 20
},
{
"name": "Size guard",
"description": "Supplies opts.size to cacache.put/cacache.get (or their streaming variants) so oversized/undersized payloads raise EBADSIZE before data is returned or persisted.",
"max_score": 20
},
{
"name": "Algorithm allowlist",
"description": "Passes opts.algorithms to cacache.get or cacache.get.stream to accept only permitted digests and resolves to a variant that matches the allowlist.",
"max_score": 20
},
{
"name": "Verified metadata",
"description": "Propagates cacache's returned integrity/size (and algorithm where applicable via get info/metadata) to callers so they know which digest validated the operation.",
"max_score": 15
}
]
}