Evaluating LLMs on Long-Horizon Coding: Benchmarks vs. Real-World Engineering

    This article examines why public benchmark scores fall short when evaluating coding-focused large language models, and proposes a two-task framework based on incremental refactoring in a legacy project and building a runnable system from documentation. It summarizes how the latest generation improves long-horizon coding through scaled post-training rather than a new base model, shares observations on cross-module execution and a P1 permission-isolation blind spot, and provides a reusable acceptance checklist covering authorization, security constraints, data-layer integrity, testability, and change traceability. Human oversight remains essential for permissions, security, and final acceptance.

    1. The Problem: Why Benchmark Scores Are Not Enough for Coding LLMs

    When evaluating a new version of a coding-focused large language model, the most common mistake is to draw conclusions directly from public benchmark scores. A score reflects average performance on a specific dataset, whereas real engineering work is defined by long dependency chains, tight coupling, and hard constraints. A single change often spans data contracts, persistence, task state, the API layer, background executors, and front-end rendering. Missing any one of these can make the whole system unusable.

    A more reliable approach is to construct two complementary types of tasks:

    • Incremental changes in a legacy project with historical baggage and security constraints, which tests context understanding and constraint compliance.
    • Building a runnable system from scratch using only reference material and a requirements document, which tests the full path from information extraction to a working product.

    This article applies that dual-task framework to summarize the long-horizon coding performance of a new-generation model and to provide a transferable acceptance process. It is worth emphasizing that no matter how capable the model is, steps involving permissions, security, and final acceptance must still be owned by humans.

    2. The Technical Logic of the Version Update: Same Base, Expanded Post-Training

    This generation does not replace the base model. It still uses the large-parameter foundation from the previous generation, and the gains come mainly from scaled expansion in the post-training stage: the number of long-horizon task environments has grown by more than an order of magnitude, the environment types are more diverse, and training time has increased significantly. The official summary groups the changes into three directions.

    • Coding capability: positioned as a leading open-source model for code, staying at the top of the open-source field in terminal-oriented tasks and deep software engineering evaluations, with an emphasis on long-horizon and production-grade engineering.
    • Safety capability: extended from “generating code” to white-box code review and vulnerability reasoning; basic security tasks approach the level of leading closed-source models, though there is still a gap in complete exploitation-chain scenarios.
    • Open-source strategy: full weights will be released after security assessment and model hardening are complete, making self-deployment, verification, and further improvement easier.

    This roadmap shows that the focus of the improvement is not “writing a single code segment better,” but “maintaining a consistent goal across long tasks.”

    3. Comparative Experiment Design: Two Tasks, Two Kinds of Pressure

    Task A (incremental change): In a project with years of legacy code, add the capability to “securely import user image assets and reference them in an HTML animation scenario.” This task stresses four things at once: understanding existing abstractions, complying with security constraints, advancing across modules, and maintaining backward compatibility.

    Task B (from scratch): Given only learning material and a requirements document, implement a knowledge-learning game that can be fully completed. This task stresses requirement decomposition, material structuring, state machine design, level-loop closure, and testability.

    Both tasks ended up “running,” but Task A exposed a P1-level permission isolation defect during manual acceptance, which highlights the blind spot of automated testing.

    4. Observations from Testing: Long-Task Momentum and Acceptance Blind Spots

    On long-task execution, the new-generation model can understand complex context, keep making cross-module changes, and bring the task to a runnable and testable state. This is a noticeable improvement over the previous generation, which was once used to add an animated-video generation path in a single-repo, multi-package structure: the first implementation took about seventy-plus minutes, with another hour or so for verification and fixes.

    However, on security boundaries, the model tends to treat “functionally correct” as sufficient and easily overlooks consistency checks between resource ownership and the accessing subject. A representative defect looks like this:

    1. // Defect: only file type is checked, resource ownership is not
    2. public void importAsset(UUID userId, MultipartFile file) {
    3. if (!isAllowedImage(file)) throw new BizException("Type not allowed");
    4. UUID assetId = storage.save(file); // userId not bound
    5. assetDao.insert(assetId, null); // owner is null
    6. }

    The fix is to explicitly model the “subject-resource-action” triple and enforce constraints at the data layer:

    1. public void importAsset(UUID userId, MultipartFile file) {
    2. UUID assetId = storage.save(file);
    3. assetDao.insert(assetId, userId); // strongly bind ownership
    4. }
    5. // The read path goes through authorization checks uniformly
    6. public AssetView get(UUID userId, UUID assetId) {
    7. Asset a = assetDao.get(assetId);
    8. if (!a.ownerId().equals(userId)) throw new AccessDeniedException();
    9. return AssetView.of(a);
    10. }

    5. A Reusable Acceptance Checklist: From “It Runs” to “It Can Ship”

    1. Permissions and isolation: check resource ownership, unauthorized access, and the boundary between administrators and regular users item by item, and add negative test cases.
    2. Security constraints: upload features must validate type, size, and content characteristics, and apply signing and expiry control to storage access.
    3. Data consistency: add database-level non-null and foreign-key constraints to ownership fields to prevent a “null owner” from slipping through.
    4. Testability: require the model to produce unit, integration, and end-to-end cases at the same time, covering exception branches.
    5. Long-task traceability: record each change and its verification result to support manual spot checks and retrospection.

    6. Conclusion and Recommendations

    The conclusion is clear: the new-generation model has pushed the ceiling of domestic open-source coding capability higher, and it is worth testing on real projects, especially for long-horizon coding. However, humans must not let go when it comes to permissions, security, and final acceptance. Teams are advised to adopt a standard onboarding process of “dual-task comparison + negative test cases + data-layer constraints,” and to combine it with general cloud capabilities such as object storage, log services, and monitoring and alerting on Baidu AI Cloud to build a traceable, alert-driven acceptance loop, so that intelligent coding can safely enter production.