Skip to content

Commit f1de83d

Browse files
chore(Mountain): Add payload preview to notif-drop logging and register benign ENOENT paths
Two logging improvements for Mountain's developer diagnostics: 1. **Notif-drop payload preview**: When a notification falls through to the Cocoon event handler, include a truncated payload preview (160 bytes max) in the dev log. This helps diagnose which new upstream notifications are reaching the catch-all without needing a second debug run. 2. **Benign ENOENT paths**: Register additional file paths that commonly return ENOENT but aren't errors: - MCP config files (.vscode/mcp.json, .mcp.json) - User snippets and keybindings (/User/snippets, /User/keybindings.json) - AI-generated workspace storage (aiGeneratedWorkspaces.json) - Git config for non-repo folders (/.git/config) These paths reduce noise in dev logs while preserving signal for genuine file-access issues.
1 parent 7702511 commit f1de83d

2 files changed

Lines changed: 26 additions & 5 deletions

File tree

Source/IPC/DevLog.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,8 @@ const BENIGN_ENOENT_SUBSTRINGS:&[&str] = &[
487487
".vscode/launch.json",
488488
".vscode/extensions.json",
489489
".vscode/tasks.json",
490+
".vscode/mcp.json",
491+
".mcp.json",
490492
"agentPlugins",
491493
"agent-plugins",
492494
"chatEditingSessions",
@@ -501,6 +503,15 @@ const BENIGN_ENOENT_SUBSTRINGS:&[&str] = &[
501503
// `resolve_userdata`.
502504
"/User/tasks.json",
503505
"/User/mcp.json",
506+
"/User/snippets",
507+
"/User/keybindings.json",
508+
// Workspace-storage sidecar files the workbench stats on every project
509+
// open - absent until the AI-generated-workspace feature writes one.
510+
"aiGeneratedWorkspaces.json",
511+
// Git extension probes `.git/config` on every workspace folder to
512+
// detect whether the folder is a git worktree; ENOENT is the
513+
// normal "not a git repo" signal, not an error.
514+
"/.git/config",
504515
// Chat language-model registry is written on first chat interaction.
505516
// Absent on fresh profiles; VS Code reads-before-first-write every boot.
506517
"chatLanguageModels.json",

Source/Vine/Server/MountainVinegRPCService.rs

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -831,15 +831,25 @@ impl MountainService for MountainVinegRPCService {
831831
// event that Wind may or may not listen for. The
832832
// `notif-drop` tag surfaces every fall-through so we can
833833
// tell at a glance which notifications Cocoon emits that
834-
// Mountain has no first-class handler for (register_*
835-
// provider variants beyond the seven handled above,
836-
// register_debug_adapter, register_task_provider,
837-
// register_uri_handler, register_file_system_provider, …).
834+
// Mountain has no first-class handler for. The large OR
835+
// match above covers every `register_*` / `register_*_provider`
836+
// variant the Cocoon vscode-API shim is known to emit;
837+
// anything reaching here is either a new upstream addition or
838+
// an `unregister_*` / generic notification without a typed
839+
// handler. Payload preview included so diagnosis doesn't need
840+
// a second run.
841+
let PayloadPreview = if NotificationData.parameter.len() <= 160 {
842+
String::from_utf8_lossy(&NotificationData.parameter).into_owned()
843+
} else {
844+
let Slice = &NotificationData.parameter[..160];
845+
format!("{}…", String::from_utf8_lossy(Slice))
846+
};
838847
dev_log!(
839848
"notif-drop",
840-
"[NotifDrop] method={} payload_bytes={} (falls through to cocoon:{} event)",
849+
"[NotifDrop] method={} payload_bytes={} preview={:?} (falls through to cocoon:{} event)",
841850
MethodName,
842851
NotificationData.parameter.len(),
852+
PayloadPreview,
843853
MethodName
844854
);
845855
// Forward all unknown notifications as Tauri events so Wind

0 commit comments

Comments
 (0)