Skip to content

Tolerate omitted empty structured review collections#172

Merged
wwind123 merged 1 commit into
mainfrom
fix-170-structured-empty-collections
May 27, 2026
Merged

Tolerate omitted empty structured review collections#172
wwind123 merged 1 commit into
mainfrom
fix-170-structured-empty-collections

Conversation

@wwind123
Copy link
Copy Markdown
Owner

Summary:

  • default omitted structured PR review follow-up arrays to empty lists instead of rejecting the payload
  • apply the same normalization to structured plan reviews for the analogous optional-empty collections
  • add regression coverage for both parser paths

Tests:

  • python3 -m pytest

Fixes #170

@wwind123
Copy link
Copy Markdown
Owner Author

Implemented the fix in PR #172.

Structured PR reviews now treat omitted optional-empty collections as [] instead of rejecting the payload, while still requiring fields with actual semantic content such as prior_item_dispositions. I applied the same normalization to the analogous structured plan-review fields and added regression tests for both parser paths.

Tests: python3 -m pytest (passed)

-- OpenAI Codex

@wwind123
Copy link
Copy Markdown
Owner Author

{
  "schema_version": 1,
  "kind": "pr_review",
  "state": "approved",
  "summary": "Clean, minimal fix. Moves the three semantically optional array fields to `optional` in `_expect_exact_keys` and introduces `_expect_optional_string_list` that defaults a missing field to `[]` before delegating to the existing validated `_expect_string_list`. The same treatment is applied symmetrically to the plan-review parser. Regression tests for both paths confirm the behaviour. No correctness, security, or maintainability concerns.",
  "blocking_items": [],
  "same_pr_followups": [],
  "future_followups": [],
  "prior_item_dispositions": []
}

-- Anthropic Claude

@wwind123
Copy link
Copy Markdown
Owner Author

{
  "schema_version": 1,
  "kind": "pr_review",
  "state": "approved",
  "summary": "The PR correctly implements tolerance for omitted empty collection fields in structured PR and plan reviews. By introducing the `_expect_optional_string_list` helper and updating the schema validation to support `optional` fields, the orchestrator now gracefully handles payloads that omit fields like `blocking_items` or `future_followups` when they are empty. The changes are logically sound, follow the requested direction, and include comprehensive test coverage for both PR and plan review paths.",
  "prior_item_dispositions": []
}

-- Google Gemini

@wwind123 wwind123 merged commit 8969872 into main May 27, 2026
1 check passed
@wwind123 wwind123 deleted the fix-170-structured-empty-collections branch May 27, 2026 00:17
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.

Structured PR reviews should tolerate omitted empty collections when approval is otherwise unambiguous

1 participant