Repository navigation
Description
Context
Part of #4278.
bun scripts/prove-native-host.ts --observation-timing is the repository's instrument for admission and observation cost. Its fixture brain has about 2,000 notes and no code. On it, #3355's closing receipt found no warm step of governed admission above 100 ms: sandbox_resolve 1 ms, boundary_prepare 1 to 2 ms.
On a hosted install whose tree holds about 100,000 entries (about 80,000 under workspaces/, about 19,000 in the root node_modules, under 2,000 content) and whose journal object store holds tens of thousands of files, the same two steps take 1.21 s and 0.31 s at the median, and 2.0 to 2.8 s and 0.9 to 1.3 s on the first turn after an hour idle. Those steps walk every entry:
- the
workspaces/link scan (resolveWorkspacesMount,packages/ui-sdk/src/server/worker-sandbox.ts:499-508;scanOnce,:305); - the protected-tree check over the root
node_modules(checkTree,packages/ui-sdk/src/server/worker-protection.ts:33-57); - the state-alias proof over the database directory and journal object store (
packages/ui-server/src/brain/operational-state.ts:41-141).
So the harness reports as free exactly the costs that dominate a real admission, and a change that removes a walk cannot show its effect without a hosted install. The fixes in #4278 need a keyless, repeatable measurement.
Scope
- Add a large-tree scenario to
--observation-timing. Sizes are parameters with defaults in the range above: entries underworkspaces/spread over a few dozen checkouts with nestednode_modules,.gitdirectories and.gitignorefiles; a rootnode_modules; a journal object store populated with a given number of objects. - Generate the tree cheaply (sparse or empty files) and deterministically.
- Report the existing sub-phases for five warm turns and for a cold-cache condition when it can be demonstrated on an isolated runner. Explicitly mark cold unavailable where that condition cannot be established. Avoid mutating a shared runner’s cache.
- Report the journal observer's bootstrap time for the same tree.
Out of scope
- Changing any walk. This is the instrument for ui-sdk, ui-server: every governed turn scans and journals workspaces/; bind it read-only by default #4295, ui-sdk: the root node_modules is walked on every admission; serve it from a host-owned module store #4300 and ui-server: the state-alias proof walks the journal object store on every admission #4301.
- Asserting a time budget in CI. A measurement is not a product timing until a ruling makes it one.
Acceptance criteria
-
bun scripts/prove-native-host.ts --backend=claude --observation-timing --tree=largewrites a timing artifact whosesandbox_resolveandboundary_preparemedians are at least ten times those of the default fixture on the same runner, with the entry counts recorded in the artifact. - Halving the
workspaces/entry count lowerssandbox_resolveby a recorded, roughly proportional amount, which shows the scenario measures the walk and not setup noise. - The cold-cache row is present where the runner allows it and explicitly marked unavailable where it does not.
- The default (small) scenario's output is unchanged.
- The fixture contains no personal data and no real repository content.
Verification
The current option parser (const selected, scripts/prove-native-host.ts:43-45) has only the default --observation-timing scenario. Extend its existing artifact under the same offline fixture. Report comparisons on the same runner. The tenfold sensitivity check is a qualification measurement for the fixture, not a fixed shared-runner timing gate.
bun scripts/prove-native-host.ts --backend=claude --observation-timing --tree=large
bun run lintNeeds the native proof image from scripts/native-proof/Dockerfile. Do not run it in a worktree that is running bun run test.
Contract impact
None. Test tooling only.
2026-11-20 triage — Verified the current option surface and walk owners at main 63bb400b3. The test-only fixture and timing receipts are the deliverable.
Activity
schlessera commentedon Nov 20, 2026
Claimed for implementation. Claim token:
claim-767cf377. Branch:feat/4279-turn-clocks.Worked as part of the #4278 epic integration branch epic/4278-host-overhead (one main landing for the epic). Collisions: none recorded at claim.