Skip to content

fix: correct hook p95 latency claim to per-platform reality#51

Merged
gnanirahulnutakki merged 2 commits into
devfrom
fix/A1-hook-p95-claim
Jun 25, 2026
Merged

fix: correct hook p95 latency claim to per-platform reality#51
gnanirahulnutakki merged 2 commits into
devfrom
fix/A1-hook-p95-claim

Conversation

@gnanirahulnutakki

Copy link
Copy Markdown
Member

Relates to #37 (left open — broader platform re-measurement still warranted).

What changed

The p95<10ms claim for the Claude Code hook was only accurate for
in-process compute (pure passport validation + scope check + receipt
emission, no IPC). The full native daemon-client path — where the
hook binary forks, connects to the daemon over a Unix socket, and parses
the response — measures ~15–17ms p95 on Apple Silicon macOS, not
<10ms.

Files changed

File Change
python/tests/test_claude_code_hook_latency.py Raise the test_claude_code_native_daemon_client_latency_target gate from p95<10ms to p95<20ms (brackets measured baseline, still catches regressions). Add explicit docstrings to both gated tests clarifying which path each one measures and why the numbers differ.
plugins/claude-code/README.md Replace vague "gated release test targets the native daemon-client path" with a split table: in-process <10ms vs. full client path <20ms, with test names.
site/content/source/plugins/claude-code/README.md Mirror of the README change.

Why not just fix the number everywhere?

The p95<10ms claim remains correct for the in-process hot-path test
(test_claude_code_daemon_hot_path_latency_target); that gate is
unchanged. The issue is that one gated test was labelled "defensible
p95<10ms release claim" while measuring the full round-trip path, which
is meaningfully slower.

Test results

762 passed, 28 skipped

(Latency benchmarks are skipped unless ARDUR_RUN_LATENCY_BENCH=1; the
4 pre-existing collection errors are unrelated to this change.)

Measured on Apple Silicon macOS, the full native daemon-client path
(binary exec + Unix-socket round-trip) runs at p95 ~15-17ms, not
<10ms.  The <10ms claim is only valid for the in-process compute path
(no IPC overhead).

- Raise the native daemon-client release gate from p95<10ms to p95<20ms,
  which brackets the measured Apple Silicon baseline while still catching
  regressions
- Update test_claude_code_native_daemon_client_latency_target docstring
  to state the per-platform measured numbers and clarify which claim
  boundary each test defends
- Add explicit docstring to test_claude_code_daemon_hot_path_latency_target
  explaining the <10ms gate applies to in-process compute only
- Update plugins/claude-code/README.md "Claim boundary" section with
  split per-path numbers (in-process <10ms, full client path <20ms)
- Mirror the README change to site/content/source/

Closes #37 for docs/test scope; full re-measurement on a wider platform
matrix should remain in the issue for tracking.
The site/content/source/ mirror must be regenerated via sync_source_docs.py
rather than edited by hand. The previous commit wrote the correct content
body but left the source_sha256 frontmatter stale.  Running the sync
script updates the SHA256 to match the new plugins/claude-code/README.md.
@gnanirahulnutakki gnanirahulnutakki merged commit 74a70a3 into dev Jun 25, 2026
23 checks passed
@gnanirahulnutakki gnanirahulnutakki deleted the fix/A1-hook-p95-claim branch June 25, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant