# Issue 24390 — proof audit pass 1

Scope: base 27e0c684c5, head 3d76e10d01. Read-only diff/evidence audit; no browser, server, tests, implementation edits, push, or comments performed.

## Classification

CONFIRM server-only / no visual surface proof. Only ProviderTurnStartService, storageCleanup, and their tests change. No contracts, rendering, client navigation, provider adapters, or UI controls change. Web, desktop, mobile, remote, and scheduled/agent entry paths share the server behavior; no separate visual capture is warranted. Visual surface matrix: empty (N/A). Runtime behavior matrix: nonempty below. Red tests plus focused green results and a real runtime transcript are the appropriate proof form.

## Runtime requirements

| Scenario | Required observable result | Current evidence / gap |
|---|---|---|
| Managed folder, no .git, only node_modules; start next turn | Before provider execution, leftovers removed, real linked worktree recreated at the same path on the thread branch; provider sees that checkout | Before transcript reproduces failure. New test asserts target absent before mocked createWorktree and correct branch argument. Real after transcript required. |
| Managed folder, no .git, node_modules + .next | Same recovery; neither stale directory survives recreation | New parameterized test covers removal and branch argument. Include this variant in after runtime transcript. |
| Managed folder, no .git, unrelated sentinel file plus allowed leftovers | No recursive clearing or recreation; sentinel bytes preserved | New notes.md test covers preservation. Runtime negative-control observation recommended alongside recovery because deletion is the changed side effect. |
| Eligible cleanup candidate, missing .git, node_modules remains | Cleanup completes with outcome kept, reason Not a linked worktree; nested contents survive | New cleanup test uses real filesystem/Git fixture. Supplied red report says NotFound before fix. Include cleanup report and preserved sentinel in runtime after proof. |
| Existing valid linked worktree | Start leaves checkout, branch, tracked/untracked sentinel intact | Predicate excludes .git-present folders; small runtime control closes destructive-regression proof. |
| Outside managed root or symlink escaping it, no .git, allowed leftovers | No removal/recreation; external sentinel survives | Existing missing-path tests exercise shared managed-path guards, not this existing-folder deletion case. Focused negative control desirable; no separate client/provider matrix needed. |

The predicate also accepts an empty directory and .next alone (every entry must belong to the allowlist; empty passes vacuously). Record this as intended behavior or narrow the claim; the diff is broader than node_modules-required recovery. These variants can be covered with focused tests rather than additional visual evidence.

## Transcript acceptance

Use isolated state and synthetic repository data. Identify tested commit and setup. Capture before-state directory entries and absent .git. After starting a real turn, record .git as a linked-worktree file, git rev-parse --show-toplevel equal to the exact thread worktree path, git branch --show-current equal to the thread branch, and HEAD equal to the expected branch commit. Include a tracked file unique to that branch and evidence provider execution occurs after recovery. Empty git status output is insufficient: Git can walk into an enclosing checkout. For cleanup, show run completion/report and preserved contents. No actual Windows junction claim is proven by a Linux leftover-folder simulation.

## Evidence assessment

Before transcript inspected: https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/bfef5d8b62909ab5/issue-24390-runtime-before.txt . It identifies base commit, real dev server, setup, and provider pwd/ls showing only node_modules. It explicitly warns Git discovered the enclosing development checkout. This is useful before evidence, not after proof.

Red-test commit 1b2e43018c inspected for scope; its execution failures (missing createWorktree and cleanup NotFound) and 158 current passing tests are supplied by the requester, not independently rerun or verified from logs in this audit. Attach exact commands, revision, and outputs when presenting final proof. Startup tests mock createWorktree and intentionally stop later reads; they do not prove actual Git recreation or successful provider continuation.

## Findings and verdict

No visual-proof requirement and no concrete implementation defect established in this bounded proof audit. Classification accepted. Complete proof verdict: INCOMPLETE pending head runtime after transcript and reviewable red/green execution logs. An empty visual matrix is correct; an empty runtime matrix is not.

FRICTION: Read-only constraints prohibit creating missing runtime evidence here. Existing evidence supplies only before behavior. No browser/server was started and no captures were made. No forge state was queried or changed. This document is the only created artifact and contains synthetic/public evidence information.
