How to Run Acceptance Testing for Production-Grade Long-Horizon Coding Tasks

    This article explains how to evaluate AI models on long-horizon programming work that must reach a runnable, testable state under incomplete information, historical constraints, and explicit acceptance criteria. It argues that public leaderboard scores overstate real-world reliability, and recommends contrasting two task types—constrained legacy modification and from-scratch implementation—while breaking evaluation into progress, verifiability, and deliverability. It also covers process metrics, why long-horizon ability comes from the task environment rather than a new base model alone, and a concrete security acceptance checklist for asset import and referencing features. The takeaway: green tests are only the entry threshold to review, not proof of delivery.

    Long-horizon programming is not about writing a few more blocks of code. It is about pushing a task forward to a runnable, testable state when incomplete information, historical constraints, and acceptance criteria all exist at the same time. Looking only at public leaderboards makes it easy to overestimate how reliable a model is inside a real repository. A more useful approach is to contrast two clearly different task types: a legacy modification that carries historical baggage and security boundaries, and a from-scratch implementation that has only reference material and a requirements document. The first reveals whether the model can read an old system without breaking existing constraints; the second reveals whether it can chain analysis, design, implementation, and self-testing into a complete loop.

    Why Scores Alone Aren’t Enough

    Terminal-operation, software-engineering, and security benchmarks reflect local capabilities, but their problems usually have clear boundaries, immediate feedback, and a single success criterion. Production tasks are the opposite: context is scattered across contracts, data models, task state, interfaces, asynchronous execution, and front-end rendering. Correctness is not just a passing build or green unit tests; it also includes permission isolation, data ownership, failure retries, and change descriptions that a human can understand.

    Evaluation should therefore be split into three layers rather than collapsed into a single score.

    • Progress: Can the model hold the goal across a long context and keep making cross-module changes, instead of repeatedly rewriting unrelated code?
    • Verifiability: Can the changes be built and run locally or in continuous integration, and do they leave behind reproducible tests and operational steps?
    • Deliverability: Do permissions, input validation, error handling, and rollback hold up under human acceptance? All-green tests only mean the known cases pass; they do not mean unknown risks are covered.

    Using Two Contrasting Task Types to Surface Different Weaknesses

    The first task type suits a system with existing legacy code, where you add a single constrained new capability. For example, “secure import of user image assets, and their reference in animation scenarios.” During acceptance, don’t just check whether the page renders an image; check asset ownership, access scope, file type and size, and whether a reference can be assembled into an unauthorized path. This kind of task shows whether the model actually read the old module or built a parallel implementation beside it that bypasses existing validation.

    The second task type provides only domain learning material and a product requirements document, and asks for a complete, end-to-end learning application built from scratch. The point is not a polished interface but whether the rules are self-consistent: whether level goals, state transitions, failure conditions, progress saving, and completion判定 can explain one another. It tests the completeness of extracting concepts from the material, mapping them to data structures and interactions, and then filling in the tests yourself.

    Even when both task types “run through,” it is not enough. Legacy modification more easily exposes permission-isolation defects during human acceptance: the functional path is correct, but resource identifiers can be swapped, role checks live only in the front end, or the import interface and the reference interface rely on different authentication assumptions. From-scratch projects more easily develop rule holes: you can play to the ending, but skipping levels, duplicate submissions, or an abnormal interruption leaves the state inconsistent.

    Long-Horizon Capability Usually Comes from the Task Environment, Not Just a New Base Model

    A common industry practice is to expand the software-engineering environments covered by post-training and reinforcement learning on a similar base model: larger repositories, more realistic tool feedback, longer task chains, and environments that grow from single-file patches to multi-service integration. What this expansion improves is the strategy of “continuously correcting based on errors,” not an automatic qualification for secure delivery. No matter how many environments you add, they can only cover the failure modes seen during training; permission models, tenant isolation, and audit requirements depend heavily on the specific business and must be re-verified in the target repository.

    During evaluation, you can record these process metrics rather than only whether the final result passed:

    • The time to first reach a runnable version, and whether the time subsequently spent on verification and repair is comparable. If repair time approaches or exceeds the first implementation round, the model relies more on external feedback than on getting the design right the first time.
    • Whether cross-module changes propagate along existing contracts, rather than copying a parallel implementation.
    • Whether the modification scope shrinks after a failure. Large-scale rollbacks or unrelated refactoring usually mean the context has drifted.

    Security Acceptance Can’t Be Delegated to Green Tests

    A model can assist with white-box reading: flagging entry points that lack authentication, resource identifiers trusted from the client, and internal paths exposed in responses. This is not the same capability as “being able to complete an exploit.” Engineering-wise, you should require it to explain the threat assumptions and mitigations, and let a human decide whether to accept them. Do not treat automated review conclusions as a substitute for penetration testing.

    For features like asset import and referencing, the minimum acceptance can be fixed to the following:

    1. Identity-resource binding: An import record must belong to the current principal, and access must be re-checked at reference time; access cannot rely on a file name or object key alone.
    2. Server-side enforcement: Roles, tenants, and visibility scope are decided on the server; hiding a button in the front end is not a control.
    3. Input constraints: Type, size, path characters, and redirect targets have explicit rejection policies, and error messages do not leak internal structure.
    4. Reference consistency: Animation scenarios store a controlled reference, not an arbitrary external address or an assemblable internal path.
    5. Regression evidence: At least three negative cases—unauthorized access, duplicate submission, and illegal type—and they use the same authentication code as the normal path.

    A schematic server-side check should express “first resolve identity, then resolve the resource, and finally decide whether it is readable,” rather than handing the identifier straight to the storage layer:

    1. principal = authenticate(request)
    2. asset = lookup(asset_id)
    3. if asset.owner != principal.id and not principal.can_read(asset):
    4. reject
    5. return controlled_reference(asset)

    The value of this logic lies in the order: a successful lookup does not equal permission to access. Models often write “can be found” as “can be returned,” and human review should specifically watch for this skipped step.

    How to Turn a Single Evaluation into a Reproducible Conclusion

    Fix the input, environment, and definition of done for each evaluation, and avoid “it feels stronger.” Write the definition of done as a checklist: it can be built, the critical path runs, negative cases fail for the expected reasons, and the change description can point to the impact surface. For legacy tasks, the definition of done must also include “existing security constraints were not relaxed.” For from-scratch tasks, it should include “can be completed per the requirements document, and state can be recovered or fails explicitly after an abnormal interruption.”

    The conclusion is best split into two sentences: what it can do and what you can’t yet hand off. “Can do” means the model is worth trying in a real repository, especially for cross-module, time-consuming work that needs repeated revision based on test feedback. “Can’t hand off” means permissions, security, data migration, and final acceptance still need sign-off from someone who knows the system; all-green tests are only the threshold for entering review, not proof of delivery.

    If you connect a coding assistant to object storage, message queues, container platforms, and log monitoring, the evaluation should also cover keeping configuration and keys out of the repository, observable failures, and retryable task state. These are general engineering constraints that do not depend on a specific model or a proprietary interface of a particular cloud product. Designing the evaluation as a reproducible long-horizon task tells you more about whether it can genuinely reduce delivery pressure than chasing a single leaderboard ranking.