Repository navigation
test(ui-server): qualify EDQUOT, cancellation and crash recovery under the Git workload (#3513) - #4072
Merged
Conversation
…kend latency under the Git workload (#3513) Case 19 of the reference pool proof now also records per-step pool-device and process I/O and peak allocation around cold, warm and refresh reads, and exercises write-time EDQUOT in a managed worktree and inside a refresh fetch, cancellation mid-fetch, and a SIGKILLed app instance recovered by the next instance's startup recovery, all on the generated repository. The integrated cell's repository gains incompressible charts, its first turn ends with a warm source read, and the parent samples health, WebSocket ping/pong, pool peak and device I/O through every turn on both backends. The child times each reference tool call at the model boundary. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ce cell (#3513) Reverted before the PR is ready. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 15, 2026
…grated receipts uploadable (#3513) The first hosted baseline showed Git's write-time quota error inside the refresh fetch, rejected as capacity: past the refresh window the previous commit's validation has lapsed too, so no stale copy may be served. Assert that rule instead of a stale fallback. The integrated cell left its UID 1000 app data owner-only in the artifact tree, so the whole runtime-host receipt upload failed. Make the tree readable on exit, print the app's warnings into the job log, and sample peak allocation from sysfs rather than polling the shared manager mid-turn. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 tasks
…lets it run (#3513) Both hosted baselines stopped the integrated cell at its first reference_source call: the turn's own scratch check and the reference transport's Git command each need the whole default maintenance budget, and the second is refused (#4079). The cell's latency assertions were never measured, so they leave this change; the instrument is kept on its own branch for the follow-up. Case 19 passed in full on hosted runtime_host. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d-latency-recovery
… writable staging root (#3513) Expected to fail REFERENCE_EFFICIENCY_RESTART_RELEASES_STAGING in case 19. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 16, 2026
Merged
…d-latency-recovery
schlessera
marked this pull request as ready for review
November 16, 2026 15:23
|
This PR's squash |
schlessera
added a commit
that referenced
this pull request
Nov 16, 2026
…fore refusing its first reference call (#4079) (#4080) * CONTRACT: fix(ui-server,ui-sdk): wait for a turn's own maintenance before refusing its first reference call (#4079) Every maintenance command reserves the whole default 256 MiB maintenance budget, and admission refuses rather than waits. A reference Git command that overlapped the turn's scratch check, or the boot-time scratch prune, was refused at once, and the tool answered the generic `unavailable` with no retry guidance. The scratch check refused the other way round left `.brain/scratch/` read-only for the turn. - The reference transport waits up to REFERENCE_ADMISSION_WAIT_MS (30 s) per Git command for the budget to free, then refuses as `busy`. The reference source maps that to its existing `busy` code on resolution and on fetch or checkout. The tool classifies any raw maintenance-busy error that reaches it as `busy` too, never `unavailable`. - An awaited scratch check waits up to SCRATCH_ADMISSION_WAIT_MS (3 s) on one deadline across its Git queries. The synchronous check and bind-time revalidation of lapsed sources still refuse at once. - MaintenanceTempBusyError gains freedWithin(ms, signal), a bounded freed(). Neither wait adds an allowance; both stay inside the existing budget. The MCP contract component states the new bound for `busy`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(scripts): TEMPORARY hosted probe running the integrated reference cell (#4079) Copied from #4072's probe so hosted runtime_host runs the integrated cell. Reverted before the PR is ready. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(ui-sdk,ui-server): place the scratch admission brain where a maintenance worker sees it; import an exported type (#4079) Hosted heavy feedback showed two test faults in this PR, not in the fix: - The writable-scratch test built its brain under the OS /tmp, which a maintenance worker replaces with its own, so the worker's git query could not see it and scratch stayed read-only after the wait had worked. The brain now lives in the repository's gitignored tmp/, as the worker sandbox tests place theirs, and the assertion prints the mount's reason. - The reference admission test imported MaintenanceTempReservation, which the SDK's internal entry does not export (TS2305 in strict typecheck). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Revert "chore(scripts): TEMPORARY hosted probe running the integrated reference cell (#4079)" The probe ran the integrated cell on hosted runtime_host in heavy feedback run 43854394276: Integrated reference proof passed (claude, pi). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(ui-sdk): give the scratch admission test's maintenance worker a fixture input lease (#4079) Candidate confirmation showed the writable-scratch test still read-only: "git could not run to confirm .brain/scratch/ is gitignored". The wait had worked, but the worker never ran git. It had no prepared startup view, which every real-worker writable test supplies through createFixtureMaintenanceHost. The test now uses that host, with its ledger state beside the brain in the repository's gitignored tmp/ and masked from the worker, as maintenance-temp-helpers.test.ts does. It passes locally, where the worker now runs, and still fails on main with the "(held by: git)" busy refusal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Merged
9 tasks done
schlessera
added a commit
that referenced
this pull request
Nov 17, 2026
…ured thresholds (#3513) (#4103) * test(ui-server): sample health, WebSocket and tool latency in the integrated 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> * chore(scripts): TEMPORARY hosted probe measuring the integrated reference cell's baseline (#3513) Reverted before the PR is ready. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Revert "chore(scripts): TEMPORARY hosted probe measuring the integrated reference cell's baseline (#3513)" This reverts commit ea71984. * test(ui-server): hold the integrated reference cell to its measured hosted 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> * chore(scripts): TEMPORARY hosted mutation round for the integrated cell'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> * Revert "chore(scripts): TEMPORARY hosted mutation round for the integrated cell's tolerances (#3513)" This reverts commit 639585b. --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Refs #3513
Extends case 19 of the reference pool proof (
scripts/native-proof/reference-efficiency.ts) with the criteria #3676 left open under the generated Odysseus Git workload: write-timeEDQUOT, cancellation, crash/restart recovery and per-step I/O counters. The backend-latency criterion stays open: it is blocked by #4079 (see below).What changes
io, taken since the previous row and aftersync. It holds the pool loop device's block counters (/proc/diskstats) and this process's I/O with its reaped transport workers (/proc/self/io), fromscripts/native-proof/pool-io.ts. Cold, warm, refresh and refused-refresh rows addpeak, the combined charge and reservations sampled every 50 ms. A warm read must reserve nothing.write()withEDQUOT. Neither its sibling nor its source may be charged.capacity: the previous root is neither served nor withdrawn, and the staging root is released and observed reclaimed.cancelled, publish nothing, and have its staging released and reclaimed.reference-efficiency-crash-child.ts) is killed withSIGKILLwhile its staging root is writable. The manager must keep that root writable and charged. The next instance's startuprecover()must release it, retain nothing and keep the previous source, and the space must be observed reclaimed. The changed refresh then runs on the restarted instance.Hosted evidence
381ee1de8): case 19 passed through the new worktreeEDQUOTstep. Measured: cold acquisition 1,512 ms and 15,675,392 B charged; repeat read 0 ms and +0 B; unchanged refresh 82 ms and +0 B; two worktrees +196,608 B.EDQUOTstep failed on my expectation of a stale fallback. Git did hit quota (fatal: write error: Disk quota exceeded), and the product rightly refused a stale copy whose validation had lapsed. The assertion was corrected in4e63c9983.4e63c9983, perproof-checkout.json):Reference pool proof passed.That covers every case including all new case-19 steps, with receipts in theruntime-host-proofartifact. The pi UID 0 cell failed as its labelled expected-failure control.99e26925d):recover()skipped a writable staging root. Case 19 failed for the intended reason: the stranded root6d0190a9…, recordedwritableafter theSIGKILL, was stillwritableafter recovery. The failing assertion wasREFERENCE_EFFICIENCY_RESTART_STAGING_RELEASED, the settle check immediately before the namedREFERENCE_EFFICIENCY_RESTART_RELEASES_STAGING, which guards the same property. Every earlier case-19 step passed on the merged tree, including refreshEDQUOTand cancellation.restart recovery releases interrupted staging and roots the catalog lost(packages/ui-server/tests/reference-source.test.ts:444), the one failure among 2,233 unit tests in that shard. Every other category passed.39a1a4316, whose tree equals the merged treeec681ea48. The restored case-19 inputs are round 2's, apart from that merge's unrelatedreference-pool.native.tscase.Integrated cell: blocked by #4079, moved out
Both rounds also ran the opt-in integrated cell through a temporary probe commit, since reverted. It never got past Claude's first
reference_sourcecall.unavailableinstead ofbusy.priority: p2, blocking ui-server: qualify allocation and latency across repository acquisition and managed worktrees #3513's remaining criterion).test/3513-integrated-latency(4e63c9983) for after ui-server: a turn's first reference_source call is refused by the turn's own maintenance admission #4079. It includes the artifact-permission fix and the warning output that round 2 needed.Local receipts
bun run test ./tests/native-pool-io.test.ts: 4 pass. Mutation: decoding the loop minor asrdev & 0xfffailsdecodes a loop minor above 255 from its dev_tandreads the pool device's row, not a device sharing its low minor bits; the latter matchedloop125. Restored: 4 pass.tsc --noEmitandbun run lintclean.check:prat the final head39a1a4316is below.Changeset
None: proof and report only, with no package behaviour or contract change. Mutation M1 is reverted (
39a1a4316).Collisions
bun scripts/collisions.ts --json --pr 4072at head39a1a4316: no path collisions; 18 closure-only overlaps with broad open PRs.{"version":1,"kind":"brain-check-pr-receipt","head":"551fac56d118c0fe89b02e4216547cac615ac85e","base":"origin/main","mode":"focused","startedAt":"2026-11-16T15:19:23.638Z","finishedAt":"2026-11-16T15:20:49.888Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":12522.757395999999},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":124.55249999999978},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":97.4539369999984},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":20.11275399999795},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":73463.041042}]}🤖 Generated with Claude Code