{"ID":6620578,"CreatedAt":"2026-07-15T01:01:48.440468303Z","UpdatedAt":"2026-07-15T03:28:55.185153975Z","DeletedAt":null,"paper_url":"https://arxiv.org/abs/2607.12541","arxiv_id":"2607.12541","title":"Taming the Drift: Context-aware Repair of Dockerfile Drift during Software Evolution","abstract":"Docker is widely used to create reproducible build environments, but Dockerfile drift, the divergence between a Dockerfile and its evolving source code, can cause CI/CD builds to fail. Existing rule-based and retrieval-based repair approaches analyze Dockerfiles in isolation and therefore struggle with context-dependent failures. We present Cadre, a context-aware framework for automated Dockerfile drift repair. Cadre uses static analysis to construct a Context-aware Dependency Graph (CDG), which maps each Dockerfile instruction to its file-level and inter-instruction dependencies. Guided by the CDG, Cadre first selects the context causally relevant to a failure and then generates a targeted patch from that context. We also introduce DodeX, a pipeline that mines real-world Dockerfile drift instances from GitHub Actions CI logs while preserving the complete build configurations omitted by static-snapshot datasets. Using DodeX, we construct $D^3$, a benchmark of 1,040 drift instances reproducible locally with the original CI parameters. Across $D^3$, Cadre achieves a 35.22\\% repair rate, 2.78$\\times$ that of the rule-based baseline and 1.24$\\times$ that of the best LLM-based baseline. Its two-step workflow keeps 95.25\\% of prompts below 30k tokens and avoids the prompt-overflow failures that prevent competing LLM-based methods from producing patches in 41 to 58 cases per method. Ablation results confirm that both the CDG and the two-step workflow improve repair performance. Cadre's advantage over diff-only approaches also increases as drift ages across commits, supporting explicit dependency modeling for context-aware infrastructure-as-code maintenance. Code and data are available at https://github.com/dw763j/Cadre.","short_abstract":"Docker is widely used to create reproducible build environments, but Dockerfile drift, the divergence between a Dockerfile and its evolving source code, can cause CI/CD builds to fail. Existing rule-based and retrieval-based repair approaches analyze Dockerfiles in isolation and therefore struggle with context-dependen...","url_abs":"https://arxiv.org/abs/2607.12541","url_pdf":"https://arxiv.org/pdf/2607.12541v1","authors":"[\"Chengjie Wang\",\"Jingzheng Wu\",\"Xiang Ling\",\"Tianyue Luo\",\"Chen Zhao\"]","published":"2026-07-14T09:12:26Z","proceeding":"cs.SE","tasks":"[\"cs.SE\"]","methods":"[\"Large Language Model\"]","has_code":false,"code_links":[{"ID":614245,"CreatedAt":"2026-07-15T01:01:48.440468303Z","UpdatedAt":"2026-07-15T01:01:48.440468303Z","DeletedAt":null,"paper_id":6620578,"paper_url":"https://arxiv.org/abs/2607.12541","paper_title":"Taming the Drift: Context-aware Repair of Dockerfile Drift during Software Evolution","repo_url":"https://github.com/dw763j/Cadre","is_official":false,"mentioned_in_paper":false,"mentioned_in_github":true,"github_stars":0}]}
