Standing Framework

Research paper 12

Proof-Preserving Ref Drift Recovery: Agentic Worktree Incidents as Evidence Objects

Agentic coding systems increasingly operate across branches, linked worktrees, generated artifacts, proof commands, and remote refs. That gives them power, but it also creates a specific incident class: ref or worktree drift that makes it unclear which source state was inspected, edited, proved, staged, committed, or pushed. This paper treats ref drift recovery as an evidence-preservation problem rather than a housekeeping problem. The local source context is Switchboard, whose bare-root checkout and linked-worktree execution lanes forced careful separation between nominal repository path, actual editable worktree, safe resume ref, local proof, and remote alignment. The paper proposes a proof-preserving recovery protocol: stop when unexpected drift appears, preserve current refs, identify the actual worktree and branch state, move risky recovery into a detached or isolated lane if needed, rerun proof from the recovered state, and only then create or publish a commit. The contribution is a systems pattern for agentic development: recovery is not complete when files look right; it is complete when source state, proof state, and ref state are aligned and recorded.

Paper
12
Authors
A.G. Mauro and C.A. Harris
Date
2026-07-19
Collection
Standing Framework Research

Abstract

Agentic coding systems increasingly operate across branches, linked worktrees, generated artifacts, proof commands, and remote refs. That gives them power, but it also creates a specific incident class: ref or worktree drift that makes it unclear which source state was inspected, edited, proved, staged, committed, or pushed. This paper treats ref drift recovery as an evidence-preservation problem rather than a housekeeping problem. The local source context is Switchboard, whose bare-root checkout and linked-worktree execution lanes forced careful separation between nominal repository path, actual editable worktree, safe resume ref, local proof, and remote alignment. The paper proposes a proof-preserving recovery protocol: stop when unexpected drift appears, preserve current refs, identify the actual worktree and branch state, move risky recovery into a detached or isolated lane if needed, rerun proof from the recovered state, and only then create or publish a commit. The contribution is a systems pattern for agentic development: recovery is not complete when files look right; it is complete when source state, proof state, and ref state are aligned and recorded.

← Back to research papers