Skip to content

Enhance session reporting and table rendering; add time-range selection in skill metadata - #11

Merged
mouxinqq merged 2 commits into
developfrom
codex/update-stats-cache-hitratio-markdown-summary-j1wwvx
Apr 12, 2026
Merged

mouxinqq merged 2 commits into
developfrom
codex/update-stats-cache-hitratio-markdown-summary-j1wwvx

Conversation

@mouxinqq

Copy link
Copy Markdown
Owner

Motivation

  • Improve session-level diagnostics by recording request time ranges and prefill URL counts to make reports more actionable.
  • Make the interactive skill more explicit about time-range analysis and AskUserQuestion options so clients reliably surface the --start/--end mode.
  • Improve Markdown table rendering to produce aligned, readable tables for wide columns in generated reports.

Description

  • Update skill metadata (.claude/skills/stat-cache-hitrate/SKILL.md) to add --start/--end time-range mode, require discrete AskUserQuestion options for analysis modes, and clarify output and field names in the session detail description.
  • Extend session record generation in session_analysis.py to include first_ts, last_ts, and prefill_url_count for each session row returned by compute_session_details.
  • Refactor table rendering in stat_cache_hitrate.py by replacing the simple Markdown header/row construction with a width-aware renderer that pads columns and supports right alignment via align_right.
  • Add helpers _seq_label, _extract_seq_num, and _summarize_id_type_ranges to produce compact id-type range summaries and consistent sequence IDs for sessions shown in reports.
  • Enhance session report generation in stat_cache_hitrate.py to: compute and display overall analysis time range, summarize contiguous id-type ranges, include purl_cnt and avg-hit columns in compact and full tables, replace some column names for clarity, and include per-session time ranges in the switch details section.

Testing

  • Performed a local smoke test by running python3 .claude/skills/stat-cache-hitrate/scripts/stat_cache_hitrate.py sample.log --tail 100 and verified the script completed and produced the skill_output/stat-cache-hitrate/ report files without exceptions.
  • No new unit tests were added in this change set.

Codex Task

@mouxinqq
mouxinqq merged commit c4fb2a0 into develop Apr 12, 2026
5 of 9 checks passed

This branch had an error being deployed

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