CodeVetter · Repo Unpack · Contributor handoff
koajs/koa
Begin with the lifecycle and paired response implementations, then inspect the API-specific tests. Tests and CI were inspected, not executed, so future validation must establish its own results. Preserve the library's documented extension boundaries and treat this report as a bounded source inventory.
- Read package.json and application.js first to understand module exports, generated ESM output, constructor options, middleware composition, and request completion.
- For body changes, read response.body and application.respond together; metadata assignment and transport output are separate and share explicit-status/null and stream assumptions.
- Preserve the context delegation contract when adding request or response properties; the FAQ requires generally useful APIs and consistent getter/setter ownership.
- Use request-local ctx.state for middleware data; putting mutable data on app.context shares it through the application prototype.
- The established checks are npm test, npm run lint, and npm run test:coverage; inspected test files use node:test and can support focused file selection when execution is authorized.
- ESM loading depends on generated dist/koa.mjs; npm prepare builds it, and the ESM suite checks parity with the CommonJS constructor and exports.
- Follow two-space formatting and Standard linting; distinguish legacy comments/config from current behavior, since use() mentions conversion but only registers functions, v3 docs remove old middleware support, and the test config still labels Jest.
- Do not infer runtime verification from inspected fixtures: HTTP/2 host tests synthesize fields, snapshot tests simulate callbacks, fetch-named tests construct local Responses, and declared CI steps provide no execution result in this brief.