Skip to content

feat(review): add opt-in structured coverage output - #96

Merged
abruption merged 3 commits into
mainfrom
feat/95-output-schema
Nov 23, 2026
Merged

abruption merged 3 commits into
mainfrom
feat/95-output-schema

Conversation

@abruption

@abruption abruption commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

Issue

Closed #95

Keep this PR in draft while evaluating the experiment. Merging into main will close #95.

Experiment

  • Supplying --criterion-id selects output v2. Keep legacy as the current default when no format or criteria are supplied, and accept --output-schema 1 as an explicit compatibility choice. Pin the v2 selection and criterion IDs in the request hash.
  • Preserve valid citations and references as submitted, including repeats. Validate IDs and line ranges, and fill omitted criteria with unassessed.
  • Document and test the validation boundary. Execution claims can pass inside suggestion prose. A linked finding that covers only part of a criterion can satisfy the structural checks for assessed. The caller decides whether to trust or act on either.
  • Keep the experimental contract in one document. Deployed limits belong to feat(profiles): support higher output limits for deep reviews #81.

Mock matrix

Provider Format Cap Request JSON (bytes) Complete mock envelope (bytes) Returned review JSON (bytes) Reservation (µUSD) Injected 9,000-token scenario
OpenAI legacy 8,192 3,007 660 287 24,032 incomplete
OpenAI legacy 10,240 3,008 660 287 29,152 completed
OpenAI v2 8,192 4,273 996 642 24,665 incomplete
OpenAI v2 10,240 4,274 996 642 29,785 completed
Anthropic legacy 8,192 2,822 518 287 23,939 incomplete
Anthropic legacy 10,240 2,823 518 287 29,060 completed
Anthropic v2 8,192 3,765 854 642 24,411 incomplete
Anthropic v2 10,240 3,766 854 642 29,531 completed

All rows use the same synthetic code and criteria. Sizes come from the completed fixtures. A separate 9,000-token demand is injected to exercise the handler and is independent of the actual JSON size. Both providers use mock rates of $0.50 per million input tokens and $2.50 per million output tokens. The reservation uses request bytes plus 4,096 as its conservative input-token estimate. The mock matrix measures serialization and handler behavior. Actual token usage and provider schema acceptance require live validation for this revision.

Validation

  • Typecheck, CLI and Worker dry-run builds, 290 tests, and package smoke passed. Rechecked all eight matrix rows after applying review feedback.
  • Independent design and implementation reviews were followed by a targeted Claude Opus 5.5 and Gemini 4 Argon Medium review of these experiment corrections.
  • Independently reviewed the first rollout stage. Confirmed byte-identical bundles for implicit and explicit v2, and for default legacy and explicit v1. The mock matrix is unchanged.

@abruption
abruption marked this pull request as ready for review November 23, 2026 01:43
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T01:45:06.469070Z 624cfdd Draft marked ready
🔒 Security Review ✅ Completed 2026-11-23T01:46:22.096723Z 624cfdd Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@abruption
abruption merged commit 3c3cd34 into main Nov 23, 2026
9 of 11 checks passed
@abruption
abruption deleted the feat/95-output-schema branch November 23, 2026 01:53
@abruption abruption mentioned this pull request Nov 24, 2026
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.

experiment(review): evaluate an opt-in structured output extension

1 participant