Repository navigation
feat: turn off filesystem watch by default - #3931
Merged
liruifengv merged 2 commits intoSep 19, 2026
Merged
Conversation
🦋 Changeset detectedLatest commit: d317897 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
commit: |
Merged
7723qqq
added a commit
to 7723qqq/kimi-code
that referenced
this pull request
Sep 21, 2026
…itle Two deltas against upstream@88a7d932f1 (the local ref; a fresh fetch of upstream/main was blocked by the network, so the comparison covers the 16 commits reachable through the GitHub compare API): - MoonshotAI#3929 removed the project-root assertion from the system prompt: the cwd line no longer claims to be the project root and no longer promises a two-level listing. prompt/system.md still carried the old sentence. - MoonshotAI#3962 added the `auto_session_title` config option back after it had graduated out. The fork's AI-title path (session/title.rs) landed without the switch, so the key is now plumbed end to end the same way `telemetry` is: KimiConfig (absent = enabled, explicit false disables), the node-sdk config schema and patch, the protocol REST config response/patch schemas, the config-mapper domain list, and both doc locales. The engine only generates titles when the host asks (session/generate_title), so the flag is the host's gate — upstream plumbs it without an in-tree consumer either. Also checked and found not applicable: MoonshotAI#3931 (filesystem watch off by default) — the fork has no filesystem watch feature at all, so there is no default to flip; recorded so a future port starts from off. Tests: auto_session_title_parses_and_defaults_to_enabled (absent/explicit false/camelCase); cargo test --lib 2813 pass; protocol 565 and node-sdk 282 pass; scan-parity OK with config keys 30 -> 31 on both sides; fmt; clippy -D warnings clean.
7723qqq
added a commit
to 7723qqq/kimi-code
that referenced
this pull request
Sep 22, 2026
…nshotAI#3869) The 0.30-2.0.2 audit's not-applicable list was challenged on the grounds that some entries were missing modules rather than inapplicable bugs — and MoonshotAI#3869 was worse than either: a live permission divergence. The fork's DangerousVerdict had only Dangerous/Safe (its lexer has no parse failure), so an unanalyzable command was allowed in EVERY mode, while v2 asks in every non-yolo mode. DangerousVerdict gains Unanalyzable — an unbalanced quote, or a command name that is not a literal after wrapper stripping ($CMD --force only knows what it runs at execution time). analyze_bash_command aggregates dangerous-wins, unanalyzable-next, safe-fallback. The policy asks with a distinct reason unless the mode is Yolo, where it falls through to YoloModeApprove (v2 dangerous-command-ask.ts:144). The same audit pass re-classified three genuinely-missing modules from not-applicable to tracked (accepted debt in ROADMAP §6.1): LLM timing instrumentation (MoonshotAI#3938), the internal filesystem watch (MoonshotAI#3931/MoonshotAI#3892), and tower usage telemetry (#3847b) — the allowlist's own vocabulary distinguishes these, and the old labels conflated them.
7723qqq
added a commit
to 7723qqq/kimi-code
that referenced
this pull request
Sep 22, 2026
The last tracked-debt item could not be paid without inventing surface. v2 watches files because it caches AGENTS.md / skills / agent profiles across turns and must invalidate them; the fork rebuilds the system prompt — cascade and skills scan included — on every turn (build_session_system_prompt runs per JsRunTurnParams; the server path answers the same per turn), so there is no stale cache for a watcher to invalidate. Restoring the module would add a consumer-less watcher plus [watch] enabled / KIMI_CODE_WATCH knobs that control nothing. The §7.3 removal therefore stands as the correct end state rather than debt; the allowlist entries for MoonshotAI#3931 / MoonshotAI#3892 are re-classified with that evidence (gate: ported=21 / not-applicable=9, tracked=0 — the audit's debt list is fully settled).
5 tasks done
4 of 6 tasks
7723qqq
pushed a commit
to 7723qqq/kimi-code
that referenced
this pull request
Oct 5, 2026
Step 9 of the incremental sync to 2.1.1: 24 upstream commits over 321 files. The step brings the TUI mode setting, the jump-to-bottom indicator, click-to-toggle transcript folds, banner audience targeting and the workspace-trust hardening. Upstream's changes in this step, all absorbed: - add a TUI mode setting for the fullscreen layout (MoonshotAI#4004) - add a jump-to-bottom indicator and a steady status row (MoonshotAI#3989) - toggle one transcript fold block with a click (MoonshotAI#3990) - support audience targeting for startup banners (MoonshotAI#3868) - harden workspace trust boundaries across git, file tools and the local web server (MoonshotAI#3964) - turn off filesystem watch by default (MoonshotAI#3931) - add the auto_session_title config option (MoonshotAI#3962) - prepend a wall-time header to persisted tool results (MoonshotAI#3966) - report enabled plugins and plugin toggles in telemetry (MoonshotAI#3963) - include step timing and usage in cold-folded steps (MoonshotAI#3938) - restore swarm members from persisted lifecycle events (MoonshotAI#3970) - enforce tower protocol invariants and deny AgentSwarm (MoonshotAI#3976) - inherit titleKind for default fork titles (MoonshotAI#3974) - request offline_access in MCP OAuth when the authorization server advertises it (MoonshotAI#3979) - cut CLI startup time and memory in the native binary and config reads (MoonshotAI#3975) - avoid a stack overflow when caching large wire files (MoonshotAI#3957) - reject non-ASCII mission titles and record token usage (MoonshotAI#3847) - pick the credential slot and relay from the login region (MoonshotAI#3969) - add the KIMI_CODE_REPEAT_BREAKER env switch (MoonshotAI#3995) - update the kimi-webbridge plugin to the 2.0.11 skill (MoonshotAI#3961) - restructure the PR template and add the write-pr and review-pr skills (MoonshotAI#3992) Fork behaviour that had to survive: - the TUI controller split: upstream's rewritten activity-pane logic (braille thinking/composing spinners, the shared loading-tip kind) was ported into the fork's ActivityPaneController, and KimiTUI keeps delegating to it - the i18n layer: the new TUI mode setting, its picker, the restart notice and the settings entry all go through `t()` with en/zh entries - the fork's node-local → host rename: the upstream test files that still imported `#/os/backends/node-local/hostFsService` now point at `#/os/backends/host/hostFsService` - the fork's inline media reading: upstream's realpath guard for the media tool is covered by a ReadTool-based symlink-escape test - the fork's removePlugin deletes the plugin root from disk, so the new toggle-telemetry fixture keeps its root inside the managed directory - the Bun toolchain: the retired Node SEA chain stays retired Verified: typecheck clean across every package and app; full suite 17831 passed / 0 failed / 81 skipped / 1 todo, plus kimi-inspect's own 115 tests; lint 0 errors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue
No linked issue — internal change.
Problem
Filesystem watchers that hot-reload
local.toml,AGENTS.md, skills, MCP config, andconfig.tomlare on by default. On some environments (notably Windows with deep home/project directories) the recursive watching adds constant event pressure, so the default should be off; users who want hot reload can opt in explicitly.What changed
[watch] enabled/KIMI_CODE_WATCHswitch now defaults to off: with no config and no env var, the process attaches no filesystem watchers and file changes are picked up only after restart.KIMI_CODE_WATCH=1or[watch] enabled = trueexplicitly turns watching back on; the env var keeps its higher priority over the config file.config-files,env-vars, both locales) updated to describe the new default.Checklist
/approve).gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.