or run

npx @tessl/cli init
Log in

Version

Files

tile.json

rubric.jsonevals/scenario-7/

{
  "context": "This criteria evaluates how well the engineer uses koa-route's automatic URL parameter decoding feature to build a redirect service. The focus is on correctly utilizing route.get() with parameterized paths and leveraging the automatic decodeURIComponent() handling that koa-route provides for URL parameters.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses route.get()",
      "description": "Uses koa-route's route.get() method to define the GET /r/:target route pattern",
      "max_score": 25
    },
    {
      "name": "Parameterized path pattern",
      "description": "Correctly uses the :target parameter syntax in the path pattern (e.g., '/r/:target') to capture the URL parameter",
      "max_score": 20
    },
    {
      "name": "Accesses decoded parameter",
      "description": "Accesses the automatically decoded parameter in the route handler (e.g., as the second argument after ctx), demonstrating understanding that koa-route decodes parameters automatically",
      "max_score": 30
    },
    {
      "name": "Redirects correctly",
      "description": "Uses the decoded parameter value to perform the redirect (ctx.redirect() or setting ctx.status and ctx.set('Location', ...)) with status 302",
      "max_score": 25
    }
  ]
}