RevGuard: Transactional, Version-Bound Contracts for LLM Document Editing

Jinkun Chen, Xuemin Yu, Sijia Han, Vlado Keselj

Dalhousie University · Meta

Published November 29, 2026 · on the feed December 1, 2026 · ▲ 3 · arXiv 2611.40161

Code & softwareAgents No code arXiv ↗Hugging Face ↗

The abstract

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 fail-closed setup left the stress test inconclusive; a versioned repair passed targeted compatibility tests. A Git three-way baseline produced 176 clean merges across 180 episodes, yet committed 123 controlled faults. These results support containment of tested faults in localized LaTeX edits, not semantic or factual correctness.

The Brief

2:16

A short podcast summary of the paper. Written and voiced by AI.

Transcript

RevGuard. Transactional, Version-Bound Contracts for LLM Document Editing. By Jinkun Chen and three others, from Dalhousie University and Meta. Published on the twenty-ninth of November.

Language model agents increasingly modify persistent, shared artifacts. The trouble is timing. An agent reads a workspace, decides on an edit, and commits it, and in between someone or something may have changed the workspace. A natural-language instruction says what to do, but it does not define safe write authority for that situation. Nothing in the words settles what the agent is permitted to overwrite once the ground has moved.

RevGuard is a transactional layer that answers this with contracts. It compiles instructions into edit contracts that are immutable and bound to a specific version, and it commits only the exact state that was previewed. If what would be written is not what was shown, it is not written.

Three parts produce a contract. A language model compiler proposes it. An independent language model verifier reviews it. Then a deterministic projection installs least privilege. The evaluation is split the same careful way, keeping setup reliability, commit safety and task utility apart.

Across one hundred and forty-four episodes on licensed, compilable LaTeX repositories, every episode terminated and no injected fault committed. Verification improved normalized authorization in seven of forty-eight paired contracts, with no observed loss of protection. It did not, however, establish a benefit for task utility. Verified and compiler-only contracts both succeeded in forty-six of forty-eight episodes, and strict non-inferiority remained unresolved.

In a descriptive stress test of nine hundred cells across models, the 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 fail-closed setup left that stress test inconclusive, and a versioned repair then passed targeted compatibility tests. A Git three-way baseline produced one hundred and seventy-six clean merges across one hundred and eighty episodes, yet committed one hundred and twenty-three controlled faults.

That last comparison carries the argument. A clean merge and a safe commit are different things, and a tool can report the first while failing the second. The authors draw the boundary of their own claim tightly: the results support containment of tested faults in localized LaTeX edits, and they do not speak to semantic or factual correctness.

More with an account

Listen to every day’s papers

Daily playlists, deep dives, quests for the papers, and quizzes on their key terms.

Join free
KipQuest: the day’s AI research, as podcasts and quests. All papers Android app Privacy Contact Episodes are written and voiced by AI from each paper. Summaries can contain mistakes: the paper is the source.