Don't Let the Model Write the YAML: Deterministic, Minimal-Diff GitOps Remediation from LLM-Proposed Field Changes
- URL: http://arxiv.org/abs/2609.00227v1
- Date: Mon, 31 Aug 2026 18:37:12 GMT
- Title: Don't Let the Model Write the YAML: Deterministic, Minimal-Diff GitOps Remediation from LLM-Proposed Field Changes
- Abstract summary: 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.
- Score: 0.0
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: LLM agents increasingly diagnose incidents and propose remediations. In a GitOps workflow, applying a fix means editing a version-controlled config file, and the obvious implementation, having the model author the edited file or a diff, is what practitioners reach for first. Evaluating that choice on real Kubernetes manifests, we find no text-generation strategy is safe for unattended automation. Unified diffs are unsafe: under strict patching almost none apply, but that is an artifact, since a tolerant tool (GNU patch) applies 96%, yet silently misapplies about 1 in 7 (14-20%) with no error signal. Full-file rewrite is capability-dependent: a small model corrupts the file, while a frontier model is usually correct but non-deterministic (it silently drops a field or edits a neighbor on some runs) and must regenerate the whole file, costing O(file size) per edit. We present an alternative that separates the semantic decision (which resource, field, and value) from the syntactic act of editing the file. The agent emits only a structured field-change intent; a deterministic pipeline indexes manifests by (kind, name), locates the target scalar's exact character span via the YAML parser's node position marks, and replaces only that span in the raw text. Because the file is never re-serialized, the diff is minimal by construction, formatting and comments are preserved, and the edit is correct and deterministic independent of the model, at O(1) generation cost. The contribution is the pairing of an LLM-proposed intent with a deterministic, fail-closed application contract for GitOps. We implement it in KubeAstra (Apache-2.0) and release the benchmark. Our claim is scoped to faithful application of a known change; whether the change is right is left to human PR review.
Related papers
- Diffs vs. Whole Files: An Empirical Comparison of Iterative Edit-Based and Direct Generation for Flutter/Dart Code Models [0.0]
We train two code models in two output regimes: direct generation and diff-based generation.<n>Direct generation substantially outperforms diff-based generation on every metric we measure.<n>We identify a single, architecture-independent mechanism behind the conditions where diff-based generation does win.
arXiv Detail & Related papers (2026-09-05T00:13:49Z) - Belief-Calibrated Optimization: An Explicit World Model for Agentic Optimization [31.31831511580543]
We introduce Belief-Calibrated Optimization (BCO), a method that writes that belief down as a persistent in-context document.<n>A fresh predictor given the accumulated document forecasts how the environment will respond more accurately than given either no document or a same-form copy whose content has been falsified.
arXiv Detail & Related papers (2026-09-01T20:47:04Z) - PatchWrite: One Line, Not One Section -- Compile-Gated, Validity-Preserving Editing for AI-Drafted Manuscripts [2.7819582252059405]
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.
arXiv Detail & Related papers (2026-08-24T09:04:19Z) - 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) - SemaDiff: Identifying Semantic-Changing Commits with Generated Code and Tests [5.3138104073306005]
Distinguishing semantic-preserving commits from changing ones remains an open challenge in software repository mining.<n>SemaDiff is a novel approach for identifying semantic-preserving commits through comparison of similar test execution on pre- and post-commit versions.<n>SemaDiff distinguishes accurately semantic-preserving from -- changing commits in about 76% of the cases, with a 100% precision in semantic-changing commit detection.
arXiv Detail & Related papers (2026-07-14T12:23:22Z) - PatchOptic for Shared-State LLM Workflows with Projected Views and Verified Structured Updates [0.013714053458441644]
We introduce PatchOptic, a contract between local updates and global validity.<n>Each workflow step declares a projected read view, an authorized write region, and a patch-source region.<n>We evaluate this design with PatchBench, a benchmark with 46 cases across reported leakage and token cost.
arXiv Detail & Related papers (2026-07-06T16:13:56Z) - What Context Does a Coding Agent Actually Need to Act? [0.0]
A modern coding agent can hold an entire repository in its context window.<n>We study when the agent must emphedit code.<n>We score context against real issue resolution on SWE-bench Verified.
arXiv Detail & Related papers (2026-06-19T04:22:17Z) - SWE-Edit: Rethinking Code Editing for Efficient SWE-Agent [17.74253780030394]
SWE-Edit decomposes code editing into two specialized subagents: a Viewer that extracts task-relevant code on demand, and an Editor that executes modifications from high-level plans.<n>On SWE-bench Verified, SWE-Edit improves resolved rate by 2.1% while reducing inference cost by 17.9%.
arXiv Detail & Related papers (2026-04-28T20:35:09Z) - MEMOIR: Lifelong Model Editing with Minimal Overwrite and Informed Retention for LLMs [76.28901550926021]
Existing methods for lifelong model editing compromise generalization, interfere with past edits, or fail to scale to long editing sequences.<n>We propose MEMOIR, a novel scalable framework that injects knowledge through a residual memory, while preserving the core capabilities of the pre-trained model.<n>MeMOIR achieves state-of-the-art performance across reliability, generalization, and locality metrics, scaling to thousands of sequential edits with minimal forgetting.
arXiv Detail & Related papers (2025-06-09T16:16:42Z) - ELDER: Enhancing Lifelong Model Editing with Mixture-of-LoRA [55.697627106315004]
Large language models (LLMs) require model editing to efficiently update specific knowledge within them and avoid factual errors.<n>Previous approaches manage sequential edits by freezing original parameters and discretely allocating new parameters for each knowledge update.<n>We propose ELDER, a novel approach to create a continuous association between data and adapters.
arXiv Detail & Related papers (2024-08-19T02:27:00Z) - Editing Arbitrary Propositions in LLMs without Subject Labels [88.67755930096966]
We introduce a simple and fast localization method called Gradient Tracing (GT)
GT allows editing arbitrary propositions instead of just binary ones, and does so without the need for subject labels.
We show that our method -- without access to subject labels -- performs close to state-of-the-art L&E methods which has access subject labels.
arXiv Detail & Related papers (2024-01-15T08:08:24Z) - Does Localization Inform Editing? Surprising Differences in
Causality-Based Localization vs. Knowledge Editing in Language Models [68.03946716358335]
We find that we can change how a fact is stored in a model by editing weights that are in a different location than where existing methods suggest that the fact is stored.
This is surprising because we would expect that localizing facts to specific model parameters would tell us where to manipulate knowledge in models.
Our results suggest, counterintuitively, that better mechanistic understanding of how pretrained language models work may not always translate to insights about how to best change their behavior.
arXiv Detail & Related papers (2023-01-10T21:26:08Z) - Memory-Based Model Editing at Scale [102.28475739907498]
Existing model editors struggle to accurately model an edit's intended scope.
We propose Semi-Parametric Editing with a Retrieval-Augmented Counterfactual Model (SERAC)
SERAC stores edits in an explicit memory and learns to reason over them to modulate the base model's predictions as needed.
arXiv Detail & Related papers (2022-06-13T23:40:34Z)
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.