Repository navigation
test(ui-server): hold the integrated reference cell's latency to measured thresholds (#3513) - #4103
Merged
Merged
Conversation
…egrated reference cell (#3513) The integrated cell's repository gains three incompressible charts, its first turn ends with a warm read of the same source, and the parent samples /api/health, WebSocket ping/pong, the pool's sysfs peak allocation and the pool device's block I/O through every turn on both backends. The child times each reference tool call at the model boundary. The measurements land in reference-integration-latency.json and are held to INTEGRATED_TOLERANCES. The cell also makes its artifact tree readable on exit, so the receipt upload survives the app's owner-only data, and prints the app's warnings into the job log. Ported from the instrument branch onto main after #4072 and #4079. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ence cell's baseline (#3513) Reverted before the PR is ready. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…osted baseline (#3513) INTEGRATED_TOLERANCES now comes from the hosted runtime_host baseline: two integrated cells per backend at ea71984 (draft heavy feedback run 43969834503). Each bound records the worst measured value beside it. The warm source bound is per backend, because Pi's model-boundary time includes its agent loop's round trip through the offline provider. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ll's tolerances (#3513) Each backend's integrated cell runs once with the measured bounds, which must pass, and once with one bound set below its measured value, which must fail first on that bound's named assertion. Reverted before the PR is ready. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 16, 2026
…latency-thresholds
schlessera
marked this pull request as ready for review
November 17, 2026 00:23
This was referenced Nov 17, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3513
What changed
The integrated reference cell (
scripts/native-proof/reference-integration.native.ts) now runs under the Git workload of #3513 on both backend tool paths. Its repository gains three incompressible 2 MiB charts. Its first turn ends with a warm read of the same source. Through every turn the parent samplesGET /api/health, WebSocketping/pong, the pool's peak physical allocation (from sysfs, never through the manager) and the pool device's block I/O. The child times each reference tool call at the model boundary. The results land inreference-integration-latency.jsonwith kernel, btrfs-progs, Git, Bun and candidate identities, and are held toINTEGRATED_TOLERANCES.This is the last remaining criterion of #3513. #3676 delivered allocation and reuse (case 19), and #4072 delivered EDQUOT, cancellation, crash recovery and per-step I/O. #4079 (PR #4080) removed the blocker that refused the cell's first
reference_sourcecall on hosted runners.Why this shape
The instrument was written on
test/3513-integrated-latencybefore #4072 merged. It is ported onto main as one commit rather than rebased, because the case-19 parts of that branch already landed through #4072's squash.Warm-read bounds are per backend. Claude's time is the MCP call alone (2 ms). Pi's time includes its agent loop's round trip through the offline provider, about 0.7 s on any step.
Both TEMPORARY probe commits (ea71984 baseline, 639585b mutation round) are reverted on the head. The final diff touches only the four integrated-cell files.
Proof
Baseline. Draft heavy feedback run 43969834503 ran on hosted
runtime_hostatea71984c3, with a TEMPORARY probe and every bound open. It ran two integrated cells per backend, and all four passed. Environment: kernel 7.0.0-1017-azure, btrfs-progs v6.6.3, Git 2.43.0, Bun 1.4.2./api/healthp95 / maxreference_sourcereference_sourcePer-turn I/O, elapsed times and per-turn latency summaries are in each cell's
reference-integration-latency.json(artifactruntime-host-proof).Mutation receipt. Draft heavy feedback run 43979866942 completed
successat639585b87(runtime_hostcheckout639585b873614c7f54e576c727214223e274713f). In that run, each backend's integrated cell ran with the measured bounds and then with one bound set below its measured value:The probe required each breached cell to exit non-zero and to fail first on the named assertion, and it would have failed the job otherwise. Restored, both cells pass under the measured bounds. The final head differs from
639585b87only by the revert of the probe (the breach override and the cell loop).Typecheck and lint pass locally (
tsc --noEmit,bun run lint). The integrated cell needs owned Btrfs loop devices, which this host cannot attach, so it has no local run. Its evidence is the two hosted runs above.{"version":1,"kind":"brain-check-pr-receipt","head":"3587bbbffb2ad08a8ac6cb88ef01cd1e15ec67cb","base":"origin/main","mode":"focused","startedAt":"2026-11-17T00:16:47.467Z","finishedAt":"2026-11-17T00:18:38.046Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":17529.080801},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":206.17150599999877},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":143.39665400000013},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":24.26394100000107},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":92657.24038199999}]}Checklist
docs/reflect the change, or nothing documented moved. (scripts/native-proof/README.mdupdated.)Anything left open
Nothing for #3513. With #3676 and #4072, this meets the last criterion.
Collisions (
bun scripts/collisions.ts --json --pr 4103at 3587bbb): closure only with #3054, #3056, #3059, #3069, #3581, #3622, #4036, #4102, #4104, #4106, #4112, #4113 and #4115. #4002 also editsscripts/native-proof/README.md, in a different section. No direct code-path collision.🤖 Generated with Claude Code