How to Scientifically Evaluate the Long-Horizon Coding Ability of Large Language Models

    This article introduces a practical methodology for evaluating the long-horizon coding ability of large language models. It explains why leaderboard scores alone are insufficient, proposes a dual-track test design covering legacy system refactoring and from-scratch product delivery, shares key findings from real testing—including a high-priority permission isolation flaw that passed all automated tests—and offers actionable recommendations for engineering teams on layered acceptance, security testing, and interpreting model upgrades.

    How to Scientifically Evaluate the Long-Horizon Coding Ability of Large Language Models

    As code-generating large language models iterate rapidly, more and more teams are integrating them into real software engineering workflows. But this raises a critical question: how do you objectively measure the actual value delivered by a model upgrade? Leaderboard scores alone cannot answer engineering questions like “can the model push a cross-module requirement all the way to a runnable, testable state?” Drawing on hands-on testing with two representative task types, this article discusses an evaluation methodology that stays closer to production reality.

    1. Why Leaderboard Scores Are Not Enough

    Benchmarks—such as terminal-based coding benchmarks and real-repository bug-fixing benchmarks—have genuine value. They provide a unified yardstick for horizontal comparison and reveal a model’s capability ceiling in specific dimensions. However, benchmark tasks are typically closed, single-shot, and scored against explicit criteria, while real development work is characterized by:

    • Complex context: Existing projects often carry years of legacy code spanning multiple modules, interface contracts, and implicit constraints.
    • Ambiguous goals: Requirement documents never enumerate every edge case; the model must infer them on its own.
    • Layered verifiability: Passing unit tests is only the minimum bar. Security, permissions, and performance issues often lie outside the test suite.

    A serious model evaluation should therefore center on “the real completion quality of long tasks” rather than “how many problems were solved in one shot.”

    2. Designing a Dual-Track Test

    To assess both “understanding legacy systems” and “building from scratch,” you can design two distinctly different tasks.

    Task 1: Legacy System Modification with Security Constraints

    In a project with a substantial body of existing code, add the capability for “secure user asset import and referencing assets in page animation scenarios.” The difficulty of this task lies in three areas:

    1. The model must first understand the existing interface contracts, data models, and task state transition logic.
    2. Asset import inherently involves security boundaries: file type validation, storage path isolation, and cross-user access control. A lapse in any of these introduces high-severity defects.
    3. The change is cross-module—spanning backend APIs, task queues, and frontend display—requiring the model to maintain contextual consistency throughout.

    This type of task tests whether the model can advance cross-module changes under constraints: it must not break existing behavior while properly implementing new requirements.

    Task 2: Delivering a Complete Product from Scratch Using Only Reference Materials and a PRD

    The second task provides only learning materials and a product requirements document, asking the model to implement a fully playable knowledge-learning game from scratch. It evaluates the complete closed-loop capability: material analysis, architecture design, frontend interaction, state management, and content orchestration. Unlike the modification task, there is no existing codebase to reference—the model must decide the tech stack, directory structure, and implementation order on its own.

    3. Evaluation Results and Key Findings

    Across both tasks, the new generation of models demonstrated clear improvements in long-horizon coding ability: they could work continuously in a multi-module single-repository environment, maintain consistent cross-file modifications, and push tasks to a runnable, testable state. The from-scratch task ran through the entire pipeline from materials to product—something that typically required multiple rounds of human intervention with the previous generation.

    More noteworthy, however, are the problems that surfaced. In the legacy modification task, although all automated tests passed, manual acceptance uncovered a high-priority permission isolation flaw: user-uploaded assets lacked strict ownership verification along the referencing chain, creating a risk of unauthorized cross-user access. The tests were “all green” because the existing test cases never covered cross-user access scenarios—and the model did not proactively recognize the need to add such security tests.

    This case reveals a general pattern:

    • Models excel at completing “explicitly requested features” but still require human oversight for “implicit security and permission constraints.”
    • “All tests passing” does not equal “safe to ship”; test coverage itself is part of the evaluation.
    • The more a scenario involves permissions, data isolation, or input validation, the more indispensable manual acceptance becomes.

    4. How to Correctly Interpret a Model Upgrade

    When evaluating a new model version, assess its real value from three dimensions:

    1. Has the base model changed? If the base model is unchanged, improvements mainly come from post-training reinforcement—for example, expanded long-horizon task training environments, more environment types, and longer training duration. Such upgrades typically yield the largest gains in long-task stability and goal retention, with limited change in knowledge breadth.
    2. Do the capability dimensions align with your scenarios? Officially advertised strengths like “leading coding ability” or “enhanced security review capability” need to be mapped to your own business. A team focused on code review, for instance, should prioritize verifying the model’s depth of vulnerability reasoning rather than its terminal operation scores.
    3. Openness and deployment cost: For teams that prioritize data security, open-weight models enable private deployment, custom hardening, and continuous fine-tuning. When rolling out, you can combine common cloud service categories—object storage, container platforms, log services, monitoring and alerting—to build a complete model serving pipeline without being locked to a specific vendor.

    5. Practical Recommendations for Teams

    Based on the testing and analysis above, here are several actionable suggestions:

    • Evaluate with real projects: Pick a medium-sized repository with genuine legacy baggage, design a feature requirement with security constraints, and observe the model’s end-to-end performance.
    • Include security tests in evaluation cases: Explicitly require test coverage for cross-user access, privilege escalation, and malicious input scenarios in the task definition, and observe whether the model proactively fills the gaps.
    • Establish a layered acceptance process: Use automated tests as the initial filter, and focus manual acceptance on permissions, security, and boundary conditions. Neither can be omitted.
    • Track leaderboards without over-relying on them: Use leaderboards to shortlist candidate models, but let real project performance drive the final decision.

    6. Conclusion

    The long-horizon coding ability of the current generation of open code models has crossed the threshold of “ready to be tested on real projects,” showing impressive completeness in both cross-module modification and from-scratch construction tasks. Yet they are still far from the point where “tests passing” means “safe to ship unattended.” For engineering teams, the right attitude is: adopt actively, evaluate scientifically, and insist on human oversight in critical areas. As model capabilities evolve, the methodology for evaluation and acceptance must evolve in step.