Conversation
The warn default filters out nearly every runtime event; info surfaces process/session lifecycle, adapter transport and approval nodes while keeping the COSH_LOG > RUST_LOG > TOML priority chain unchanged. Signed-off-by: Kailong Zhou <zhoukailong.zkl@alibaba-inc.com> Assisted-by: Qoder <noreply@qoder.io>
Errors converging on the service loop, registry transport, recovery state transitions and the core output thread previously reached only the UI event channel, leaving logs empty when cosh-shell quit silently. Record them at the choke-points and document the info event checklist and warn/error dual-write policy in AGENTS.md. Signed-off-by: Kailong Zhou <zhoukailong.zkl@alibaba-inc.com> Assisted-by: Qoder <noreply@qoder.io>
Panics only reached stderr, which the TUI consumes, so crashes left no
durable evidence. Append one JSON line per panic to
~/.copilot-shell/cosh-{shell,core}-crash.log from the panic hooks and
chain the previous hook; the doctor crashes collector reads the file.
Signed-off-by: Kailong Zhou <zhoukailong.zkl@alibaba-inc.com>
Assisted-by: Qoder <noreply@qoder.io>
Write atomic <kind>-<pid>.json entries under ~/.copilot-shell/run/ so doctor can pair shell and core offline and detect leftovers from abnormal exits. Shells record routing facts and the spawned core pid; cores record the owner shell pid via COSH_SHELL_PID. Entries are removed on clean shutdown and stale dead-pid entries older than 7 days are cleaned at startup. Signed-off-by: Kailong Zhou <zhoukailong.zkl@alibaba-inc.com> Assisted-by: Qoder <noreply@qoder.io>
Add two environment collectors: runtime (live shell/core pairing, stale run-registry entries, 24h crash records as critical findings) and logs (bounded tail scan of the daily log files for 24h WARN/ERROR counts, a redacted error sample, and write-freshness facts). Doctor, /health and diagnostics export share the findings through run_env_collectors; crash records exit 2, other runtime anomalies warn. Signed-off-by: Kailong Zhou <zhoukailong.zkl@alibaba-inc.com> Assisted-by: Qoder <noreply@qoder.io>
Extend the /health slash command with a live block that only a running session can observe: core liveness via a registry query that never falls back to a short-lived child, session recovery state, and shell routing facts (AI/assistance/integration, marker generation, zsh command-not-found handler ownership, last route decision). A live core combined with routing facts that explain a fallback is reported as a named finding — routing compatibility fallback, not a provider failure. The live-registry timeout path now releases the busy flag so a core that dies mid-turn cannot force probes onto the short-child path and report the dead core as healthy. Routing facts reach exports offline through the run-registry snapshot; transient live probes stay out. Signed-off-by: Kailong Zhou <zhoukailong.zkl@alibaba-inc.com> Assisted-by: Qoder <noreply@qoder.io>
Rework `cosh-shell doctor` from a bare findings list into a readable diagnostic report. The render layer now assembles a static fact header between the status line and the checks list: version and host from the binary, runtime and routing from the on-disk run registry (live pid-alive entries, AI/integration/command-not-found-handler/last-route facts), log level plus 24h ERROR counts and freshness from the daily logs, and a 24h crash count with timestamps. The machine contract is unchanged (`status:`/`checks:` lines, `[warning]`/`[critical]`/ `[unavailable]` labels, exit codes 0/1/2), and the header is pure local reads so bundle/doctor consistency tests stay valid. When findings or unavailable checks exist, a final line points at `cosh-shell diagnostics export` for evidence collection; `/help` gains a one-line diagnostics hint (in-session /health first, then doctor). Eleven new MessageIds carry the en/zh wording. Signed-off-by: Kailong Zhou <zhoukailong.zkl@alibaba-inc.com> Assisted-by: Qoder <noreply@qoder.io>
Ship the bilingual user troubleshooting guide (en/zh) that turns the new diagnostics evidence into a procedure. It organizes the failure classes cosh-ng can suffer silently — a shell exit without an error, leftover cosh-core processes, and input that stops routing to the Agent — into a three-step SOP: run /health or cosh-shell doctor, read the on-disk evidence (~/.copilot-shell logs, crash logs, run registry), and export a redacted bundle with --since-hours when the incident predates the 24h window. A zsh input-routing matrix carries the issue agentic-os-org#3055 differential probe (?? versus bare natural-language input, _COSH_AI_ENABLED and _COSH_HAS_USER_COMMAND_NOT_FOUND) and its interpretation branches. The doctor export hint and the /help diagnostics line now carry the guide path, and both README indexes link the new page. Signed-off-by: Kailong Zhou <zhoukailong.zkl@alibaba-inc.com> Assisted-by: Qoder <noreply@qoder.io>
|
PR number: #3312 Findings
Validation未执行本地验证。当前状态显示完整 |
|
PR number: #3312 1. 验证范围
2. 结果分类失败
3. Findings 验证
4. 补充测试无。 5. 证据索引未生成截图;证据目录为空。 6. 未运行 scope
7. 结论No-Go — focused |
This PR introduces a comprehensive diagnostics and health troubleshooting experience for cosh-ng.
What changed:
Validation:
no-issue: internal diagnostics improvement