Evaluating Long-Horizon Coding LLMs: Capability Gains and Delivery Limits

    This article explains how to evaluate large language models for long-horizon coding in real software projects. Leaderboard scores miss factors such as cross-module consistency, task progress, and implicit non-functional constraints. The article covers recent gains from post-training scaling, outlines six evaluation dimensions, and walks through two tasks: adding secure image asset import to a legacy system, and building a completable knowledge learning game from source material. Models can carry out much of the engineering work, but people must keep control of security and final acceptance.

    1. Key Conclusion: Capability Limits Are Rising, but Delivery Responsibility Cannot Be Outsourced

    Evaluating a large language model for long-horizon coding should not rely on leaderboard scores alone. Leaderboards measure fragment-level code generation, single algorithm problems, and short-context completion well. Real projects depend on different questions. Can the model understand complex context? Can it keep the design consistent across modules? Can it keep a task moving forward? Can it bring the result to a state that runs, passes tests, and holds up under regression testing? Can it avoid introducing high-risk defects under non-functional constraints?

    Based on the long-horizon coding performance of a recent Chinese large language model, two conclusions stand out.

    First, the capability ceiling is rising. The model no longer only completes a function or generates a page. It can understand the dependencies among the contract layer, data layer, task state, API layer, background executors, frontend, and renderer in a single-repository, multi-module project. It can keep driving cross-module changes forward. For long-horizon coding tasks, this class of model is worth testing on real projects.

    Second, it has not reached the point where “all tests pass” means the work is safe to deliver. Passing tests shows only that the explicit test cases succeed. It does not show that implicit constraints are met, such as permission isolation, tenant boundaries, resource ownership, audit completeness, rollback on failure, or content safety. In real projects, the model can make the main flow work, yet manual acceptance may still reveal high-priority permission isolation problems. For permissions, security, and final acceptance, people still need to stay in control.

    2. Upgrade Logic: Same Base, Greater Focus on Long-Horizon Post-Training

    Improvements in this version should not be read simply as a switch to a larger base model. A more reasonable reading is that the base model size may have stayed stable, and the upgrade came mainly from scaling in the post-training stage. Specifically, the number of long-horizon task environments grew significantly, the environment types became more varied, and training time increased. This lets the model accumulate experience across longer chains of work, more states, and more complex tool calls.

    This direction brings three noticeable changes.

    1. Coding ability emphasizes production-grade software engineering
      The model no longer aims only for correct code snippets. It places more weight on consistency across files, modules, and states, and on code that runs, can be tested, and can be maintained. The help is most visible for modernizing legacy systems, advancing multi-module repositories, and completing background task pipelines.

    2. Security ability extends from code generation to review and reasoning
      The model can take part in white-box code review, vulnerability pattern recognition, and risk reasoning, and it provides some value for basic security tasks. However, complete exploit chains, complex business-logic authorization bypasses, and cross-tenant data leakage still require professional security testing and manual acceptance. A model can identify risk points, but that does not prove a system is secure.

    3. Open-source strategy must keep pace with security assessment
      Open weights help developers self-host, verify, and keep improving the model. This benefit depends on completing security evaluation, model hardening, and risk disclosure at the same time. For enterprises, deciding whether to adopt open weights depends not only on capability. It also depends on security responsibility boundaries, deployment isolation, and auditability.

    3. How to Evaluate Long-Horizon Coding Ability: Six Dimensions

    Task-level metrics are a better basis for evaluating long-horizon coding ability than single-point leaderboards.

    • Context retention: Can the model keep domain models, permission rules, state machines, and historical constraints in mind across a long chain of work?
    • Cross-module consistency: Are data structures and state transitions consistent across the contract layer, data layer, API layer, frontend, and background executors?
    • Task progression: Can the model split work into a plan, then execute, verify, and fix it without losing the goal midway?
    • Runnable and testable: Can the deliverable start, run the key paths, and support new tests?
    • Error recovery: When a test fails, can the model locate the cause, fix it, and avoid introducing regressions?
    • Non-functional constraints: Are implicit requirements such as permissions, security, auditing, performance, and accessibility included in both implementation and acceptance?

    Useful metrics include time to first runnable build, success rate of cross-module changes, regression failure rate, manual rework time, security defect density, key-path test coverage, and maintainability review results. Do not invent specific performance figures. Instead, set a baseline in your own project and compare different versions on the same tasks.

    4. Task One: Securing a Legacy System Shows That “All Tests Pass” Does Not Mean Secure Delivery

    A representative task is adding “secure user image asset import and HTML animation scene asset references” to an existing project with a large amount of legacy code. This looks like file upload and resource referencing, but it includes several layers of constraints:

    • The legacy system already has user, tenant, role, scene, and resource models. The change must not break existing logic.
    • Image import requires file type validation, decode validation, size limits, metadata stripping, re-encoding, and content safety checks.
    • Storage keys must be isolated by tenant and resource ownership. They cannot rely only on parameters sent by the frontend.
    • When an HTML animation scene references an asset, the system must verify resource ownership and reference authorization to prevent cross-tenant unauthorized references.
    • Import, deletion, reference, and replacement actions require audit records.
    • Retry, rollback, and background task status must be observable.

    The model has clear strengths on this kind of task. It can read complex context, connect the contract layer, database, task state, API, background executors, frontend, and renderer, and keep moving the work toward a runnable, testable state. The problem is that a working main flow does not mean the permission model is correct. When manual acceptance reveals high-priority permission isolation problems, the model may have covered the happy path of “a normal user imports a normal image” but not the implicit security cases. Those cases include whether user A can reference an asset from tenant B, whether a low-privilege role can replace a resource in a higher-privilege scene, whether references become invalid after an asset is deleted, and whether audit records are complete.

    A safer import flow should show server-side authorization and resource ownership checks. The pseudocode below illustrates this:

    1. function importAsset(request, actor) {
    2. assert(actor.authenticated)
    3. const targetScene = loadScene(request.sceneId)
    4. assert(canEditScene(actor, targetScene)) // Server-side authorization, do not trust the frontend
    5. assert(targetScene.tenantId === actor.tenantId) // Tenant isolation
    6. const file = receiveUpload(request)
    7. assert(isAllowedImageByMagicAndDecode(file)) // Magic number plus decode validation
    8. assert(file.size <= MAX_SIZE)
    9. assert(file.width <= MAX_WIDTH && file.height <= MAX_HEIGHT)
    10. const normalized = stripMetadataAndReencode(file)
    11. const storageKey = buildTenantScopedKey(actor.tenantId, hash(normalized))
    12. const asset = saveAsset({
    13. ownerId: actor.id,
    14. tenantId: targetScene.tenantId,
    15. storageKey,
    16. status: "ready"
    17. })
    18. appendAudit({
    19. actorId: actor.id,
    20. action: "asset.import",
    21. assetId: asset.id,
    22. sceneId: targetScene.id
    23. })
    24. return asset
    25. }

    The reference step needs the same checks:

    1. function referenceAsset(sceneId, assetId, actor) {
    2. const scene = loadScene(sceneId)
    3. const asset = loadAsset(assetId)
    4. assert(canEditScene(actor, scene))
    5. assert(scene.tenantId === asset.tenantId) // Block cross-tenant references
    6. assert(asset.status === "ready")
    7. assert(canReferenceAsset(actor, scene, asset))
    8. saveReference({ sceneId, assetId, createdBy: actor.id })
    9. appendAudit({ actorId: actor.id, action: "asset.reference", sceneId, assetId })
    10. }

    The acceptance gate should include a permission matrix test suite, unauthorized access cases, cross-tenant reference cases, reference invalidation after resource deletion, audit completeness checks, retry and rollback tests for failures, and protection against tampering with frontend parameters. The model can help generate these test cases, but people must confirm the security boundaries.

    5. Task Two: From Source Material to a Completable Knowledge Learning Game

    The second task differs considerably. The model receives only one agent learning document and one product requirements document, and must build a knowledge learning game from scratch that players can actually complete. This task tests completeness from source analysis through to a working product, not understanding of an existing system.

    The model must work through several steps. It needs to extract core concepts from the material, design the knowledge graph and level order, define question and feedback mechanisms, implement a state machine, progress persistence, error messages, and completion logic, build the frontend interaction, and add tests for key paths. The success criterion is not that the game starts. It is that players can complete the game from start to finish, the state can be recovered, errors receive feedback, the content has no factual errors, and the key paths can be tested.

    For this type of task, the model usually produces a fairly complete engineering skeleton. It can even turn a product requirements document into a runnable level system. People still need to verify several things: whether the knowledge extraction is accurate, whether the difficulty curve is reasonable, whether the feedback actually helps learning, whether the completion logic has loopholes, and whether abnormal states can be recovered. Building a product from scratch can easily look complete while still falling short on playability, knowledge accuracy, and accessibility. These areas require manual review.

    6. Shared Lessons From the Two Tasks

    The legacy security task focuses on meeting constraints and security boundaries. The from-scratch product task focuses on requirement decomposition and completeness. Together they show that the value of long-horizon coding models lies not in single-point generation but in sustained progress and a verification loop. For engineering, a staged workflow works best:

    1. First, have the model produce an impact analysis, a permission matrix, a test plan, and migration steps.
    2. Next, implement the work module by module, requiring each step to run and pass tests.
    3. For security-related changes, add manual security review and unauthorized-access test cases.
    4. Use regression tests, audit checks, and manual acceptance together as gates.
    5. During release, combine a general-purpose container platform, logging service, monitoring and alerting, and rollback mechanisms to build observability.

    The final assessment is that this class of long-horizon coding model is already worth testing in real projects, especially for long, cross-module, testable coding tasks. Permissions, security, and final acceptance should still stay under human control. Treating the model as an efficient executor and risk flagger, rather than as the party that carries security responsibility, is the safer engineering approach.