arXiv:2609.00227v1 cs.SE

모델에게 YAML 작성을 맡기지 마라: LLM이 제안한 필드 변경에 대한 결정론적 최소 diff GitOps 수정

Don't Let the Model Write the YAML: Deterministic, Minimal-Diff GitOps Remediation from LLM-Proposed Field Changes

Pruthvi Davineni

제출 2026-08-31

한국어 초록

LLM 에이전트가 사고를 진단하고 수정안을 제안하는 일이 점점 늘고 있다. GitOps 워크플로에서 수정을 적용한다는 것은 버전 관리되는 설정 파일을 편집하는 것을 의미하며, 모델이 편집된 파일이나 diff를 작성하게 하는 것이 가장 먼저 떠오르는 구현 방식이다. 실제 Kubernetes manifest에 대해 그 선택을 평가한 결과, 어떤 텍스트 생성 전략도 무인 자동화에 안전하지 않다는 것을 확인했다. Unified diff는 안전하지 않다: 엄격한 패칭에서는 거의 적용되지 않지만, 이는 GNU patch 같은 관대한 도구가 96%를 적용하기 때문인 아티팩트이며, 그럼에도 오류 신호 없이 약 7건 중 1건(14–20%)을 조용히 잘못 적용한다. 전체 파일 재작성은 능력에 의존한다: 소형 모델은 파일을 손상시키고, frontier 모델은 대개는 맞지만 비결정적이다(일부 실행에서 필드를 조용히 누락하거나 인접 필드를 편집)하며 편집마다 전체 파일을 재생성해야 해 O(파일 크기) 비용이 든다. 우리는 의미적 결정(어떤 리소스, 필드, 값인지)과 파일 편집이라는 구문적 행위를 분리하는 대안을 제시한다. 에이전트는 구조화된 필드 변경 intent만 출력하고, 결정론적 파이프라인이 manifest를 (kind, name)으로 색인한 뒤 YAML 파서의 노드 위치 mark로 대상 스칼라의 정확한 문자 span을 찾아 raw 텍스트에서 그 span만 치환한다. 파일을 다시 직렬화하지 않으므로 diff는 구조상 최소이고, 서식과 주석이 보존되며, 모델과 무관하게 편집이 올바르고 결정론적이며 생성 비용은 O(1)이다. 기여는 LLM이 제안한 intent와 GitOps용 결정론적 fail-closed 적용 계약의 결합이다. KubeAstra(Apache-2.0)에 구현하고 벤치마크를 공개한다. 주장의 범위는 알려진 변경의 충실한 적용에 한정하며, 변경이 옳은지는 사람의 PR 리뷰에 맡긴다.

원문 초록

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.

제출 이력

확인된 버전만 표시합니다. 전체 제출 이력은 arXiv 원문에서 확인하세요.

  1. arXiv:2609.00227v1제출 시각 미확인

함께 살펴볼 논문

공통 태그를 근거로 연결했습니다. 실제 인용 관계나 논문의 우수성을 뜻하지 않습니다.

공통 태그로 연결된 공개 논문이 아직 없습니다.

토론

이 논문과 연결된 포럼 글이 아직 없습니다.