Skip to content

Add claude structured review output#56

Merged
dbrosio3 merged 4 commits into
mainfrom
add-claude-structured-review-output
Jun 24, 2026
Merged

Add claude structured review output#56
dbrosio3 merged 4 commits into
mainfrom
add-claude-structured-review-output

Conversation

@dbrosio3

@dbrosio3 dbrosio3 commented Jun 24, 2026

Copy link
Copy Markdown
Member

Summary

  • Upgrade the Claude local AI adapter to use Claude Code native structured output via --output-format json and --json-schema.
  • Feed Claude’s structured_output object through Pushgate’s shared native-object normalization path and local semantic validation.
  • Preserve existing provider config, model selection, timeout handling, auth detection, read-only repo access, and provider-neutral verdict behavior.
  • Tighten Claude structured-output envelope handling and keep exact provider CLI assertions at the provider adapter test surface.

Implementation Notes

  • Reuses generateAiReviewOutputJsonSchema() from the canonical Zod review contract instead of duplicating schema definitions in the Claude adapter.
  • Adds normalizeProviderReviewObject() for native structured providers while leaving text fallback normalization available for other adapters.
  • Marks Claude as native_json_schema; Copilot remains on JSONL transport.
  • Distinguishes unsupported structured-output behavior, malformed transport, invalid review objects, auth failures, timeouts, and command failures.
  • Keeps hook-level tests focused on installed-hook flow rather than Claude-specific argument internals.

Tests

  • pnpm test
  • Focused coverage for:
    • successful Claude structured output
    • malformed Claude JSON transport
    • malformed Claude result envelopes
    • invalid structured review objects
    • unsupported --json-schema mode
    • Claude auth and generic command failures
    • source metadata preservation
    • installed-hook Claude invocation flow

@dbrosio3 dbrosio3 merged commit 9d662a5 into main Jun 24, 2026
1 check 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