# Issue 24390 server evidence

Reviewed head: 3d76e10d01793340d68fc5bc89165dc190f4cdc6. Baseline: 27e0c684c5. The lead subsequently integrated main at head 7e369b61a885f199f69c2e811a7ab720a9771e7f and reports all 158 focused tests pass there; this agent’s logs remain explicitly tied to pre-integration head 3d76e10d01.

## Execution and scope

All executions occurred in `/tmp/issue-24390-evidence-test`, an archive of head with dependency links to the installed dependencies. No tracked files in the reviewed checkout were changed. No browser or server was launched, no live database opened for writing, no forge mutations performed. Existing server/browser fixture was inspected read-only once and left unchanged. No server was stopped.

- Green: exact head's two focused test files: 158 passed, exit 0.
- Red: same head tests, with only ProviderTurnStartService.ts and storageCleanup.ts replaced with their base versions in the scratch archive: 3 failed, 155 passed, exit 1. The two startup recovery tests saw zero createWorktree calls; cleanup returned failed/NotFound for missing .git instead of kept/Not a linked worktree.
- Extra evidence controls: 9 passed. The scratch build driver appends controls to copies of the existing test files. It is provided so these observations can be reproduced from head. These additions are not proposed repository tests.

## Observed behavior and evidence strength

Startup controls execute the real ProviderTurnStartService using real Node FileSystem. The existing harness supplies synthetic projections and mocks routing/provider services. A GitWorkflow mock bridge performs actual `git worktree prune` and `git worktree add` against a scoped synthetic repository. This establishes filesystem behavior at the service boundary with actual linked Git checkout recreation, not a full provider execution or actual GitWorkflow service integration. The harness intentionally fails later reads; passing these tests does not establish successful provider continuation.

For node_modules, node_modules+.next, .next alone, and an empty directory, controls record before-state entries and absent .git; verify exact top-level path, feature/restore branch, expected feature HEAD, a branch-only tracked marker, and .git file contents after startup; assert stale allowed directories no longer exist. Empty and .next-only recovery are confirmed current behavior.

Preservation controls verify no createWorktree call and exact bytes retained for unrelated notes.md plus node_modules, an outside-root folder, and a parent symlink escaping the managed root. A valid linked checkout control verifies unchanged branch/HEAD and branch marker plus preserved modified tracked and untracked file bytes.

Cleanup evidence uses the existing real filesystem/Git fixture and real StorageCleanup service with synthetic settings/projection/session/SQL dependencies (no database writes). It removes the synthetic checkout contents except node_modules, prunes Git metadata, runs service.runNow, records the full report, asserts kept/Not a linked worktree, and checks exact nested sentinel bytes survive. This is direct service runtime proof, not a full app storage-cleanup command flow.

The read-only post-pass inspection of the lead's real runtime checkout verifies .git is a file, exact top-level path, branch t3/check-worktree-status, HEAD 188d454b93c5fc95c849c97c0889f45ca8efbcec equal to the original branch, and notes.md present as untracked. It does not establish who created notes.md or its expected bytes and is not a provider transcript.

## Lead-owned integrated app evidence

The supplied before transcript demonstrates the failure and warns that Git traversed to the enclosing checkout. The supplied after transcript records a real composer turn and provider pwd/ls/top-level/branch after recovery. The lead additionally reported a node_modules+.next real app pass without pruning, with provider-observed HEAD 188d454b93c5fc95c849c97c0889f45ca8efbcec and original branch. That additional report was not independently driven here. The completed [lead runtime controls](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/70c4c7e9f41e0691/issue-24390-runtime-controls.txt) were read back: they record provider HEAD and branch for node_modules+.next without prune, exact sentinel bytes and HEAD in a valid checkout, and sentinel preservation when .git is absent alongside node_modules. These are lead-owned app observations, not independently driven here.

Server-only change: no render matrix applies. All clients and provider entry paths share the service; no separate client/provider/browser matrix was run by this evidence agent.

## Remaining limits

No real Windows junction/locked-directory behavior was executed on Linux. No real provider turns were driven by this evidence agent. Outside-root and symlink preservation, valid checkout edits, cleanup kept report, and empty/.next-only behavior are proven here at the isolated service boundary, not through the app UI. Scratch startup recovery uses a GitWorkflow bridge and prunes metadata, so the lead's no-prune app run remains the evidence for that integration variant. No concurrency, permission-error, or OS-specific removal fault injection was added.

## FRICTION

The default Vite+ agent reporter hid successful console output. The 9-control run was repeated with --silent=false --reporter=verbose to produce reviewable observations. Initial dependency directory symlinks could let Vite write temporary config files into the source checkout's ignored node_modules directories; these were changed to per-child links with local scratch cache directories before the evidence control runs. No tracked change resulted. The lead reported node-watch restarts from test-generated .vite-temp files, so no further tests will run after these controls finish. No browser/server launches were needed.

Scratch drivers, logs and this report are public synthetic evidence. Scratch archive/drivers/logs are removed after upload; public artifact URLs remain.
