Skip to content

Split report outputs into summary/detail, add session_id fallback and markdown report improvements - #8

Merged
mouxinqq merged 2 commits into
developfrom
codex/refactor-stats-cache-hitratio-structure-m2lbgv
Apr 12, 2026
Merged

mouxinqq merged 2 commits into
developfrom
codex/refactor-stats-cache-hitratio-structure-m2lbgv

Conversation

@mouxinqq

Copy link
Copy Markdown
Owner

Motivation

  • Prevent overwriting historical exports by making --output an output base and creating timestamped summary and detail subdirectories per run.
  • Improve session-level analysis by falling back to trace_id when session_id is absent and surfacing the identifier type.
  • Make exported reports easier to read and navigate by producing Markdown tables, summary/detail split, and intra-report links for session switch details.

Description

  • Updated documentation in SKILL.md for stat-cache-hitrate and troubleshoot to document that --output is treated as a base directory and that runs create <timestamp>/summary and <timestamp>/detail subfolders.
  • In session_analysis.py changed session aggregation to use session_id if present or fall back to trace_id, store a unified session key as identity and add id_type to rows.
  • In stat_cache_hitrate.py added helpers _render_markdown_table, _truncate_text, and _seq_label, removed the coverage field from compute_session_hitrate output, and updated report rendering to write main report to summary/cache_hitrate_report.md and per-window/session details to detail/*, including a prioritized session table, id-to-session mapping, and per-session switch sections.
  • In troubleshoot/scripts/troubleshoot.py changed save_detailed_report to write to summary/troubleshoot_report.md and to emit details under detail/, and updated main logic to assemble output_base + timestamp into the run output path.

Testing

  • No automated tests were run for these changes.

Codex Task

@mouxinqq
mouxinqq merged commit 8a5ddea into develop Apr 12, 2026
20 of 25 checks passed

This branch had an error being deployed

1 failed deployment
Metax_ci 08390617 Deployed Apr 12, 2026 by mouxinqq via Trigger Jenkins for PR #10
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