Green is not done

Green is not done

A coding agent fixed a bug in an existing Symfony application. One line, a reasonable change, and every check in the pipeline was green. The code was still wrong.

This talk is about the gap between a green pipeline and working software, and about what to do when automated feedback has quietly become the definition of done. It follows one real review finding through an existing codebase: what the harness could not see, which sensor would have caught it, and how that sensor gets built — a custom PHPStan rule, a test for the rule, and a baseline that lets an old codebase improve without stopping the work.

No live coding, no AI demos. It works the same way for teams that do not use coding agents at all.

Anne-Julia Seitz

November 26, 2026

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

31 slides
  1. Anne-Julia Seitz Software Developer from Berlin PHP since 2005 Organizer

    of the PHP & Symfony User Groups in Berlin with OPEN Digitalgruppe Symfony and Agentic Engineering trainings · community events · support for Symfony teams 2
  2. The task TICKET assigned to: coding agent Fetching video details

    hits the rate limit. Handle it, so the page keeps working. 3
  3. Where does this exception go? 1 try { 2 $this->fetchVideoDetails($videoId);

    3 $this->addFlash('success', 'Video details fetched successfully'); 4 } catch (Exception $exception) { 5 $this->addFlash('danger', 'Could not fetch video details: ' 6 . $exception->getMessage()); 7 } Could not fetch video details: Call to a member function getTitle() on null 4
  4. $ make ci cs-check ✓ rector ✓ phpstan ✓ deptrac

    ✓ phpunit ✓ infection ✓ All green. 5
  5. Green is not done. When a coding agent writes code,

    your CI becomes its definition of done. 6
  6. Agent = Model + Harness YOUR PROJECT’S HARNESS AGENTS.md skills

    make ci PHPStan rules THE CODING TOOL’S HARNESS context · tools · permissions · workflow Agent Model 9
  7. Guides before. Sensors after. Guides BEFORE · FEEDFORWARD AGENTS.md skills

    THE CHANGE Agent try { … } catch (Exception $e) { … } Sensors AFTER · FEEDBACK $ make ci phpstan ✗ phpunit ✓ ✗ finding 10
  8. Computational or inferential? Guides BEFORE Sensors AFTER Computational Inferential runs

    · same result every time judges · may differ next time types PHPStan scaffolding tests AGENTS.md make ci human review most of us start here skills LLM review 11
  9. Harnessability Some codebases are easier to harness than others. ✓

    EASIER TO HARNESS well structured big ball of mud HARDER TO HARNESS ✗ types mixed conventions clear module boundaries unclear boundaries fast commands honest exit codes clear error messages slow tests exit 0 on failure noisy output 13
  10. Legacy teams face the harder problem: the harness is most

    needed where it is hardest to build. — Birgitta Böckeler 14
  11. THE CHANGE catch (Exception $e) I stopped fixing the change.

    THE GATE phpstan ✓ phpunit ✓ I started fixing the gate. 15
  12. Which sensor could have seen it? $ make ci cs-check

    ✓ # formatting rector ✓ # upgrades, refactorings phpstan ✓ # types deptrac ✓ # layer dependencies phpunit ✓ # behaviour infection ✓ # test quality None of them. 17
  13. A guide that builds a sensor phpstan-rule-writer MY PART Do

    not catch \Exception or \Throwable. SKILL · A GUIDE check deptrac first rule + fixture + test run it on the real code a new sensor PHPSTAN RULE NoGenericExceptionCatchRule NoGenericExceptionCatchRuleTest no-generic-exception-catch.php never edit the baseline 18
  14. A sensor is code. Test it like code. false alarm

    fine code fine code fails → blind spot ✗ bad code → bad code passes useless message ✓ Error. → ? the agent can't act on it 19
  15. On success: silence. On failure: direction. $ make ci cs-check

    ✓ rector ✓ phpstan ✗ FetchVideoDetailsController.php Do not catch \Exception or \Throwable. Catch the specific exception you can handle and let the rest surface. 20
  16. One new rule. The old code was full of this

    pattern. 1 try { 2 // ask the graph database for statistics 3 } catch (Throwable $e) { 4 $this->logger->error('Stats query failed', [/* … */]); 5 return ['chunks' => 0, 'entities' => 0, 'relationships' => 0]; 6 } 21
  17. The baseline $ make ci cs-check ✓ rector ✓ phpstan

    ✓ # in baseline deptrac ✓ phpunit ✓ infection ✓ known violation → passes new violation → fails fixed violation → leaves the baseline 22
  18. Some of them were fine. 1 } catch (Exception $e)

    { 2 $this->lifecycle->fail($generation, $e->getMessage()); 3 throw $e; 4 } My rule was wrong. 23
  19. Naming the failure class is the hard part. Catching \Exception

    or \Throwable hides failures. Catching \Exception or \Throwable without handling or rethrowing hides failures. Catching is not the problem. Hiding is. 24
  20. Gone in one day An agent fixed them. I reviewed

    them. false alarms: fixed in the rule real ones: fixed by an agent 25
  21. When a bad change gets through 1 2 3 Name

    the failure class Gate can't see it? Build and test a sensor Old code fails? Add a baseline IMPROVE ONE YOU HAVE, OR ADD ONE PROTECT NOW, CLEAN UP LATER THE PATTERN, NOT THE INCIDENT Catching \Exception without handling or rethrowing hides failures. rule fixture test phpstan ✓ # in baseline 26
  22. Cleanup takes time. The baseline protects now. 1 foreach ($command->videoIds

    as $videoId) { 2 if ($this->videoRepository->findById($videoId) === null) { 3 // … 4 } 5 } phpstan ✓ # 12 in baseline since August · 0 new 27
  23. The harness grows one rule at a time Every name

    is a failure class. CommandHandlerMustDispatchDomainEvent InvokableCommandMustNotExtendCommand NoProtectedMemberInFinalClass CommandNameMustStartWithApp KnownRoleInIsGranted NoRepositoryCallInLoop CompareDateTime MutationControllerMustBeGranted PreferGetServiceOverNewInTest ControllerMustNotExtendAbstractController NoErrorSuppression PreferQueryBuilderOverDql ControllerMustNotInjectRepository NoExtendServiceEntityRepository RepositoryMethodNaming ControllerMustResolveUserViaCurrentUser NoGenericExceptionCatch ServiceMustHaveReadonlyProperties ControllerNameMustStartWithUseCase NoIsset SingleUseVariable CoverageAttributeMustTargetClass NoMagicNumber TestClassNameMustEndWithTest DbQueryOnlyInRepository NonAbstractClassMustBeFinal TestHookMustCallParent DoctrineRepositoryMustHaveTest NoNativeAssert UseCaseMustNotDependOnOtherUseCase EntityMustBeInMappedNamespace NoNewDoctrineRepositoryInTests WebTestMultiRequestMustDisableReboot IdValueObjectMustBeStringable NoNewInMemoryInTests ImmutableValueObject NoParameterPassedByReference 28
  24. Getting started 1 2 3 One command for the whole

    gate The agent runs it before “done” Green but wrong? $ make ci AGENTS.md phpstan ✓ Run make ci before you say you are done. Fix every finding. phpunit ✓ – never waits for input ASK A DIFFERENT QUESTION What is invisible to my gate? – right exit code – fast – only useful output 29
  25. The bug was not the catch. The bug was a

    sensor that could not see it. 30

More Decks by Anne-Julia Seitz

Other Decks in Programming