Skip to content

fix(review): require late-finding schema field#404

Merged
steipete merged 1 commit into
mainfrom
fix/review-late-finding-schema
Jul 4, 2026
Merged

fix(review): require late-finding schema field#404
steipete merged 1 commit into
mainfrom
fix/review-late-finding-schema

Conversation

@steipete

@steipete steipete commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

The live exact-item review for #341 failed twice immediately after #384 landed. The Responses API rejected schema/clawsweeper-decision.schema.json because reviewFindings[].lateFinding was present in properties but absent from that object's required array.

Observed production error:

Invalid schema for response_format 'codex_output_schema':
Missing 'lateFinding'.

Why This Change Was Made

OpenAI strict structured outputs require every object property to appear in required. This adds lateFinding to the required list and tells the model to emit false when the finding is not late.

The regression test compares the finding object's complete property set with its required set, so adding another optional-looking property cannot silently break every review again.

User Impact

ClawSweeper reviews can reach the model again. Runtime parsing remains backward-tolerant, while model output now always supplies a boolean lateFinding value.

Evidence

Exact head: 2d352da39c

pnpm run build
  passed

node --test test/review-prompt-policy.test.ts test/review-history.test.ts
  passed (43/43)

oxfmt --check schema/clawsweeper-decision.schema.json test/review-prompt-policy.test.ts
  passed

autoreview --mode local
  clean; patch is correct (0.88)

Live failure evidence: #341's durable review record shows invalid_json_schema with Missing 'lateFinding' at exact head bae964f9611a3cf470158966e95a034f0ec7b30a.

@clawsweeper

clawsweeper Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper review: did not complete due to Codex infrastructure failure. Reviewed July 4, 2026, 3:45 AM ET / 07:45 UTC.

Summary
Review failed before ClawSweeper could summarize the requested change.

Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path.

Review metrics: none identified.

Merge readiness
Not assessed.
Failure reason: codex execution failed.

This is a ClawSweeper/Codex infrastructure failure, not a PR readiness or patch-quality verdict.
Keep any merge decision on the normal maintainer review path until ClawSweeper can complete a fresh review.

Risk before merge

  • [P1] No close action taken because the review did not complete.

Maintainer options:

  1. Decide the mitigation before merge
    Retry the Codex review after fixing the execution failure.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • Review did not complete, so no work-lane recommendation was made.
Review details

Best possible solution:

Retry the Codex review after fixing the execution failure.

Do we have a high-confidence way to reproduce the issue?

Unclear. The review failed before ClawSweeper could establish a reproduction path.

Is this the best way to solve the issue?

Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction.

AGENTS.md: unclear because the file could not be read completely.

Codex review notes: model internal, reasoning high; reviewed against f4bc90093196.

Evidence reviewed

What I checked:

  • failure reason: codex execution failed.
  • codex failure detail: Codex review failed for this PR with exit 1.
  • codex stderr: No stderr captured.
  • codex stdout: {"type":"thread.started","thread_id":"019f2c16-e81a-76e2-8f3d-811ebb01a5e7"}.

Likely related people:

  • unknown: Codex failed before it could trace repository history. (role: review did not complete; confidence: low)
How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete

steipete commented Jul 4, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready proof for 2d352da39c03675c0aa71f82e01629748297c903:

  • pnpm run build
  • node --test test/review-prompt-policy.test.ts test/review-history.test.ts — 43/43 passed
  • pnpm exec oxfmt --check schema/clawsweeper-decision.schema.json test/review-prompt-policy.test.ts
  • Autoreview: no actionable findings
  • CI — Windows launcher and pnpm check passed
  • CodeQL — passed

This repairs the strict Responses API schema rejection observed in live review records. I’ll verify the production review path immediately after deployment.

@steipete steipete merged commit 19ca145 into main Jul 4, 2026
6 checks passed
@steipete steipete deleted the fix/review-late-finding-schema branch July 4, 2026 07:54
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