Skip to content

Remove DEV_MODE from kiloclaw runtime code and tests#581

Merged
pandemicsyn merged 4 commits intomainfrom
remove-dev-mode-from-kiloclaw-code
Feb 26, 2026
Merged

Remove DEV_MODE from kiloclaw runtime code and tests#581
pandemicsyn merged 4 commits intomainfrom
remove-dev-mode-from-kiloclaw-code

Conversation

@kilo-code-bot
Copy link
Contributor

@kilo-code-bot kilo-code-bot bot commented Feb 25, 2026

Summary

  • Removes all DEV_MODE references from kiloclaw runtime code, types, and tests

Changes

Runtime code:

  • src/types.ts: Remove DEV_MODE?: string from KiloClawEnv type
  • src/index.ts: Remove env var validation skip when DEV_MODE === 'true'
  • src/auth/middleware.ts: Remove JWT auth bypass that injected synthetic dev@kilocode.ai user
  • src/gateway/env.ts: Remove OPENCLAW_DEV_MODE passthrough to container env
  • start-openclaw.sh: Remove OPENCLAW_DEV_MODE block that set allowInsecureAuth

Tests:

  • src/auth/middleware.test.ts: Remove DEV_MODE bypass test case
  • src/gateway/env.test.ts: Remove DEV_MODEOPENCLAW_DEV_MODE mapping test and references

All 392 tests pass, typecheck clean.

Built for Florian by Kilo for Slack

Remove DEV_MODE=true from .dev.vars.example and all DEV_MODE/OPENCLAW_DEV_MODE
references from documentation files (DEVELOPMENT.md, AGENTS.md,
docker-image-testing.md). The runtime code that reads DEV_MODE is intentionally
kept — this only cleans up examples and docs.
Removes all DEV_MODE references from kiloclaw source code:
- types.ts: remove DEV_MODE from KiloClawEnv type
- index.ts: remove env var validation skip when DEV_MODE=true
- auth/middleware.ts: remove JWT auth bypass with synthetic dev user
- gateway/env.ts: remove OPENCLAW_DEV_MODE passthrough to container
- start-openclaw.sh: remove OPENCLAW_DEV_MODE allowInsecureAuth block
- Remove corresponding test cases in middleware.test.ts and env.test.ts

Builds on PR #578 which removed DEV_MODE from docs and .dev.vars.example.
@kilo-code-bot
Copy link
Contributor Author

kilo-code-bot bot commented Feb 25, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (11 files)
  • kiloclaw/.dev.vars.example
  • kiloclaw/AGENTS.md
  • kiloclaw/DEVELOPMENT.md
  • kiloclaw/src/auth/middleware.test.ts
  • kiloclaw/src/auth/middleware.ts
  • kiloclaw/src/gateway/env.test.ts
  • kiloclaw/src/gateway/env.ts
  • kiloclaw/src/index.ts
  • kiloclaw/src/types.ts
  • kiloclaw/start-openclaw.sh
  • kiloclaw/test/docker-image-testing.md

@pandemicsyn
Copy link
Contributor

pandemicsyn commented Feb 26, 2026

Missed cleaning up these in #256 when i removed the related "debug" routes. This is a hold over from the original "moltworker" version

@pandemicsyn pandemicsyn changed the base branch from remove-dev-mode-from-kiloclaw-docs to main February 26, 2026 15:14
@pandemicsyn pandemicsyn merged commit 9de7f4a into main Feb 26, 2026
12 checks passed
@pandemicsyn pandemicsyn deleted the remove-dev-mode-from-kiloclaw-code branch February 26, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants