Skip to content

feat(plugin): add adaptive hook timeout tracking#951

Merged
JeremyDev87 merged 1 commit intomasterfrom
feat/hook-timeout-tracking-945
Mar 26, 2026
Merged

feat(plugin): add adaptive hook timeout tracking#951
JeremyDev87 merged 1 commit intomasterfrom
feat/hook-timeout-tracking-945

Conversation

@JeremyDev87
Copy link
Copy Markdown
Owner

Summary

  • Add HookTimer class in hook_timer.py with start/stop/get_stats/get_warnings methods
  • Track hook execution time with count, avg, p95, max statistics
  • Warn when hooks use >=80% of timeout threshold (default 10s)
  • Integrate hook_timings into SessionStats (record, flush, finalize, format_summary)
  • 17 new TDD tests (12 HookTimer unit + 5 stats integration)

Test plan

  • python3 -m pytest packages/claude-code-plugin/tests/test_hook_timer.py — 12 tests pass
  • python3 -m pytest packages/claude-code-plugin/tests/test_stats.py — 26 tests pass (5 new)
  • All 38 tests pass with no regressions
  • CI checks: lint, format, typecheck, test:coverage, circular, build — all pass

Closes #945

- Add HookTimer class with start/stop/get_stats/get_warnings methods
- Track hook execution time with count, avg, p95, max statistics
- Warn when hooks use >=80% of timeout threshold
- Integrate hook_timings into SessionStats (flush, finalize, format_summary)
- Add 17 new tests (12 HookTimer + 5 stats integration)

Closes #945
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
codingbuddy-landing Ready Ready Preview, Comment Mar 26, 2026 6:50am

@JeremyDev87 JeremyDev87 self-assigned this Mar 26, 2026
@JeremyDev87 JeremyDev87 merged commit a65b036 into master Mar 26, 2026
25 checks passed
@JeremyDev87 JeremyDev87 deleted the feat/hook-timeout-tracking-945 branch March 26, 2026 06:51
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.

feat: Adaptive hook timeout — track execution time and suggest adjustments

1 participant