Evaluating Long-Horizon Code Models: Capabilities, Limits, and a Human-in-the-Loop Acceptance Checklist

    The latest generation of long-horizon code models has genuinely raised the ceiling for complex engineering tasks. This article explains why long-running, multi-module tasks reveal more than benchmark scores, how to design differentiated evaluation tasks (legacy system modification vs. building a product from scratch), the authorization flaws that functional tests missed in a real internal assessment, and a practical checklist for combining model-driven development with human security acceptance. Readers will learn how far these models can go—and where humans must stay in the loop.

    Let me start with the verdict: the new generation of long-horizon code models has genuinely pushed forward the upper bound on complex engineering tasks. What matters more than a single benchmark score is whether a model can understand complex context over a long task, continuously drive cross-module changes, and carry a task through to a runnable, testable state.

    But “all tests green” does not mean “safe to ship.”

    In an internal evaluation, we asked a model to handle two kinds of tasks simultaneously: incremental modification of a legacy system, and building a product from scratch. Both projects ran successfully, but the legacy project exposed a high-priority authorization isolation flaw during human acceptance review. The takeaway: long-horizon code models are now worth testing against real projects, especially for long-running programming tasks—but when it comes to permissions, security, and final acceptance, humans cannot let go.

    1. Why Long Tasks Reveal Engineering Value Better Than Benchmarks

    Single-point code generation benchmarks typically focus on function-level or snippet-level tasks. They saturate easily and fail to capture the complexity of real projects. Real engineering tasks involve legacy code, implicit constraints, multi-package repositories, frontend/backend contracts, task state machines, background processes, rendering pipelines, and security rules.

    To keep working under these conditions, a model needs at least several capabilities:

    1. Long-context understanding and key information retrieval—locating relevant modules within large amounts of historical code.
    2. Cross-file, cross-module consistency—avoiding contract drift when only one place is changed.
    3. Failure recovery and task progression—continuing to locate and fix issues after test failures or build errors.
    4. Change impact analysis—explaining which interfaces, data, and permission boundaries a change affects.
    5. Test-writing and execution awareness—moving from “it runs” to “it’s verifiable.”

    Therefore, when evaluating long-horizon code models, the core metric should be task closure rate: whether the model can complete requirement analysis, code modification, test supplementation, execution verification, and delivery documentation within the given constraints. Benchmark scores are a useful reference, but they should not replace observation on long tasks in real projects.

    2. Designing Two Deliberately Differentiated Tasks

    To avoid over- or under-estimating model capability in a single scenario, evaluation tasks should be deliberately spread apart.

    Task type 1: Incremental modification of a legacy system. In a project with substantial historical code, the model was asked to add “secure user image asset import and HTML animation-scene referencing” capability. This task involves interface contracts, object storage, database records, task state, background job processes, frontend pages, and an HTML renderer. It primarily tests whether the model can understand an old system, follow security constraints, and handle cross-module changes. Security constraints should be written explicitly into the task description—for example: file type whitelisting, size limits, path traversal protection, resource ownership validation, privilege escalation prevention, and audit logging.

    Task type 2: Building a product from scratch. Given only a set of public agent learning materials and a product requirements document, the model was asked to build an agent-knowledge learning game that can be completed end-to-end. This task tests materials analysis, requirement decomposition, level state design, frontend/backend implementation, test coverage, and the completeness of a runnable delivery.

    One task leans toward “secure modification of a legacy system”; the other toward “from materials to product.” Together they give a fairly comprehensive view of the model’s real boundaries on long-horizon tasks.

    3. The Real Weakness in Legacy System Modification: Authorization Isolation

    Both projects ran successfully, but the legacy project exposed authorization isolation problems during human acceptance. This kind of issue is typical: functional tests pass, pages render, APIs return data—yet resource ownership and operation permissions are never strictly validated.

    Common vulnerabilities include:

    • Entry points hidden only in the frontend, with no backend authorization
    • Query APIs that only check login state, not resource ownership
    • Background jobs running with excessive privileges
    • Temporary access links that can be guessed or reused
    • Missing data isolation between tenants

    A model can generate functionally correct code, but security invariants must be explicitly defined, tested, and reviewed by humans.

    Illustrative pseudocode:

    1. // Anti-pattern: only checks login, not resource ownership
    2. function getAsset(assetId, userId) {
    3. return db.assets.find(assetId);
    4. }
    5. // Correct: validates tenant, ownership, and operation permission
    6. function getAsset(assetId, userId, tenantId) {
    7. const asset = db.assets.find({ id: assetId, tenantId });
    8. if (!asset || asset.ownerId !== userId) {
    9. throw new ForbiddenError();
    10. }
    11. return asset;
    12. }

    The point of this pseudocode is that authorization isolation cannot rely on hidden frontend entry points or the assumption that “the normal path won’t access this.” Every resource access must undergo ownership and tenant validation on the server side. For long-horizon code models, these security constraints must be stated explicitly in the task description and verified with privilege-escalation test cases—otherwise “runnable” can easily mask “exploitable.”

    4. How Far Can “Materials-to-Product” Completeness Go?

    In the from-scratch agent learning game task, the model could read the materials, extract concepts, design the level structure, generate frontend and backend code, and add tests—turning the product requirements document into a first runnable prototype.

    But product acceptance still requires human judgment: whether learning objectives are accurate, whether the difficulty curve is reasonable, whether level state can be restored, whether anti-cheating and data persistence are reliable, and whether interactions match expectations. Models are well suited to rapidly building the “first runnable prototype”; they are not suited to going live unattended.

    5. Where the Capability Gains Come From—and Their Limits

    Technically, these improvements do not necessarily come from swapping the base model. They may come from scaled-up post-training: expanding the number and variety of long-horizon task environments, extending training time, and introducing failure-recovery and tool-calling scenarios, all of which strengthen sustained cross-module work. Security capability has extended from code generation to white-box code review and vulnerability reasoning; performance on basic security tasks has improved, but gaps remain on full vulnerability-exploitation scenarios.

    Open weights are typically released after security evaluation and model hardening, allowing developers to deploy, verify, and improve on their own. These changes show that capability is growing—but boundaries remain: being able to advance a task does not mean being able to bear final security responsibility.

    6. Engineering Recommendations: A Human-Machine Acceptance Checklist

    1. Before the task, define security invariants and a permission matrix—which resources belong to which tenants, which users can perform which operations—and write acceptance criteria into the task description.
    2. Require the model to output a change impact analysis and test plan; enforce human review on high-risk modules.
    3. After the task, run automated tests, privilege-escalation tests, audit log checks, and human acceptance—focusing on resource ownership, temporary links, background job permissions, and cross-tenant isolation.
    4. Keep rollback plans and gray-release strategies so that model-driven changes never enter the production critical path directly.
    5. Treat model output as a reviewable engineering draft, not an automatic deliverable.

    Conclusion

    Long-horizon code models are now capable of continuously driving complex tasks in real projects—especially long-running programming, cross-module modification, and prototype delivery. But permissions, security, and final acceptance must remain in human hands. Teams should establish a “model advances + human accepts” collaborative workflow, and use real projects to probe capability boundaries rather than relying solely on benchmark scores.