Parent: #364
Depends on: #378
Problem
The informational Claude hook latency job currently prints only median/p95/p99 and assertion output. It does not preserve the raw sample distribution or a machine-readable report, and functional transport failures are mixed with statistical threshold failures in pytest output.
Without a durable artifact, reviewers cannot independently recompute percentiles, compare runner classes, or distinguish a native read failure from hosted-runner tail jitter.
Primary references, rechecked 2026-07-23:
Scope
In scope:
- Produce versioned machine-readable latency evidence for subprocess cold, native daemon-client, shell-wrapper telemetry, and in-process daemon hot paths.
- Record every raw duration sample in deterministic ordinal order.
- Record the percentile method, configured thresholds, and recomputable median/p95/p99.
- Record bounded runner metadata: source SHA, event, run ID/attempt, runner OS/architecture,
ImageOS, ImageVersion, and exact Python implementation/version.
- Represent functional failures separately from statistical threshold violations.
- Preserve partial evidence when a warmup or measured call fails.
- Write reports atomically under
${{ runner.temp }}.
- Upload the report directory with
if: always() using the repository's digest-pinned actions/upload-artifact.
- Keep the job informational.
Out of scope:
Acceptance criteria
Targeted tests
- Report schema/version and required-field tests.
- Raw-sample ordering, count, finiteness, and percentile recomputation tests.
- Functional-error fixture distinct from threshold-violation fixture.
- Partial-report persistence after a simulated native failure.
- Metadata allowlist and host-path/token redaction tests.
- Workflow contract test proving
if: always(), digest-pinned upload action, ${{ runner.temp }} output, bounded retention, and no silent missing-file behavior.
- Focused latency-report tests, Ruff, pre-commit,
check-local.sh --quick, and YAML validation.
A base-revision red proof should show that raw-report and artifact-contract tests fail on unmodified dev.
Security and cost
Do not serialize environment variables wholesale. Reports must exclude tokens, mission passports, request bodies, tool arguments, usernames, absolute executable paths, socket paths, and temporary-directory paths.
This child must not add benchmark repetitions or runner jobs. Raw JSON for existing bounded samples should be small. Retention must remain explicit and bounded because artifact storage accrues cost.
Dependencies and overlap
Parent: #364
Depends on: #378
Problem
The informational Claude hook latency job currently prints only median/p95/p99 and assertion output. It does not preserve the raw sample distribution or a machine-readable report, and functional transport failures are mixed with statistical threshold failures in pytest output.
Without a durable artifact, reviewers cannot independently recompute percentiles, compare runner classes, or distinguish a native read failure from hosted-runner tail jitter.
Primary references, rechecked 2026-07-23:
Scope
In scope:
ImageOS,ImageVersion, and exact Python implementation/version.${{ runner.temp }}.if: always()using the repository's digest-pinnedactions/upload-artifact.Out of scope:
Acceptance criteria
continue-on-errorand excluded from the blockingtestsaggregate.Targeted tests
if: always(), digest-pinned upload action,${{ runner.temp }}output, bounded retention, and no silent missing-file behavior.check-local.sh --quick, and YAML validation.A base-revision red proof should show that raw-report and artifact-contract tests fail on unmodified
dev.Security and cost
Do not serialize environment variables wholesale. Reports must exclude tokens, mission passports, request bodies, tool arguments, usernames, absolute executable paths, socket paths, and temporary-directory paths.
This child must not add benchmark repetitions or runner jobs. Raw JSON for existing bounded samples should be small. Retention must remain explicit and bounded because artifact storage accrues cost.
Dependencies and overlap
.github/workflows/tests.yml. PR ci(deps): bump actions/setup-python from 6.3.0 to 7.0.0 #358 edits the latency job's setup block directly; this child must wait, coordinate, or rebase cleanly and must not overwrite either PR.actions/upload-artifactpin and artifact conventions.