interesting framing. I agree that AI makes implementation cheaper, but I’m a little skeptical that behavioral end-to-end tests alone can become the main source of authority.
They are strong for validating user-visible workflows, like the single-use password-reset example. But many expensive failures live below that layer: authorization boundaries, race conditions, migrations, performance under load, data integrity, and operational behavior in production.
It feels like the real challenge is deciding which parts of the specification need deterministic checks at each layer not just E2E, but unit, integration, contract, security, and observability-based verification too.
Still, the principle is solid: the agent should not be the only system deciding that its own work is correct. The most interesting part for me is whether we can make those different verification signals easy enough for an agent to iterate against autonomously.
@[JustineDevs] I agree, and I think this is an important qualification to the argument.
I don't see behavioral E2E as the single source of authority. I happened to be experimenting with this layer because the question was whether an implementation exhibited a specified user-visible behavior. The claim changes, and so does the appropriate verifier.
An authorization boundary might need security and integration tests. A migration needs data-integrity checks. A race condition may need concurrency testing. Performance needs load testing, and production behavior may need observability signals. The common principle isn't "E2E verifies everything." It's that the system making a claim should have an appropriate, independent source of evidence for that claim.
Your last point is where I think this gets especially interesting for agentic development. If those different verification layers can return structured, deterministic evidence in a form the agent can consume, then the loop doesn't have to stop at pass/fail E2E results. Unit, integration, contract, security, performance, and operational signals can potentially become different kinds of evidence feeding the same refinement loop.
So perhaps the architecture isn't one verifier at all. It's a set of verification authorities, selected according to the claim the agent is trying to make.
The agent can propose. The harder design problem is deciding what gets authority to say it was right.
The password reset bug is a good example because it's exactly the kind of thing that never shows up in a demo. Nobody clicks the same link twice on stage.
I've been circling the same split from the API side rather than the testing side, mostly around whether an action can repeat safely and whether a failure tells the caller what it's allowed to do next. Your point about specifications outliving implementations is that idea from another angle. "This link becomes invalid after one use" isn't really a test case, it's an operating contract, and it has to hold regardless of which route or framework happens to sit underneath it that month.
The "don't let the student grade the exam" section is the part I'd underline for anyone skimming this. An agent testing its own understanding of a requirement just proves it's internally consistent. It doesn't prove it's correct, and those are very different claims to ship on.
@[Mike Dabydeen] I like “operating contract” as the distinction here. That’s probably a better way to describe what I was reaching for.
“This link becomes invalid after one use” shouldn’t belong to the implementation, and it shouldn’t really belong to the test either. It’s a property of the system that both implementation and verification have to answer to.
That becomes especially important with generated code because the implementation is suddenly much more disposable. An agent might replace a route, swap a library, restructure the persistence layer, or regenerate most of the feature and still produce something that looks correct in a demo. The operating contract is what has to survive all of those changes.
Your API point also adds something I didn’t spend enough time on: failure behavior is part of that contract. It isn’t enough to specify what happens when an operation succeeds. Whether an action may be retried, whether it is idempotent, and what a failure permits the caller to do next are all observable behaviors too.
And yes, that’s exactly why I keep coming back to the student grading the exam problem. If the same agent interprets the requirement, writes the implementation, and decides whether the implementation satisfies its interpretation, you can get a beautifully self-consistent system that is consistently wrong.
The interesting engineering problem now is making the operating contract independent enough, and executable enough, that an agent can iterate against it without also being allowed to quietly redefine what “correct” means.
Systems architect and technical product leader with roots in bare-metal engineering and decades of e... Show moreSystems architect and technical product leader with roots in bare-metal engineering and decades of experience building core infrastructure. From legacy distributed foundations to modern local-first, data-sovereign AI architectures in Go, Python, and Kotlin, I specialize in designing high-integrity data pipelines and leading elite engineering teams. Show less