troubleshoot: ensure cache detail files are always emitted, add --trace all auto-discovery, and expand interactive/usage docs - #19
Merged
Conversation
This branch had an error being deployed
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.
Motivation
--trace allmode to auto-discover trace targets for full-trace workflows.Description
.claude/skills/troubleshoot/SKILL.mdto 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.references/report_templates.mdto require section presence even when counts are zero and to add eviction/交叉诊断 requirements.scripts/analyzers/cache.pyto 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).scripts/troubleshoot.pyso 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 (checkingis not None).--trace allsupport by updating CLI help text and implementing_discover_full_trace_targetsinscripts/analyzers/trace.pyto discover session/trace/request IDs and return a human-readable auto-discovery summary appended to the trace summary.--tracesupportsall.Testing
python3 .claude/skills/troubleshoot/scripts/troubleshoot.py <sample_log> --cacheagainst a sample log with no cache samples and verified the reportsummary/troubleshoot_report.mdand 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.python3 .claude/skills/troubleshoot/scripts/troubleshoot.py <sample_log> --trace alland verified that_discover_full_trace_targetsreturned targets and the main summary included the auto-discovery summary; test succeeded.--tailand--cacheto validate time-window handling and file outputs; run succeeded.Codex Task