dch_004 · Deployment Handler: spec with empty sections_for_live → 400

Status: ✓ Passing · Last run: 2026-06-09T07:14:31 · Pipeline: deployment_handler · History: 1/1 runs passed (100%)

What was tested

Project has a deployment_spec but sections_for_live=[] — the composer authored a spec but the section-extraction step produced nothing runnable. Handler must return 400 with "no sections" rather than running execute_live_refresh on an empty list (which would succeed with empty html and silently mask the bug).

What we planted in the data

What the system did

What we checked — all assertions passed

Status Assertion Detail
handler_returns_status handler returned 400 (body error='deployment has no sections to refresh')
handler_error_message_mentions handler error mentions 'sections'

How this could have gone wrong

(no assertion descriptions provided)

Why this case matters

An empty sections_for_live means the composer or extractor silently dropped everything. The handler returning 200-with-empty- html would let that bug ship to the FE Live tab as a blank page with no actionable error. Forcing a 400 means ops sees the failure immediately.

Reproducing

# from auto_insight_api/
python -m validation.v2 run dch_004 --pipeline deployment_handler -v

← back to validation report