RevGuard: Transactional, Version-Bound Contracts for LLM Document Editing
Large language model (LLM) agents increasingly modify persistent shared artifacts, but natural-language instructions do not define safe write authority when a workspace changes between read and commit. We present RevGuard, a transactional layer that compiles instructions into immutable, version-bound edit contracts and commits only the exact previewed state. Across 144 episodes on licensed, compilable LaTeX repositories, every episode terminated and no injected fault committed. An LLM compiler proposes contracts, an independent LLM verifier reviews them, and deterministic projection installs least privilege. Evaluation separates setup reliability, commit safety, and task utility. Verification improved normalized authorization in 7/48 paired contracts without observed protection loss, but did not establish a task-utility benefit: verified and compiler-only contracts succeeded in 46/48 episodes, and strict non-inferiority remained unresolved. In a descriptive 900-cell cross-model stress test, contract protocols committed zero faults, unmanaged patching baselines committed over one hundred each, and safe whole-file replacement succeeded in under five percent of tasks. One…
- arXiv
- 2611.40161
- Authors
- Jinkun Chen, Xuemin Yu, Sijia Han, Vlado Keselj
- Categories
- cs.CL