Conversation
…factor default model fallback
# Conflicts: # profiles/default/systems/runtime/launch-process.ps1
There was a problem hiding this comment.
Pull request overview
Adds centralized, structured error logging (JSONL) across the MCP server, runtime processes, and provider CLI wrappers, and surfaces that log in the web dashboard via new API endpoints and an “Errors” tab.
Changes:
- Introduces
ErrorLogger.psm1(write/read/summary/clear + rotation) and integratesWrite-ErrorLoginto MCP/runtime/CLI error paths. - Adds UI server endpoints (
/api/errors,/api/errors/clear,/api/errors/summary) and state polling support for an error summary/badge. - Implements a new dashboard “Errors” tab (JS module, HTML layout, CSS styling) with filtering, pagination, and clearing.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| profiles/default/systems/ui/static/modules/ui-updates.js | Updates UI polling to refresh the error badge from state. |
| profiles/default/systems/ui/static/modules/tabs.js | Triggers error fetch when switching to the Errors tab. |
| profiles/default/systems/ui/static/modules/errors.js | New client module to fetch/render/clear error log entries in the UI. |
| profiles/default/systems/ui/static/index.html | Adds Errors tab + context panel markup and loads errors.js. |
| profiles/default/systems/ui/static/css/views.css | Adds styling for the Errors tab, entries, and badge. |
| profiles/default/systems/ui/static/app.js | Initializes the Errors module on page load. |
| profiles/default/systems/ui/server.ps1 | Adds API routing for error log endpoints and loads ErrorLogAPI module. |
| profiles/default/systems/ui/modules/StateBuilder.psm1 | Adds error_summary to /api/state output (for badge/polling). |
| profiles/default/systems/ui/modules/ErrorLogAPI.psm1 | New API layer for reading/clearing/summarizing the error log. |
| profiles/default/systems/runtime/modules/ErrorLogger.psm1 | New central JSONL error log writer/reader with rotation and summary. |
| profiles/default/systems/runtime/launch-process.ps1 | Logs key runtime/process failures to the central error log. |
| profiles/default/systems/runtime/ClaudeCLI/ClaudeCLI.psm1 | Adds structured logging for CLI process start/rate-limit/stream errors. |
| profiles/default/systems/mcp/dotbot-mcp.ps1 | Logs MCP tool/server-loop failures to the central error log. |
| profiles/default/systems/mcp/core-helpers.psm1 | Logs tool envelope errors to the central error log in New-EnvelopeResponse. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
|
Also have a look at https://github.com/andresharpe/dotbot-v3/blob/claude/dotbot-refactor-planning-kKO9U/docs/DOTBOT-V4-phase-01-structured-logging.md ... and see if we can match criteria? |
# Conflicts: # profiles/default/systems/ui/server.ps1
@andresharpe |
Resolves #27
This pull request introduces structured error logging across the MCP toolchain and runtime scripts by integrating the
ErrorLoggermodule. The changes ensure that errors are consistently captured and logged with context, improving traceability and debugging. The most important changes are grouped below by theme.ErrorLogger integration:
ErrorLogger.psm1module incore-helpers.psm1,dotbot-mcp.ps1,ClaudeCLI.psm1, andlaunch-process.ps1to enable structured error logging throughout the system. [1] [2] [3] [4]Structured error logging in tool and process errors:
New-EnvelopeResponseincore-helpers.psm1to log errors usingWrite-ErrorLog, normalizing error objects and providing tool context.dotbot-mcp.ps1(Invoke-CallTool,Start-McpServerLoop) to log tool execution and server loop errors with relevant codes and exception details. [1] [2]Runtime and process error logging:
launch-process.ps1, ensuring that all critical runtime errors are logged with context such as process and task IDs. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]ClaudeCLI error logging:
ClaudeCLI.psm1for process start failures, rate limit events, stream event and line processing errors, usingWrite-ErrorLogfor improved visibility and debugging. [1] [2] [3] [4]