Skip to content

feat: graduate remote-control, minidb read model and search worker from experimental flags - #3552

Open
sailist wants to merge 1 commit into
MoonshotAI:mainfrom
sailist:refact-150-09-04-graduate-experiment-flags
Open

feat: graduate remote-control, minidb read model and search worker from experimental flags#3552
sailist wants to merge 1 commit into
MoonshotAI:mainfrom
sailist:refact-150-09-04-graduate-experiment-flags

Conversation

@sailist

@sailist sailist commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Related Issue

N/A (internal change)

Problem

Remote Control, the minidb session-index read model, and the search worker have been running as experimental flags (KIMI_CODE_EXPERIMENTAL_REMOTE_CONTROL, KIMI_CODE_EXPERIMENTAL_PERSISTENCE_MINIDB_READMODEL, KIMI_CODE_EXPERIMENTAL_SEARCH_WORKER). All three are stable enough to ship permanently: the read model and the search worker already default on, and Remote Control should not require an environment variable to unlock.

What changed

  • Remote Control is always available: kimi rc, kimi web --remote-control, and the /remote-control slash command work out of the box. The CLI env gate, the TUI experimentalFlag gate, and the flag registration (agent-core-v2/src/app/remoteControl/) are removed.
  • New [database] config section (agent-core-v2/src/persistence/configSection.ts): two kill switches, both defaulting to truebase (minidb session-index read model; false falls back to the legacy path) and search (global search in a dedicated worker thread; false runs it in the server process). Session-index services and GlobalSearchService now resolve through this section instead of the experimental flag registry; the latter picks its backend lazily after IConfigService.ready so config-sourced values actually apply.
  • Env vars renamed (dropping the EXPERIMENTAL infix): KIMI_CODE_PERSISTENCE_MINIDB_READMODEL and KIMI_CODE_SEARCH_WORKER, wired through the config system's env bindings (precedence: env > [database] config > default true). The old KIMI_CODE_EXPERIMENTAL_* names and the [experimental] keys silently stop applying.
  • Test harness fix: the agent-core-v2 test config stub now applies registered sections' env bindings (via the newly exported applySectionEnv), matching production ConfigService semantics — previously the read model was implicitly enabled in harness tests.
  • Docs (env-vars, config-files, remote-control guide, en+zh) and two minor changesets included.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue (external PRs: the issue must have a maintainer's /approve).
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot

changeset-bot Bot commented Sep 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 36eabde

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Sep 4, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@36eabde
npx https://pkg.pr.new/@moonshot-ai/kimi-code@36eabde

commit: 36eabde

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8a7e9050c6

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .changeset/database-config-section.md Outdated
"@moonshot-ai/kimi-code": minor
---

Add the `[database]` config section: `base = false` disables the session-index read model and `search = false` runs the global search index in the server process instead of a worker thread (both default to `true`). The kill-switch environment variables are renamed to `KIMI_CODE_PERSISTENCE_MINIDB_READMODEL` and `KIMI_CODE_SEARCH_WORKER`; the old `KIMI_CODE_EXPERIMENTAL_*` names no longer apply.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Reduce the changeset to one short sentence

This entry contains two long sentences and mixes the user-facing configuration addition with fallback mechanics and environment-variable migration details. Condense it to the single short statement required for release-note changesets so the generated changelog remains concise and compliant with the repository workflow.

AGENTS.md reference: AGENTS.md:L85-L86

Useful? React with 👍 / 👎.

…om experimental flags

- remote-control is always available: kimi rc, kimi web --remote-control and /remote-control no longer require KIMI_CODE_EXPERIMENTAL_REMOTE_CONTROL or the master flag
- add the [database] config section with base (session-index read model) and search (global search worker) kill switches, both defaulting to true
- rename the kill-switch env vars to KIMI_CODE_PERSISTENCE_MINIDB_READMODEL and KIMI_CODE_SEARCH_WORKER (precedence: env > config > default)
@sailist
sailist force-pushed the refact-150-09-04-graduate-experiment-flags branch from 8a7e905 to 36eabde Compare September 4, 2026 13:33
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.

1 participant