---
id: w1/m5/t005
title: Test coverage — meaningful tests for the build path (+ webhook gap-fill)
worker: worker1
status: done
estimate: 30m
depends_on: [w1/m5/t002, w1/m5/t003]
---

## Objective

Add meaningful tests for what this milestone ships: build Job spec generation (Dockerfile vs CNB selection, registry/builder from env), build-failure surfacing on App status (not silent), and image-reference correctness. The webhook shipped in w2 with its own tests (`deploy_test.go`) — only gap-fill whatever t003's verification found missing (e.g. non-tracked-branch ignore, store-on bump surviving a projector resync). Assert real behavior and failure modes — never tautological.

## Acceptance criteria

- [ ] Failure modes covered: failed build reflected in App status, wrong-builder selection impossible, plus any webhook gaps t003 filed.
- [ ] `make test` (operator) and `go test ./...` (backend) green.
