Engineering Evaluation and Delivery Acceptance for Long-Horizon AI Coding

    This article presents an engineering framework for evaluating long-horizon AI coding beyond code generation. It separates “can write code” from “can deliver,” defines three levels of outcomes, and proposes two complementary tasks: extending a legacy system with controlled image-asset import and building a completable game from learning materials and requirements. It also covers independent acceptance, process evidence, and risk-based allocation of automation while retaining clear delivery accountability.

    1. Evaluating Long-Horizon Coding: Separate “Can Write Code” from “Can Deliver”

    Single-file completion, standalone function implementation, and local defect repair mainly test whether a model can produce reasonable code within a limited context. Long-horizon coding addresses a different class of problem: requirements are distributed across product documents and historical implementations; changes affect data models, interfaces, asynchronous tasks, and pages; and a design change in one area may force earlier implementation work to be redone. In this setting, the more valuable capability is maintaining a consistent understanding of the system and converging changes to a deliverable state after verification reveals deviations.

    An evaluation can classify results into three levels:

    • Functional path works: Under a given environment and test data, one normal path from entry point to result can be completed.
    • Tests pass: Existing and newly added tests report no failures, but the conclusion applies only to the conditions those tests actually cover.
    • Meets delivery standards: Key business rules have independent acceptance evidence; permission boundaries have been checked; and necessary failure handling, release conditions, and rollback plans are explicit.

    These levels cannot substitute for one another. A successful demonstration does not prove that abnormal states are handled. All tests passing does not prove that omitted access rules have been implemented. The following design uses two complementary tasks: one tests whether a model can extend functionality in a legacy system without breaking existing constraints; the other tests whether a model can build a complete product from materials and requirements.

    2. Task 1: Add Controlled Image-Asset Import to a Legacy Project

    2.1 Define Requirements by Data Flow, Not by a List of Page Actions

    “Upload an image and use it in an animation scene” sounds like two page features, but it actually spans asset intake, content validation, storage, scene references, preview, and rendering. If only the interface behavior is described, modules may work in isolation while holding different understandings of the same asset’s state and access scope. For example, a completed upload may mean only that the file has been received; it does not mean the file has passed validation, nor that an asynchronous rendering task will still have permission to read it when the task runs.

    Before implementation, therefore, the model should explain three things: where asset ownership is determined, what reference the scene stores, and under what identity preview and rendering read the asset. A clear design usually has the scene store a server-managed asset identifier rather than treating the storage address itself as an access credential. When an asset is processing, ready, or unavailable, the scene list, preview, and rendering should provide consistent or explicitly defined feedback. If an asset is deleted or access is revoked, the design should also specify in advance how existing references are displayed and how pending rendering tasks are handled.

    The evaluation focus here is not whether the model can draw a complete architecture diagram. It is whether the model can find the places that actually constrain the change: who maintains data ownership, which validations can be reused, which legacy behaviors must remain compatible, and which decisions require business confirmation. Making broad changes without this information often leads to correcting the same assumption repeatedly across multiple modules.

    2.2 Use Server-Side Authorization as the Source of Truth and Validate Each Read Entry Point Separately

    When receiving user images, content should not be judged only by file-name extension or a client-declared type. Server-side validation and actual decoding results should be combined, with reasonable limits on file size and decoding resources. Once an asset enters a scene, it should be treated as a controlled image resource; user-submitted content should not be treated as page markup or executed as script. For assets with access-scope requirements, hiding a frontend button is not access control.

    Permission acceptance should start from “who can perform which operation on which resource,” rather than checking only the upload page. The following is a set of acceptance cases suitable for this type of project; specific expectations should be determined by the project’s shared rules:

    Acceptance scenario Result to verify
    A member references an available asset within the member’s project Saving the reference is allowed; preview and rendering read according to the rules
    A member requests an asset they are not authorized to access The server rejects the request and returns neither file content nor a readable address
    An asset has not passed validation or has been deleted It is not treated as an available resource; pages and tasks return explicit results
    An asset’s access permission changes while a task is queued The task handles authorization at the predefined point and does not implicitly broaden access
    A legacy scene does not contain the new asset field Existing preview and rendering behavior remains compatible, or an explicit data-migration path is provided

    Preview and background rendering should be verified separately. They may use different code paths: preview may use the current user’s identity, while a background task may use a service identity. The fact that a service identity can read storage does not mean it may read any asset on behalf of any requester. A background task needs a trusted project and request context and must decide whether to continue according to explicit rules. Logs can record correlation identifiers and denial reasons to aid troubleshooting, but they should not contain sensitive file content or still-valid access credentials.

    2.3 Independent Acceptance Cannot Be Fully Replaced by the Implementer’s Tests

    In practice, a feature like this may appear to work yet manual acceptance can uncover a high-priority permission-isolation issue. This does not mean automated tests are ineffective; it means tests can verify only expectations that have been explicitly written down. If both the implementation and the new tests assume that an asset always belongs to the current project, then even if all tests pass, they cannot support the conclusion that “cross-project access has been correctly denied.”

    A more reliable approach is for the reviewer to write acceptance conditions independently based on business rules, then turn the issue into a durable regression case. Evidence that the issue is resolved cannot be limited to a single interface patch: the team should verify that the server performs authorization at the correct location, that preview and background tasks follow the same business policy, and that normal collaboration within a project still works. Until a data-isolation defect is closed, a successful feature demonstration should not be used as the basis for merge or release.

    3. Task 2: Build a Completable Game from Learning Materials and Requirements

    3.1 First Convert Materials into Testable Learning Objectives

    Building from scratch more easily exposes another deviation: the code structure may look complete and the pages may contain enough content, but the game does not actually assess the target knowledge. During evaluation, the model should first be asked to extract learning objectives, then decide question types and levels—not build pages first and fill in a question bank afterward.

    For example, around an agent’s task decomposition, tool invocation, and result verification, levels can be designed as follows: choose a reasonable sequence of steps based on goals and constraints; judge whether existing information is sufficient to perform an operation; and, when facing an incomplete tool result, decide whether to continue, retry, or stop and explain why. These levels assess the basis for decisions rather than terminology recall. A question’s premises, correct answer, and feedback should be traceable to the provided materials. If the materials do not support a unique answer, the design should add premises, accept reasonable multiple answers, or adjust the question rather than inventing rules.

    3.2 Define “Completable” Through State Transitions

    “The game opens” and “the game can be completed” are separated by a complete set of state rules. The most basic acceptance path should include entering the first level, submitting an answer, receiving feedback, unlocking subsequent levels, and reaching the end page. It should also specify whether wrong answers can be retried, whether returning to a previous level affects progress, and whether repeated submissions double-score or skip levels. If requirements explicitly call for preserving progress after refresh or supporting restart, recovery and reset behavior should also be verified separately rather than treated as a natural consequence of implementing progress storage.

    From an engineering perspective, question content and progress rules can be separated: the former describes prompts, answers, and feedback; the latter determines when to unlock, when to score, and when to declare completion. This makes it easier for teaching content to be independently reviewed by humans and for tests to be written for progress rules. Ultimately, however, the full flow must still be run in the actual runtime environment from the initial state to confirm that the interface triggers the correct actions, state updates are visible, and there is an explicit end result after the final level. For a learning product, the explanation after a wrong answer should also be checked to see whether it points out the missing condition, rather than only displaying the correct option.

    4. Record the Process to Compare Long-Horizon Coding Performance

    Long-horizon evaluation is easily misled by two kinds of numbers: code output and time to first implementation. More modified files may indicate broad coverage, or may indicate that existing structures were not reused. A fast first submission may also push most of the cost into subsequent fixes and human review. More meaningful is to record the entire process from understanding requirements to the end of independent acceptance, and to distinguish model execution, environment waiting, human clarification, and rework.

    Four types of evidence can be retained for each task:

    1. Task conditions: code starting point, input materials, available permissions, time budget, acceptance rules, and which decisions the model is allowed to make independently. These conditions should be kept as consistent as possible when comparing different runs.
    2. Key decisions: which dependencies and constraints the model identified, where it raised necessary clarifications, and which initial assumptions were overturned during execution. Proactively asking a question that avoids broad rework should not simply be scored as a performance penalty.
    3. Verification evidence: distinguish results reported by the model, tests actually executed, and results independently verified by the reviewer; note uncovered scenarios and the reasons. Tests that were not run cannot be recorded as passed.
    4. Delivery cost: record separately the time of first demonstrable result, the time of first meeting acceptance conditions, and the human intervention and rework between them. If environment configuration or input materials change during the period, record that as well to avoid misattributing external factors to differences in coding capability.

    Results from the two tasks should not be simply averaged. Unclear game-level wording can usually be improved as an ordinary quality issue; a permission-isolation failure in a legacy project may directly block delivery. The evaluation report should list performance by dimension, blocking issues, and evidence separately, rather than hiding the nature of the problem behind a single total score. A small number of cases is suitable for finding typical failures and for selecting follow-up pilot tasks, but it is not enough to produce a general capability ranking.

    5. Allocate Automation by Risk and Retain Clear Delivery Accountability

    In implementation, tasks with clear scope, easily verifiable results, and reversible changes can first be assigned to AI coding tools—for example, adding regression cases, organizing module dependencies, or implementing interactions with well-defined boundaries. For cross-module features, the model can drive implementation and verification, but review should be retained at points such as data contracts, permission rules, and final merge. For identity authentication, data isolation, or irreversible data changes, the responsible owner should confirm boundaries and release conditions before implementation begins; key acceptance evidence cannot be provided solely by the implementer.

    Whether long-horizon AI coding creates engineering value ultimately depends on whether it can reduce the team’s total cost from requirement to verifiable delivery without relaxing key constraints. Legacy projects require it to preserve existing boundaries; new projects require it to complete a product loop. Only by testing these two capabilities separately can teams know which work can be delegated more broadly and which judgments must remain with humans.