Once compute opens up candidate generation, a new challenge immediately follows:On what grounds can an automatically Agent-generated change be written into the project's main trunk?The strict acceptance and historical inheritance mechanism completely decouplesgenerationfromadoption—any code submitted by an Agent is merely acandidate patch, and it must first pass a set of verification gates before it qualifies to be recognized as part of the project's history.
Default-candidacy principle
Agent output is by default treated asuntrusted input: it is strictly isolated from accepted versions in permissions, storage, and references—it can neither read or write the trunk directly, nor be treated as a stable dependency by other modules. The sole purpose of this principle is to eliminate "generate-then-commit." Only after passing all gates does a candidate patch attain the same standing as the trunk.
Four-layer progressive filtering: escalating cost, early failure
- Compilation: Buildable at the syntax and interface level. Lowest cost, fastest elimination—blocks obviously invalid changes at the door first.
- Testing: Unit and integration tests pass, covering existing contracts.
- Behavior check: Semantic and behavioral consistency, including numerical tolerances, equivalence, and regression comparison, specifically guarding against "tests pass but behavior drifts."
- Upper-level acceptance: The final verdict oriented toward task goals and engineering constraints, covering judgments on performance, speedup, maintainability, and more.
Gates are ordered from lowest to highest cost, so the vast majority of invalid changes are cut off at the cheap stages, reserving the expensive upper-level review for a small number of high-quality candidates—this is precisely the economics of "fail early."
The value of rejection and historical inheritance
Failed attempts don't enter the trunk, but can be retained asfailure archives / negative samples, used for diagnosis, deduplication, and preventing repeated exploration—rejection itself is a round of noise filtering. Changes that pass acceptance become the newbaseline version, and subsequent executors continue evolving on this foundation, forming a monotonically accumulating evolution chain rather than starting from scratch each round. As the merge rule and quality contract for multi-Agent collaboration and recursive task decomposition, the acceptance gateway defines "who can write to history," thereby determining whether collaboration results in convergence or entropy increase. In scenarios with strong correctness constraints such as compiler refactoring and scientific software upgrades, this mechanism demonstrates extremely high reliability and delivers considerable runtime speedup.
