A periodical about version control, git, and the future of agentic version control.

Trunk-Based Development Release Confidence in Software Factories

Independent validation of real user journeys keeps trunk releasable.

· 8 min read
Cover illustration for “Trunk-Based Development Release Confidence in Software Factories”
Software Factory Operations · November 21, 2026 · 8 min read · 1,890 words

Trunk-based development in a software factory needs validation that keeps up with AI-generated changes. Small, frequent merges cannot keep the main branch releasable when tests and review no longer show whether the product works as intended. Continuous, independent validation of real user journeys gives teams the evidence they lack, while humans stay responsible for requirements and release decisions.

What trunk-based development's releasability promise actually requires

Anything on main should be safe to release to production at any moment. Qodo's trunk-based development reference identifies four supporting requirements, namely short-lived branches, small frequent merges, automated tests that block unsafe changes, and fast human review that keeps pace with merges. Small changes leave less code to review, and fast review keeps those changes from waiting so long that branches outlive the short-lived branch model.

DORA research connects the practice to higher deployment frequency and shorter lead time. Teams get those benefits when they meet the supporting conditions as well as follow the branching convention. If review stalls or validation misses unsafe behavior, having code on main no longer shows that it is ready to release. The model predates agentic tooling by decades, and its assumptions about review and validation were calibrated to humans producing work at a human pace.

How AI coding agents flood trunk with volume the original model never assumed

Coding agents produce just the small, frequent PRs that trunk-based development calls for, but the supporting checks can struggle to keep up. Hazesoft identifies database migrations from a schema diff, scaffolding that mirrors an existing service, API clients from a spec, and mechanical refactors as productive uses of agents. These tasks contain repeated patterns and relatively little judgment. Generation is therefore no longer necessarily the slowest step. Review and validation must keep up with the output while checking it as closely as they did when frequent integration was safe.

That shift does not remove the need for contextual decisions. Hazesoft distinguishes generation from judgment about trade-offs, naming, dependency longevity, security posture, and the direction of the roadmap. Faster production leaves those responsibilities with people, even as it increases the number of changes requiring their attention. DORA's guidance on AI-assisted development warns that more code moving faster can overwhelm pipelines and manual review gates. re-cinq's software factory blueprint describes an eight-state constraint model in which resolving one bottleneck exposes the next. In this case, the visible symptom is a review queue backing up, with PRs waiting days and becoming long-lived branches under another name.

Why passing tests and a clean deploy no longer certify that the main branch is releasable

Passing CI remains necessary, but it is insufficient. AI-generated code can have valid syntax, pass its tests, and deploy cleanly while implementing the wrong interpretation of a requirement. An agent can write tests that assert faulty behavior, over-mock dependencies, or weaken assertions until CI turns green. Hazesoft also identifies plausible-looking APIs that do not exist and subtly wrong error handling among machine-written failure patterns. Some defects are detectable by existing checks, but passing those checks does not establish that the implementation matches the intended behavior.

A clean deploy establishes that an artifact built and landed, leaving whether a user's journey still works end to end unverified. re-cinq's software factory explainer identifies a structural comprehension gap behind this distinction. When nobody wrote the code by hand, understanding it must be produced deliberately rather than emerging as a by-product of implementation. The implementation agent must therefore have no control over the evidence used to accept its work. Otherwise, the same mistaken assumption can shape both the change and the proof offered for it. Red Hat's trusted software factory approach applies that principle to infrastructure, where trust must be built before code is written, too early for extra security scans at the end to supply it.

The confidence gap between how teams feel about AI-generated code and how prepared they actually are

A majority of manufacturers trust AI agents to make software release and deployment decisions without human oversight, yet fewer than a third consider their organization very prepared to operationalize, govern, and scale AI agents and autonomous testing. These figures concern manufacturers, but they expose the distinction between willingness to delegate and readiness to govern. Trust in an agent does not itself provide evidence that a release is safe. Preparedness requires the ability to evaluate that evidence and assign responsibility for the decision.

The gap also appears in deployment behavior. More than half of manufacturing organizations have deployed code changes without fully testing them, with leadership pressure for faster delivery and overwhelming volumes of AI-generated code among the leading reasons. This is a governance problem as well as a validation problem, because increased output is being accepted without equivalent assurance. Humans must retain ownership of requirements and release decisions rather than treating generation as a transfer of accountability. Hazesoft requires a named engineer's sign-off on every merge to main, meaning “I can explain every line of this diff and I would have written — or rejected — it myself”.

What a layered validation strategy for trunk actually looks like under AI volume

A layered strategy matches validation depth to change risk and merge stage rather than applying one flat test suite to everything. Hazesoft's delivery loop applies static analysis and type checks to every diff, eval suites with pass thresholds to AI-facing behavior, and human sign-off to intent and fit. The quality bar does not change with authorship. Nor did the team shorten review and eval gates to match the faster pace of generation. Those steps were protected because they had become the scarcest and most valuable work in the pipeline.

Red Hat operationalizes a complementary set of controls through Policy as Code. Its layers include automated artifact and dependency validation, SLSA provenance, SBOMs, SAST scans, and releases gated on the results. re-cinq defines validation as checking behavior against the specification through tests, scans, and independent review. Provenance and security checks address concerns that behavioral tests do not replace, while review addresses intent that mechanical checks cannot establish.

Qodo projects that trunk-based teams will increasingly route review by risk, allowing low-risk changes to merge after an automated check while people concentrate on riskier ones. A rename and a payment-path change need not wait in the same queue.

Why PR-level and unit-test gates cannot catch journey-level regressions

PR review and unit tests check the code and the test conditions set for it. By themselves, they do not observe whether the running application still delivers the complete journeys promised to users. An agent can produce an internally consistent PR whose implementation and tests share the same mistaken reading of the spec. The defect can survive review because the pieces agree. Running the intended flow against a running deployment tests whether those pieces work together to give the right system-level behavior.

Hostinger's hforge system demonstrates that distinction through a proof subagent that tests the change on the PR preview and reports back to the worker before review. Qovery also uses live ephemeral preview environments so a test agent can exercise changes against a deployment. These patterns extend verification beyond code inspection. However, a PR preview and the integrated application on trunk remain different validation stages. Evidence about one change does not remove the need to examine user journeys after it has merged.

This is an argument for observing execution and inspecting logs so that the verifier's own failures do not remain silent. At high PR volume, a nominal test result is too weak if nobody can establish what the test agent actually exercised.

Continuous journey-level validation as the missing layer that makes TBD's guarantee hold

Continuous Agent Validation extends independent behavioral verification to the running application after every merge to trunk. Its role is to exercise real user journeys and return recordings, logs, and reproduction steps. The generator should not grade its own work, because its assumptions may be precisely what needs testing.

Tools in this category read a team's specs, docs, and product discussions to understand intended behavior, then deploy browser agents to run user journeys against the live application after every change. Failures return recordings, logs, and reproduction steps that engineering and product teams can use to assess the result.

Capacity must also track the pace of change. Validation should scale up during a launch and run more lightly afterward, since a fixed QA headcount cannot handle spikes in generation on its own. Findings can then flow directly to the coding agent, removing a human relay from the fix loop without removing human authority over requirements or release.

How the feedback loop from validation back to the coding agent makes trunk smarter over time

Direct feedback makes failures actionable, but persistence gives corrections value beyond the current change. Without a way to keep corrections, LLM-based coding agents can make the same kinds of mistakes across sessions. A 2026 paper proposes codifying every accepted review comment as a persistent behavioral rule, with a self-review checklist executed before submission. This is a proposed mechanism. It gives the next generation cycle explicit constraints drawn from prior corrections.

SWE-Review, introduced in July 2026, formalizes a generate-review-revise loop at PR level. Its reviewer agent explores the repository, decides whether a PR should be accepted, and supplies structured feedback for revision. The framework's experiments show improvements over single-turn review in decision accuracy and resolve rate after revision. The reviewer helps guide revisions, while the rest of the validation stack still has to check how the code behaves and whether it is ready to release.

For re-cinq, this process is part of a Learning capability. Review findings and production failures lead to changes in tests, instructions, and reusable workflows, which a named owner reviews before other teams use them. For trunk-based teams, journey failures can thus lead to lasting checks as well as one-off fixes.

What trunk-based teams should put in place to restore the releasability guarantee in a software factory

The practical response is to close four distinct gaps without asking any one layer to substitute for the others. At merge time, teams should apply static analysis, type checks, dependency checks, and security scanning to machine-written and human-written code under the same standard. Boilerplate should not receive a softer review. Before merge, behavioral verification should exercise the PR against the spec and provide structured feedback for revision.

After every merge, an independent browser agent should run the critical user flows against the deployed application and send back recordings, logs, and reproduction steps. Those findings should make failures actionable and traceable to the change that introduced them. The fourth layer feeds accepted corrections back into behavioral rules that the coding agent can check before its next submission. People remain responsible for reviewing that evidence. In particular, adopting a correction as a reusable rule requires judgment about whether it reflects the product's requirements beyond the circumstances of one failure.

For startups without dedicated QA, the minimum viable stack is narrower but retains all the necessary stages. It combines Playwright tests on the three to five stable critical paths, an exploratory agent run on every PR preview, and journey-level validation after every merge to main. Engineers review findings and set release policy. Validation then operates as continuous infrastructure at machine speed, with human gates placed according to risk. Humans own the release decision, and the stack exists to give them evidence they can trust.

Sources

  1. Trusted software factory: Building trust in the agentic AI era

More in Software Factory Operations