Ilmu Komputer & AI editorial
Don't Let the Model Write the YAML: Deterministic, Minimal-Diff GitOps Remediation from LLM-Proposed Field Changes
The core problem
Innovation
Unified diffs are unsafe for unattended automation. Under strict patching, almost none apply, but this is an artifact of strictness. A tolerant tool such as GNU patch applies 96% of diffs, 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. In contrast, the deterministic pipeline achieves correct and deterministic application independent of the model, with minimal diffs and preserved formatting and comments. The generation cost is
The evaluation compares two LLM-driven text-generation strategies against a proposed deterministic pipeline. First, unified diffs are tested under strict patching and tolerant patching (GNU patch). Second, full-file rewrite is assessed across a small model and a frontier model. The proposed alternative has the agent emit only a structured field-change intent. A deterministic pipeline then indexes manifests by (kind, name), locates the target scalar's exact character span using 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
Why it matters
Who should read this
Opening member content…