PatchWrite: One Line, Not One Section -- Compile-Gated, Validity-Preserving Editing for AI-Drafted Manuscripts
- URL: http://arxiv.org/abs/2608.23001v1
- Date: Mon, 24 Aug 2026 09:04:19 GMT
- Title: PatchWrite: One Line, Not One Section -- Compile-Gated, Validity-Preserving Editing for AI-Drafted Manuscripts
- Abstract summary: PatchWrite constrains how candidate edits become committed manuscript states.<n>It reuses bounded EDIT N M editing and rollback, but tightens compilation acceptance with fatal-log checks.<n>Candidates that fail either check are rejected and the previous HEAD is retained.
- Score: 2.7819582252059405
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Automated manuscript pipelines often regenerate an entire section to repair a local defect, allowing unrelated metrics and citations to change even when the resulting PDF still builds. PatchWrite instead constrains how candidate edits become committed manuscript states: it reuses bounded EDIT N M editing and rollback, but tightens compilation acceptance with fatal-log checks and adds evidence locks that require every cited key and experimental numeric token to be attested by a reference registry or experimental log. Candidates that fail either check are rejected and the previous HEAD is retained. On a 24-manuscript x 8-fault oracle stress test (768 jobs, evenly split between compile-breaking and content-only faults), whole-slot rewriting mutated an unrelated "12-layer" line in every case (0/192 preserved; numeric Jaccard 0.6667), whereas PatchWrite preserved it in 192/192 cases. Removing the compile gate reduced acceptance to 0, while removing the evidence gate allowed a hallucinated citation to pass. The same pattern held across all eight faults. To test the protocol with generation rather than oracle edits, we reran the 192 jobs with the writer model proposing the edits. The model's candidates were accepted in 75% of cases; nearly all rejections came from one reproducible failure mode in which the model attempted to delete a line using an empty replacement unsupported by the current grammar. Every accepted candidate passed both gates, and 93.75% fixed the injected fault; the remaining cases involved a technically valid but sentence-inappropriate citation and one markup-changing near-miss. In a blind evaluation of sixteen PDF pairs, both raters preferred PatchWrite for preserving lab-grounded facts (C1 Likert 5.0 vs. 2.0), while rating prose quality nearly identically. Logs from 193 in-product drafting tasks show the same classes of failures occurring in practice.
Related papers
- TyPatch: Transforming Patches into Typestate Rules for Kernel Bug Detection [9.241492644741198]
We present TyPatch, which decouples patch-specific defect semantics from analyzer implementation.<n>On Linux v6.16, TyPatch finds 559 distinct bugs, 121 of which have been confirmed by kernel developers.
arXiv Detail & Related papers (2026-09-12T05:34:12Z) - AI-Assisted Design of a Post-Quantum Cryptographic Accelerator: A Deployed-Silicon Case Study [0.4251773265892765]
We replace the standard acceptance gate with a byte-exact goldenreference oracle.<n>We report 232 experiments in which an agentic large language model drove a unified ML-KEM-768 and ML-DSA-65 accelerator.
arXiv Detail & Related papers (2026-09-03T16:34:50Z) - VeriPhy: Agentic Physical Reasoning for World Model Evaluation and Refinement [57.86962208273888]
We present an auditable physical-verification system in which a text-only planner compiles the prompt into typed physical obligations.<n>Each action returns a provenance-carrying evidence record whose payload, when usable, is either a typed measurement or an explicitly tagged learned state.<n>We anchor evaluation in a 1,500-clip corpus of human-annotated flaw records that localize real generation failures in prompt reference, space, and time.
arXiv Detail & Related papers (2026-09-02T20:36:45Z) - Don't Let the Model Write the YAML: Deterministic, Minimal-Diff GitOps Remediation from LLM-Proposed Field Changes [0.0]
In GitOps, having the model author the edited file or a diff is what practitioners reach for first.<n>We present an alternative that separates the semantic decision (which resource, field, and value) from the syntactic act of editing the file.<n>Because the file is never re-serialized, the diff is minimal by construction, and the edit is correct and deterministic independent of the model.
arXiv Detail & Related papers (2026-08-31T18:37:12Z) - Specification-first convergence with an AI coding agent: a case study of dismantling a core architectural invariant across 189 files in a 717k-line codebase with no test oracle and no human code review [0.0]
This paper reports a single, fully instrumented case study of a large-scale architectural dismantling by an AI coding agent.<n>Under the protocol described here, the agent completed it successfully.
arXiv Detail & Related papers (2026-08-12T15:35:48Z) - One Recipe, Many Harnesses: What Self-Evolution Encodes Across Languages and Models [46.83445434865936]
Self-evolving harnesses are closed-loop systems in which an agent inspects its own rollouts and edits its prompts, tools, and memory.<n>It remains unclear whether they encode benchmark-specific adaptations, language-specific engineering knowledge, or compensation for limitations of the underlying model.
arXiv Detail & Related papers (2026-08-10T19:45:45Z) - Independent Patch Verification for Coding Agents with a Bidirectional Reconstruct-and-Verify Framework [49.16055123488827]
coding agents powered by large language models can now generate code patches directly from bug reports.<n>No mechanism independently verifies whether it truly resolves the reported problem.<n>We propose RETRACE, a training-free post-generation verification framework.
arXiv Detail & Related papers (2026-08-09T22:59:13Z) - Beyond Fail-to-Pass: Iterative Hardening of Co-Generated Bug Reproduction Tests and Fixes [55.114939648705395]
Large language models (LLMs) have made automated program repair increasingly practical for real-world bugs.<n>Bug reproduction tests (BRTs) help close this gap by turning a bug report into an executable, bug-specific signal.<n>We propose CoHarden, a co-generation framework that uses the Lax signal as an in-loop convergence criterion.
arXiv Detail & Related papers (2026-07-22T07:30:07Z) - One Rewrite to Fix Them All? Type-Aware Repair Allocation for Text-to-Image Prompt Optimization [59.164665622252016]
Text-to-image (T2I) generators often fail to follow their prompts faithfully, producing wrong counts, swapped attributes, ambiguous relations, and illegible text.<n> Prompt optimization repairs such failures by rewriting the user prompt, requiring no generator retraining, and has yielded promising results.<n>We formulate semantic prompt optimization as atomic repair allocation: each failed proposition is routed to a type-conditioned repair operator before the resulting local constraints are compiled into one executable prompt.
arXiv Detail & Related papers (2026-07-21T05:31:43Z) - ContraFix: Agentic Vulnerability Repair via Differential Runtime Evidence and Skill Reuse [10.503895811137095]
Large language model (LLM) agents are increasingly used for automated vulnerability repair.<n>Recent empirical results show that these agents still struggle with real-world vulnerabilities.<n>We present ContraFix, an agentic framework that couples runtime evidence with reusable repair skills.
arXiv Detail & Related papers (2026-05-17T13:48:25Z) - Correction and Corruption: A Two-Rate View of Error Flow in LLM Protocols [51.56484100374058]
We propose a paired-outcome measurement interface for auditing a single protocol step on exact-match tasks.<n>For each instance, the interface records a baseline correctness bit and a post-step correctness bit.<n>These rates predict accuracy changes and define a reusable empirical interface testable across seeds, mixtures, and pipelines.
arXiv Detail & Related papers (2026-04-20T13:25:40Z) - A Grammar of Machine Learning Workflows [0.0]
This paper proposes a structural remedy: a grammar that decomposes the supervised learning lifecycle into 8 kernel primitives connected by a typed directed acyclic graph (DAG)<n>The grammar's core contribution is the terminal assess constraint, where repeated test-set assessment is rejected by a guard on a nominally distinct Evidence type.
arXiv Detail & Related papers (2026-03-11T13:15:33Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.