Test coverage: src/worker.ts has no dedicated test file
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- authentication, security, testing
Research direction
Read src/worker.ts alongside test/journal.test.ts, test/auth.test.ts, test/generate.test.ts, test/tools.test.ts, and test/promote.test.ts to follow the existing test setup. Add a dedicated worker test file covering the /mcp route, the 401-before-KV-touch gate, bearer-token parsing cases, and Cache-Control response headers. Done means these worker-level guarantees are exercised automatically.
Written by the indexing model from the issue text.
Description
test/ covers journal.test.ts, auth.test.ts, generate.test.ts, tools.test.ts, promote.test.ts, but nothing exercises src/worker.ts directly: the /mcp route check (404 elsewhere), the 401-before-KV-touch gate, bearer token extraction (case-insensitivity, malformed header), and the Cache-Control header set on responses. These are exactly the two-layer-auth guarantees CLAUDE.md calls a hard rule ("Two tokens, two scopes... Read token must never reach write tools"), so the layer enforced in worker.ts itself is currently unverified by any automated test.
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dkritarth/context-kernel
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Feature: scripts/promote.ts --mark-reviewed does not verify the ID actually exists in the journalOpen
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
All issues in dkritarth/context-kernel
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
umbraco/Umbraco-CMS-MCP-Dev#512 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
wimpysworld/sidra#290 ·
Maintainers usually reply within 1 day
-
defuFn invokes function values for inherited default propertiesPossibly taken @xiehuanyi claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
feature request good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
TabularisDB/tabularis#853 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 Under an hour Newbie friendliness 85/100
capricorn86/happy-dom#2474 ·
Maintainers usually reply within 2 days