Toward Executable Repository-Level Code Generation via Environment Alignment
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) have achieved strong performance on code generation, but existing methods still struggle with repository-level code generation under executable validation. Under this evaluation setting, success is determined not by the plausibility of isolated code fragments, but by whether a generated multi-file repository can be successfully installed, have its dependencies and internal references resolved, be launched, and be validated in a real execution environment. To address this challenge, we propose EnvGraph, a framework for repository-level code generation that formulates repository executability as an environment alignment problem. EnvGraph jointly models two coupled conditions for successful repository execution, namely external dependency satisfaction and repository-internal reference resolution. It maintains a dual-layer environment representation, uses execution evidence to perform execution-evidence-based attribution, and guides repository generation through a unified targeted revision mechanism within an iterative alignment loop. We evaluate EnvGraph on repository-level code generation with three representative backbone LLMs and compare it against representative environment-aware and repository-level baselines. Experimental results show that EnvGraph consistently achieves the best performance on these repository-level benchmarks. In particular, it outperforms the strongest non-EnvGraph baseline by an absolute margin of 5.72--5.87 percentage points in Functional Correctness and 4.58--8.66 percentage points in Non-Functional Quality.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 21 of its 37 references that are in the map. First posted on arXiv 4 Apr 2026.
Builds on
21 of 37 references.
References · 21
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,442
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
- 2024A Survey on Large Language Models for Code Generationcited by 658
- 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 367
- 2023RepoBench: Benchmarking Repository-Level Code Auto-Completion Systemscited by 353
- 2023CrossCodeEval: A Diverse and Multilingual Benchmark for Cross-File Code Completioncited by 183
- 2023CodePlan: Repository-level Coding using LLMs and Planningcited by 140
- 2024RepoGraph: Enhancing AI Software Engineering with Repository-level Code Graphcited by 91
- 2024DevEval: A Manually-Annotated Code Generation Benchmark Aligned with Real-World Code Repositoriescited by 72
- 2024A Survey on LLM-based Code Generation for Low-Resource and Domain-Specific Programming Languagescited by 66
- 2025FEA-Bench: A Benchmark for Evaluating Repository-Level Code Generation for Feature Implementationcited by 58
- 2025Code to Think, Think to Code: A Survey on Code-Enhanced Reasoning and Reasoning-Driven Code Intelligence in LLMscited by 47
9 more
- 2025Repo2Run: Automated Building Executable Environment for Code Repository at Scalecited by 39
- 2024LLMs Meet Library Evolution: Evaluating Deprecated API Usage in LLM-based Code Completioncited by 32
- 2024On the Impacts of Contexts on Repository-Level Code Generationcited by 22
- 2024ExecRepoBench: Multi-level Executable Code Completion Evaluationcited by 20
- 2024VersiCode: Towards Version-controllable Code Generationcited by 17
- 2025Assessing and Advancing Benchmarks for Evaluating Large Language Models in Software Engineering Taskscited by 17
- 2025CODEMENV: Benchmarking Large Language Models on Code Migrationcited by 13
- 2024LibEvolutionEval: A Benchmark and Study for Version-Specific Code Generationcited by 12
- 2026Environment-Aware Code Generation: How far are We?cited by 4
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approaches
- 2026TICoder: A Repository-Level Code Generation Framework with Test-Driven Planning and Implementation-Aware Reuse ↗
- 2026ReCUBE: Evaluating Repository-Level Context Utilization in Code Generation
- 2026Do Not Treat Code as Natural Language: Implications for Repository-Level Code Generation and Beyond
- 2026Large-scale Repository Engineering via Agent-Native Reusable Code Primitives
- 2025EnvBench: A Benchmark for Automated Environment Setup
- 2026RepoZero: Can LLMs Generate a Code Repository from Scratch?
- 2026Adaptive Critical Token-Aware Retrieval for Repository-Level Code Generation