Black-Box Program Reconstruction: High-Reasoning Agents Break Zero Pass Rate

    A new black-box program reconstruction benchmark requires agents to rebuild software from observable behavior alone, without source code, decompilation, or network access. This article covers the task definition, the strict all-pass evaluation design, the first non-zero results achieved by high and ultra-high reasoning configurations, a reusable probe–infer–implement–validate–revise workflow, and the implications for agent engineering and cloud platforms.

    Problem Definition: From Source Access to Behavior-Only Observation

    Traditional code generation or completion tasks usually provide the model with function signatures, surrounding code, comments, or even the full repository. The model’s job is closer to completing local logic within a known structure. The black-box program reconstruction benchmark pushes difficulty to another level: the agent receives only a compiled executable and a documentation file. No source code is provided, decompiling the executable is prohibited, and network access is disabled. The model must design its own probing methods, observe how the program behaves under different inputs, parameters, environments, and boundary conditions, infer its internal rules, and then reimplement a program that can be built, run, and pass hidden tests.

    This task resembles behavior-level reverse reconstruction in software engineering, but with stricter constraints. It is not about guessing the return value of a function; it requires the model to complete an engineering loop: understand the program’s purpose, design a probing strategy, recover input-output relationships, infer state machines and exception paths, choose an implementation language, set up the underlying architecture, write all logic by hand, generate build scripts, and cover boundary behavior as much as possible without seeing the hidden test set. For the agent, the real difficulty is not producing code that runs, but building a verifiable behavior model from extremely limited information.

    Evaluation Design: Strict Constraints and Real-World Software Forms

    The evaluation covers about 200 real-world tasks of varying complexity, ranging from small terminal text-processing and search tools to larger compilers, multimedia processing frameworks, and embedded relational databases. The wide variety of task forms means the model cannot rely on fixed templates or match patterns for only one class of input and output. It must decide which programming language to use, which architecture to adopt, how to organize modules, how to generate build scripts, and how to trade off key design decisions in software engineering.

    The constraints are strict in several dimensions:

    1. No source code: The model cannot read the implementation logic directly and can obtain external behavior only by executing the executable.
    2. No decompilation: The model cannot restore code structure through disassembly or decompilation.
    3. No network access: The model cannot search for public implementations, documentation, or community answers.
    4. Only documentation and executable: The documentation may be incomplete, so boundary conditions, exception handling, and implicit conventions must be probed.
    5. Automated validation: The backend uses agent-driven fuzzing to generate more than 240,000 targeted behavioral test cases across all tasks.
    6. All-pass criterion: The submitted program must pass the entire test set for the corresponding task to count as solved. A tiny deviation in even one edge test causes the whole task to fail.

    This validation method rules out “roughly working” implementations. It requires correctness not only on the main path but also in details such as parameter combinations, invalid inputs, resource limits, format boundaries, and exit status. For the agent, probing and implementation must form a closed loop: probing discovers behavior, behavior drives implementation, hidden tests expose deviations, and deviations drive further correction. Because the hidden tests are invisible, the model can improve coverage only through probe cases it designs itself, which makes strategy design a core variable.

    Significance of Breaking Zero: Reasoning Budget Determines Long-Horizon Engineering Capability

    For a long time, the solve rate of leading open-source and closed-source models on this benchmark remained at 0%. This is not surprising: black-box program reconstruction requires long-horizon planning, hypothesis management, experiment design, and error repair, and a break in any link leads to final test failure. The first non-zero result came from high and ultra-high reasoning configurations: the model solved complete instances and increased the number of tasks with unit-test pass rates of 95% or higher to 26. By contrast, the default medium reasoning configuration performed modestly, barely outperforming a contemporary medium-configuration comparison model.

    This phenomenon shows that reasoning budget has a direct impact on black-box program reconstruction. Such tasks are not single-step generation but multi-stage search: propose a behavior hypothesis, design probe inputs, revise the hypothesis based on observations, generate an implementation, and validate it repeatedly. A higher reasoning budget gives the model room to maintain longer hypothesis chains, compare multiple probing strategies, identify exception paths, and locate the source of deviations after failures. Looking at the cumulative score histogram, the ultra-high reasoning configuration performs better on multiple statistical measures: whether using average score, median, or different pass-rate thresholds, it is in a more favorable position. The lesson is not simply to pursue a “larger model” but to match task difficulty with reasoning budget: for long-horizon, strongly constrained engineering tasks with all-pass validation, sufficient thinking space is itself part of the capability.

    Methodology Breakdown: A Reusable Workflow for Black-Box Reconstruction

    Black-box program reconstruction can be abstracted as a loop of “probe—induce—implement—validate—revise.” The following is illustrative pseudocode that does not depend on specific tools or interfaces:

    1. Input: executable, documentation
    2. Constraints: no source code, no decompilation, no network access
    3. candidate_behaviors = []
    4. for probe_case in design_probes(documentation, executable):
    5. observation = execute(executable, probe_case)
    6. candidate_behaviors.append(infer_rules(probe_case, observation))
    7. behavior_model = induce(candidate_behaviors)
    8. implementation_code = generate_implementation(behavior_model)
    9. build_script = generate_build_script(implementation_code)
    10. while uncovered_behaviors_exist or validation_fails:
    11. deviation = compare_expected_and_actual(build_artifact, validation_cases)
    12. behavior_model = revise(behavior_model, deviation)
    13. implementation_code = update_implementation(behavior_model)
    14. return implementation_code, build_script

    In engineering practice, the following strategies are especially useful:

    • Start with a main-path model: Begin with documented examples and basic parameters, and confirm input format, output format, exit status, and error messages.
    • Then use differential probing: Compare neighboring inputs, boundary values, empty values, oversized values, and parameter combinations for the same function to infer rule branches.
    • Recover state and resource behavior: For programs involving files, streams, capacity, timeouts, concurrency, or resource limits, focus on state transitions and exception paths.
    • Keep the implementation buildable: Choose a language familiar to the team with a simple build chain, and prioritize reproducible builds and stable executable artifacts.
    • Use incremental validation instead of one-shot rewriting: Generate validation cases for each recovered behavior group to avoid accumulating incorrect assumptions.
    • Keep probe logs: Store inputs, observations, hypotheses, and revision reasons in a structured form so they can be traced during long-horizon reasoning.

    Implications for Engineering Practice

    First, the acceptance standard determines the optimization direction. An all-pass criterion means edge paths are as important as the main path. When developing agents, it is not enough to aim for “generating runnable code”; an evaluation of behavior coverage is needed. Second, reasoning budget should be schedulable. Simple completion tasks do not need an ultra-high budget, while black-box reconstruction, cross-module refactoring, and complex defect localization should allow longer thinking chains and more validation rounds. Third, probing strategy is a new type of engineering asset. High-quality probe cases, behavior difference records, and revision traces can be consolidated into reusable evaluation sets and training signals. Fourth, build and runtime environments must be standardized; otherwise, even if the model writes correct logic, it may fail because of inconsistent build scripts, dependencies, or artifact forms.

    For cloud platforms and intelligent development platforms, this type of benchmark points to general capability-building directions: provide isolated execution environments, reproducible build pipelines, behavioral test orchestration, log tracing, and reasoning-budget configuration so agents can complete long-horizon engineering tasks in a controlled environment. It is important to note that black-box reconstruction still involves a cost-benefit balance: high-reasoning configurations consume more computing resources and suit high-value, strongly validated tasks, while default configurations suit routine code generation. In the future, how to automatically determine the reasoning level a task requires, how to generate more effective probe cases, and how to improve first-fix success rates under all-pass validation will be key to the evolution of agent engineering capability.