Skip to content

Code That Works, Environments That Don't: Measuring Environment Reproducibility in AI-Generated Software

Sep 2026 · 0 citations · 34 references
Computer Science

TL;DR

The findings establish environment specification as a distinct, measurable axis of code generation quality that current benchmarks do not capture, and motivate training objectives and evaluation protocols that jointly optimize for functional correctness and environmental portability.

Abstract

Code generation has emerged as a central capability of large language models, with coding agents now able to produce functionally correct software projects from natural language prompts. However, functional correctness alone does not capture a critical dimension of generation quality: environment specification, defined as the accurate identification of the dependencies required to execute generated code, is equally critical. We develop an agent protocol for environment specification and introduce a three-layer framework comprising declared, runtime-installed, and necessary-and-sufficient dependencies to systematically assess coding agents for environment specification. Using this protocol, we evaluate the extent to which coding agents systematically misspecify software environment dependencies and how this misspecification varies across three agents, four languages, and fifty programming tasks. Our results show that current coding agents exhibit systematic generalization failures along this dimension, producing dependency specifications that are inconsistent, redundant, or incomplete in ways that functional tests do not detect. Across agents, dependency set agreement is as low as 7% for identical tasks, and newer agents show no meaningful improvement, suggesting the failure is not resolved by scale or recency. The largest divergence occurs between the declared and runtime dependency layers, implicating environment priors learned from the models'training distributions as the primary driver. Our findings establish environment specification as a distinct, measurable axis of code generation quality that current benchmarks do not capture, and motivate training objectives and evaluation protocols that jointly optimize for functional correctness and environmental portability.

View source

Similar papers

#natural language process... Preprint Oct 2026

SpecGuardBench: Can Coding Agents Construct Reliable Validation Harnesses from Natural Language Specifications?

As coding agents become more capable, tests remain the primary evidence for judging whether their code is correct. Yet passing available tests does not establish that an implementation satisfies its natural language specification. Reliable validation requires checks that faithfully capture the specification and scenari...

Zhiqing Zhong, Ming-Yu Chen, Ao-Yang Fang et al. · 0 citations
Book Open access Oct 2026

Understanding the Code and Architectural Smells Generated by LLMs and Autonomous Agents

A systematic audit of technical debt in AI-generated software is presented, revealing that AI does not eliminate flaws but rather introduces a distinct "machine signature" of defects.

Yue-Cai Zhu, Nikolaos Tsantalis, Peter C. Rigby · 0 citations
#artificial intelligence Preprint Sep 2026

E2E-SWE: Benchmarking LLMs on Building Working Codebases from Scratch

E2E-SWE is introduced, a benchmark for evaluating whether coding agents can build complete, functional software repositories end to end and finds substantial variation in end-to-end repository generation ability, providing strong model differentiation while leaving considerable headroom for future progress.

Hantian Ding, Chloe Bi, Jia-Cheng Zhu et al. · 0 citations
#artificial intelligence Review Sep 2026

From Verification Failures to Reusable Guidance for Coding Agents

Coding agents need to establish that a program satisfies a specification and that the specification captures the requested behavior. We study how expert diagnosis of verification failures can become reusable guidance for this work. Our approach combines executable language definitions in the K framework with a kit of p...

Yu-Qing Zhai, Xiao-Hong Chen, Ling-Ming Zhang et al. · 0 citations
Review Open access Aug 2026

From Code Generation to Code Orchestration: Evaluating the Impact of Agentic AI on Software Development Productivity, Quality and Security

This paper reviews recent empirical literature to ask what the developer's job is shifting from typing code to directing agents that type code a change often summarized as a move from code generation to code orchestration.

P. N. Nesarajan, P. Thenmozhi, S. A. et al. · 0 citations
Review Sep 2026

Test-Driven Approaches to Software Engineering with Large Language Models: A Survey of Phases, Tasks, and Agent Skills

A structured scoping survey organized around the question of what decision a test changes is presented, and distinguishes the Red--Green--Refactor cycle from test-conditioned generation, execution-guided refinement, test-mediated analysis, and evaluation-only testing.

Yun-Hao Liang, Cheng-Guang Gan, Rui-Xuan Ying et al. · 0 citations

Related blog posts

Hugging Face Blog Oct 20, 2026

MPS in PyTorch 2.15

We’re on a journey to advance and democratize artificial intelligence through open source and open science.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.