Skip to content

troubleshoot: enrich log analysis and reporting (select/release inference, cache cross-diagnosis, detailed outputs) - #15

Merged
mouxinqq merged 2 commits into
developfrom
codex/modify-troubleshoot-for-skills-alignment-3mc6m8
Apr 13, 2026
Merged

mouxinqq merged 2 commits into
developfrom
codex/modify-troubleshoot-for-skills-alignment-3mc6m8

Conversation

@mouxinqq

Copy link
Copy Markdown
Owner

Motivation

  • Improve accuracy of select/release matching and worker-type attribution so counter/token metrics and unmatched events are less noisy.
  • Provide richer cache/load/health/trace diagnostics and exportable detail files for deeper offline investigation.
  • Make reports clearer about metric semantics and surface useful quick-impact info (e.g. YAML missing, detection latency).

Description

  • Enhanced log_parser.match_select_release to infer release types and token release ownership, infer worker dominant types, expose unmatched_releases, and include richer id_coverage, type_summary, and worker_type_profile outputs, plus unit sample in self-test to validate token release inference.
  • Added release/type inference helpers _infer_release_worker_type and _infer_token_release_worker_type in log_parser.py and improved matching logic to reduce unknown type counts.
  • Extended load analyzers (load.py, load_report.py) to parse request-count select/release (count:), compute counter last-state (_analyze_counter_last_state), include counter_last_state in detail reports, and surface worker-type profiles and unmatched release lists in summaries and detail files.
  • Added cross-diagnosis in cache analyzer (cache.py) via _analyze_cross_diagnosis and integrated detailed detail/cache_diagnosis.md output and links from the summary.
  • Improved errors analyzer (errors.py) with source-impact mapping (IMPACT_RULES), classify_impact, and URL extraction for error templates, and surfaced Failed to read YAML file config/register.yaml as a special low-impact note.
  • Health analyzer (health.py) now collects register events into timelines and computes detection latency _compute_detect_latency, adding a "detection latency" column to the worker table and detail output.
  • Trace analyzer (trace.py) now runs match_select_release for each trace and includes select/release checks in trace diagnoses and detail data.
  • Latency and errors reports annotated with metric definitions and link pointers to detailed diagnosis files.
  • Chart/table rendering tweak in chart.py to adjust Markdown table separator alignment for right-aligned columns.
  • Central report assembly (troubleshoot.py) expanded to collect and write multiple detail files under detail/ (e.g. load_select_release.md, load_counter_state.md, cache_* files, errors_topn.md, latency_diagnoses.md, and trace files) and to deduplicate DEGRADED reasons and add status definitions.
  • Documentation snippets updated (error_catalog.md, log_patterns.md, report_templates.md) to reflect new messages, select/release log formats, and detail file layout.

Testing

  • Ran log_parser.py self-test which includes the new token-release/type inference sample and basic parse/normalize checks, and it passed locally.
  • Performed a quick smoke run of scripts/troubleshoot.py on sample logs to generate the summary and detail/ files (errors, load, cache, trace), and verified the new detail files are produced and referenced from the summary.
  • No failing automated tests observed during the above smoke/self-test steps.

Codex Task

@mouxinqq
mouxinqq merged commit e5ae147 into develop Apr 13, 2026
1 of 2 checks passed

This branch had an error being deployed

1 failed deployment
Metax_ci 92efef68 Deployed Apr 13, 2026 by mouxinqq via Trigger Jenkins for PR #22
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