Skip to content

Validate typed analysis responses before saving file evidence - #8

Merged
Yariminal merged 1 commit into
masterfrom
codex/typed-analysis-responses
Sep 29, 2026
Merged

Yariminal merged 1 commit into
masterfrom
codex/typed-analysis-responses

Conversation

@Yariminal

Copy link
Copy Markdown
Owner

A syntactically valid but empty, missing-field, or wrong-type model answer could previously become file evidence with default values. Every file-analysis prompt now validates a typed response inside the provider retry loop; exhausted retries persist an explicit failure without AI evidence or evidence-backed proposals.

  • Require prompt-specific fields, nonblank description/name, string tags, valid optional dates, and finite numeric confidence. Unknown keys are rejected so legacy date/transcript and _list fields cannot bypass the contract.
  • Accept one complete JSON object, a complete code fence, or a colon-ended prose introduction; reject trailing content, duplicate keys and incomplete containers. Generic relation/proposal parsing remains compatible.
  • Restrict provider _list unwrapping to LooseDict and bump analysis cache/provenance to v4 so prior unchecked cached results cannot be restored.

Validation: 507 Python tests passed, one Windows-specific skip; all six Node UI state checks and CLI smoke passed. Independent Astra review reproduced the contract bypasses and verified their fixes. The optional legacy Gemini SDK emits a deprecation warning. Contract and parser policy are documented in docs/ANALYSIS_RESPONSE_CONTRACT.md.

Implements follow-up PR 1 from #7. This validates response structure; model naming accuracy, consuming-app compatibility and physical 100–500 GB qualification remain separate roadmap gates.

@Yariminal
Yariminal marked this pull request as ready for review September 29, 2026 07:47
@Yariminal
Yariminal merged commit 91892ec into master Sep 29, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant