Skip to content

troubleshoot: ensure cache detail files are always emitted, add --trace all auto-discovery, and expand interactive/usage docs - #19

Merged
mouxinqq merged 1 commit into
developfrom
codex/update-troubleshoot-in-golang_router
Apr 13, 2026
Merged

mouxinqq merged 1 commit into
developfrom
codex/update-troubleshoot-in-golang_router

Conversation

@mouxinqq

Copy link
Copy Markdown
Owner

Motivation

  • Make the Router troubleshooting skill produce stable, predictable output files and links for Cache diagnostics even when there are no samples, to avoid broken links and missing detail files.
  • Provide a convenient --trace all mode to auto-discover trace targets for full-trace workflows.
  • Improve user interaction/usage docs and prompts to clarify time-range selection, trace input behavior, and output layout.

Description

  • Updated documentation in .claude/skills/troubleshoot/SKILL.md to move important notes into the header and to expand interactive prompts for log path, time-range selection (including discrete AskUserQuestion options), trace input guidance, and default output directories.
  • Enhanced cache report templates in references/report_templates.md to require section presence even when counts are zero and to add eviction/交叉诊断 requirements.
  • Modified cache analyzer in scripts/analyzers/cache.py to always include summary sections and stable detail links, to emit human-readable placeholder messages when data is missing, and to write more granular detail sections (cache_session_stickiness.md, cache_suboptimal.md, cache_eviction.md, cache_fallback.md, cache_cross.md).
  • Adjusted report assembly in scripts/troubleshoot.py so detail files for cache are constructed consistently (with placeholders when empty), and changed file-write guards to write these detail files when keys are present (checking is not None).
  • Added --trace all support by updating CLI help text and implementing _discover_full_trace_targets in scripts/analyzers/trace.py to discover session/trace/request IDs and return a human-readable auto-discovery summary appended to the trace summary.
  • Minor CLI/help and comment tweaks to reflect the new trace behavior and to document that --trace supports all.

Testing

  • Ran automated smoke test: executed python3 .claude/skills/troubleshoot/scripts/troubleshoot.py <sample_log> --cache against a sample log with no cache samples and verified the report summary/troubleshoot_report.md and detail files (detail/cache_session_stickiness.md, detail/cache_suboptimal.md, detail/cache_eviction.md, detail/cache_fallback.md, detail/cache_cross.md) were produced and contained the placeholder messages; test succeeded.
  • Ran automated trace discovery smoke test: executed python3 .claude/skills/troubleshoot/scripts/troubleshoot.py <sample_log> --trace all and verified that _discover_full_trace_targets returned targets and the main summary included the auto-discovery summary; test succeeded.
  • Performed a basic end-to-end run combining --tail and --cache to validate time-window handling and file outputs; run succeeded.

Codex Task

@mouxinqq
mouxinqq merged commit 980d0ff into develop Apr 13, 2026
20 of 25 checks passed

This branch had an error being deployed

1 failed deployment
Metax_ci fe3c0d1d Deployed Apr 13, 2026 by mouxinqq via Trigger Jenkins for PR #28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant