docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
{
"context": "This evaluation assesses how well the engineer uses Node.js cryptographic APIs and file system operations to implement a content-addressable storage integrity checker, focusing specifically on proper use of crypto hashing, file I/O patterns, and error handling for storage verification tasks.",
"type": "weighted_checklist",
"checklist": [
{
"name": "SHA-512 Hash Implementation",
"description": "Uses Node.js crypto.createHash('sha512') to compute hashes and properly converts to hexadecimal string format using digest('hex')",
"max_score": 20
},
{
"name": "Path Generation Logic",
"description": "Correctly implements content-addressable path generation using hash.substring(0, 2) for prefix directory and hash for filename, with conditional '-exec' suffix",
"max_score": 15
},
{
"name": "File Reading with fs",
"description": "Uses appropriate Node.js fs methods (fs.readFile, fs.promises.readFile, or fs.readFileSync) to read file contents into Buffer for hash verification",
"max_score": 15
},
{
"name": "Hash Comparison",
"description": "Implements proper hash comparison logic to verify file integrity by comparing computed hash against expected hash",
"max_score": 10
},
{
"name": "Error Handling",
"description": "Properly handles file not found errors and distinguishes them from other I/O errors when verifying file integrity",
"max_score": 10
},
{
"name": "Store Directory Traversal",
"description": "Uses Node.js path module (path.join, path.resolve) to construct full file paths from store directory and relative paths",
"max_score": 10
},
{
"name": "Async/Promise Usage",
"description": "Properly implements async functions with Promise handling for file I/O operations, using async/await or Promise chains",
"max_score": 10
},
{
"name": "Result Aggregation",
"description": "Correctly categorizes files into valid, corrupted, and missing arrays based on verification results in the store integrity check",
"max_score": 10
}
]
}