Skip to content

native-proof: --observation-timing has no large-tree scenario, so the admission walks measure as free #4284

Open

Description

@schlessera

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 under workspaces/ spread over a few dozen checkouts with nested node_modules, .git directories and .gitignore files; a root node_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

Acceptance criteria

  • bun scripts/prove-native-host.ts --backend=claude --observation-timing --tree=large writes a timing artifact whose sandbox_resolve and boundary_prepare medians 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 lowers sandbox_resolve by 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 lint

Needs 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

  1. added
    type: test
    area: ui-server
    on Nov 20, 2026
  2. added
    priority: p2
    area: ci
    agent-ready
    on Nov 20, 2026
  3. self-assigned this
    on Nov 20, 2026
  4. schlessera commented on Nov 20, 2026

    @schlessera
    OwnerAuthor

    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.

  5. added this to the 0.45.0 milestone on Nov 21, 2026
  6. removed their assignment
    on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyarea: ciarea: ui-serverpriority: p2type: test

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions