Skip to content

Commit 74b6e8b

Browse files
alari76claude
andcommitted
fix: set NODE_ENV=test in vitest config to prevent act-is-not-a-function failures
System environment has NODE_ENV=production, which causes React to load its production build where `act` is not exported. Adding env.NODE_ENV='test' to vitest.config.ts ensures the development React build is always used in tests. Also commit orphaned code-review report for 2026-04-11. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 49e6059 commit 74b6e8b

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Daily Code Review: codekin
2+
3+
**Date**: 2026-04-11T04:04:32.637Z
4+
**Repository**: /srv/repos/codekin
5+
**Branch**: chore/complexity-report-2026-04-10
6+
**Workflow Run**: f77f3161-7dcb-4956-8883-0b1e201f73fa
7+
**Session**: b8248808-58a8-453f-8095-12ebc7641d81
8+
9+
---
10+
11+
Now I'll write the report and commit it.Report written to `.codekin/reports/code-review/2026-04-11_code-review.md` and PR opened: **Multiplier-Labs/codekin#338**
12+
13+
---
14+
15+
## Review Summary
16+
17+
### Critical (1)
18+
19+
**Path traversal via symlink fallback**`server/session-routes.ts` lines ~74–77 and ~285–287. When `realpathSync()` throws, the code falls back to `path.resolve()` which doesn't resolve symlinks. A symlink inside an allowed directory pointing outside (e.g. `/repos/allowed/escape -> /etc`) passes the `startsWith` boundary check. Fix: return `403` on `realpathSync` failure, don't fall through.
20+
21+
### Warnings (3)
22+
23+
1. **Test coverage gap**`commit-event-handler.ts`, `commit-event-hooks.ts`, `orchestrator-monitor.ts`, `version-check.ts` have no tests. These are high-consequence code paths (commit hooks, version enforcement).
24+
25+
2. **Multer upload config unverified**`server/upload-routes.ts` — need to confirm file size limits and MIME type allowlist are set.
26+
27+
3. **Large files ongoing**`session-manager.ts` (~1570 lines), `webhook-handler.ts` (~800 lines). Refactoring is in progress but `webhook-handler.ts` should be next priority.
28+
29+
### Info (3)
30+
31+
- `CROSS_REPO_THRESHOLD = 5` — recently raised from 2; consider raising to 10 or making env-configurable
32+
- Stepflow migration (`f7eed7f`) looks clean, no issues found
33+
- PR Review workflow addition (`97ec940`) follows existing patterns correctly
34+
35+
### All Clear
36+
37+
Token auth (timing-safe), HMAC webhook verification, DOMPurify XSS protection, write locks, session scoped tokens, npm audit (0 vulns) — all verified secure.Committed and pushed `.codekin/reports/repo-health/2026-04-11_repo-health.md` to the `chore/code-review-2026-04-11` branch (alongside the code review report).

vitest.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ export default defineConfig({
66
test: {
77
environment: 'node',
88
include: ['src/**/*.test.ts', 'server/**/*.test.ts', '.claude/hooks/**/*.test.mjs'],
9+
env: { NODE_ENV: 'test' },
910
},
1011
})

0 commit comments

Comments
 (0)