FACTORY_OUTCOME: COMPLETED

The root cause is strongly supported by evidence but not directly observed. In JSON mode, DeepSeek blanks any non-JSON output and still returns 200/`stop`. I haven't proven the blanked text was prose; the operator query in the report settles that. The fix is written and tested offline. I made no paid calls, Builder runs, publishing or deploys. The live DB was unreadable from here, so I worked from your summarised evidence.

**Root cause**
- **Provider docs:** the DeepSeek JSON docs say that in `json_object` mode, non-JSON output is replaced with spaces and `finish_reason` is still `stop`. I fetched them through a summarising tool, so the exact wording is unverified.
- **Token count:** 60–105 completion tokens is about a normal Pete reply, so a real answer was most likely blanked.
- **Our request:** it always used JSON mode. The system prompt had no JSON example, which the docs require. The repair call was also in JSON mode, so it was blanked again.
- **Extraction:** it discards nothing. `empty_content` means every byte was plain whitespace.
- **SAAS-050:** its prose salvage could never run, because the prose never reached us.

**Changes**
- **Prompt:** it now says "json", forbids prose outside it, and includes a valid example object.
- **Blank first answer:** the single repair call now goes without JSON mode, so any text becomes visible. If that comes back as prose, the customer sees it and the specification stays unchanged. Blank twice fails with a new `empty` category, and there is still a maximum of 2 provider calls.
- **Diagnostics:** two additive columns record the exact content size and whether JSON mode was on. Whitespace-only text is no longer stored.
- **Operator script:** `bin/saas-architect-response-evidence.php` prints counts and sizes from a copy of the DB. It prints no response text and no user or site ids.

**Tests**
- **New:** `tests/architect-blank-content-regression.php` has 13 checks. They cover three whitespace shapes, blank then prose, blank twice, malformed, schema mismatch, valid, and the prompt example.
- **Passing together:** blank-content, reliability, repair, multilingual, builder-handoff, resilience, saas-041 and chat/mobile all pass, as do `php -l` and `git diff --check`.
- **Edited tests:** I changed `architect-repair` and `architect-diagnostics` to match the new behaviour: blank then prose now succeeds by design, and blank twice has its own category.
- **Pre-existing failure:** `architect-diagnostics-regression.php` still fails on the "no response content, even with raw flag ON" check. It asserts raw capture is off, and commit 3c3d736 turned it on. That needs an owner decision.
- **Not replayed:** the real provider hasn't been replayed; the tests only replay the observed response classes.

**Recommendation:** deploy SAAS-050 and SAAS-051 together, because the blank recovery depends on SAAS-050's salvage, `spec_updated` flag and approval gate. The uncommitted Builder files are independent and should go separately.

**Uncertainties**
- **Blanked text:** whether it was prose or broken JSON.
- **Prompt example:** whether it reduces non-JSON replies is unmeasured. If blanks stay frequent, dropping JSON mode entirely is the next option, and that is an owner decision.
- **Malformed and schema repairs:** these remain unexplained until the operator reads their stored text.

The report has the deploy steps and the operator evidence query.

Files are in `/home/iovon/ai-factory/workspaces/saas-website`:
- `docs/e2e/SAAS-051-REPORT.md`
- `tests/architect-blank-content-regression.php`
- `bin/saas-architect-response-evidence.php`