2.0 KiB
Local strategy structured-output correction — 2026-10-29
The final local synthetic worker smoke exposed an inherited contract conflict after the cumulative regression freeze. A strategy snapshot requested a JSON object through GenerateSectionWithMetadataAsync, which called /cv/rewrite in its default text mode. That route explicitly instructed the model to return a CV and "No JSON." The real queued operation reached the provider but failed with invalid_provider_response; it was not silently accepted. This is separate from CV factual extraction qualification.
The correction adds one explicit StructuredJson generation mode to the existing adapter. Strategy snapshots select it; the sidecar uses JSON generation with a trusted task/schema and delimited untrusted source, requires an object, and returns the existing envelope. The backend's existing strategy schema validation, retries, ownership, persistence and approval boundaries remain unchanged. Text rewrite and CV block modes retain their existing prompts. Older adapters fail closed rather than pretending to support typed output. Mode-specific cache keys prevent a text response from satisfying a structured request.
Evidence: strategy-mode-red.log retains the original rejection (422) of the new mode. strategy-mode-focused/strategy-mode.trx passes ten backend tests; the updated strategy fixture only accepts the typed overload. The source-layer candidate image passes all 83 offline Python tests, including JSON-path selection, absence of conflicting CV rules and non-object rejection. Live runtime proof and final full backend outcome are recorded in LOCAL_RUNTIME_ACCEPTANCE.md. Prior 1,447-backend/81-Python and browser/PDF results remain bound to the earlier freeze; later tests are reported separately rather than rewriting that evidence.
This does not qualify model factual accuracy. The original failed operation and temporary-account cleanup evidence remain under local-ai/final-worker-journey-02/. No real user documents or production infrastructure were used.