or run

npx @tessl/cli init
Log in

Version

Files

docs

index.md
tile.json

rubric.jsonevals/scenario-1/

{
  "context": "This criteria evaluates how well the engineer uses the chardet package to implement offset-based file sampling for character encoding detection. The focus is on proper usage of chardet's detectFile or detectFileSync methods with the offset and sampleSize options to handle files with binary headers or metadata.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses chardet package",
      "description": "The implementation imports and uses the chardet package for encoding detection (e.g., require('chardet') or import chardet)",
      "max_score": 10
    },
    {
      "name": "Uses detectFile method",
      "description": "The implementation uses chardet.detectFile() or chardet.detectFileSync() to detect file encoding rather than reading the file manually and using detect()",
      "max_score": 25
    },
    {
      "name": "Passes offset option",
      "description": "The implementation correctly passes the offset option to detectFile/detectFileSync as specified in the options parameter (e.g., { offset: skipBytes })",
      "max_score": 30
    },
    {
      "name": "Passes sampleSize option",
      "description": "The implementation correctly passes the sampleSize option to detectFile/detectFileSync when provided (e.g., { sampleSize: sampleBytes })",
      "max_score": 20
    },
    {
      "name": "Handles detection result",
      "description": "The implementation correctly handles the return value from detectFile/detectFileSync, which is a string (encoding name) or null",
      "max_score": 10
    },
    {
      "name": "Combines options correctly",
      "description": "When both offset and sampleSize are provided, the implementation passes both options together in the same options object to chardet",
      "max_score": 5
    }
  ]
}