Repository navigation
refactor(review): let the decision schema own per-field contracts and label catalogs - #1785
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesMoves field guidance and label definitions into the decision schema and includes that schema in OpenClaw review input. Review scores
ProductKind: Refactor · Worth it: Yes Merge readiness✅ Ready for maintainer review This PR remains useful and distinct from current main. The prior schema-delivery defect and branch-sync blocker are resolved, and no remaining actionable patch defect was found. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherClawSweeper sends GitHub evidence and review instructions to an agent, then validates its JSON decision and publishes a review. The shared runner delivers the decision contract to Codex or OpenClaw. flowchart TD
A[GitHub evidence] --> B[Shared review instructions]
C[Decision schema and field guidance] --> D[Runner selection]
B --> D
D --> E[Codex structured input]
D --> F[OpenClaw message input]
E --> G[Validated decision and public review]
F --> G
Technical reviewBest possible solution: Keep one authoritative field contract and deliver it through the existing shared runner to every supported review backend. Do we have a high-confidence way to reproduce the issue? Not applicable to this refactor; the base and head establish duplicated guidance and the corrected schema-delivery path. Is this the best way to solve the issue? Yes: schema ownership and delivery through the existing runner remove competing guidance without changing the decision format. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against cf34fa9269dc. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (4 earlier review cycles)
Reviewed October 9, 2026, 2:53 AM ET / 06:53 UTC (Revision 5). |
b8f02dd to
f6d4cb1
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…plementer-owned list
832d705 to
0d405db
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
What
This PR keeps only cross-field rules in the review prompt and moves per-field guidance and label catalogs to the decision schema. Every change is a behavior-preserving relocation: the same rule moves from the prompt to a schema description, or the PR deletes a prompt sentence that the schema already states. The PR changes no enum,
requiredlist, or type. The one code change is the OpenClaw runner seam described below.Inventory (all relocations)
### Close commentshapecloseComment.description(new); the prompt keeps the cross-field rule that a close needs high confidence and evidencechangeSummary/systemContextwriting guidance and examplechangeSummary,systemContextdescriptionschangeExampleparagraphchangeExample.description(deleted as duplicate)bestSolution,reproductionAssessment,solutionAssessmentparagraphsagentsPolicyStatusvalue meaningsagentsPolicyStatus.status.description(new)maintainerDecisionparagraphmaintainerDecision.required/question(+ "missing proof belongs to PR owner", "no generic question");requirednow points at the prompt's implementer-owned list instead of restating it (the #1780 test assertions are re-anchored on the prompt block, none removed)triagePriority.description; added "whole item, separate from finding priority, apply UX override first"impactLabels.description; added the missing "cosmetic ⇒ P2/P3 without ux-release-blocker" rowimpact:*andmerge-risk:*catalogs, prefer-specific, automation-CI sentencesimpactLabels/mergeRiskLabelsdescriptions; added the "supported by evidence, not more certain than evidence" linelabelJustificationsrule, "other names the actual impact"labelJustifications/[].reasondescriptionsitemCategorylist,reproductionStatusvalues,reproductionConfidencereproductionConfidence.descriptionnew)rootCauseClusterparagraphrootCauseCluster.descriptionnextStepcontractnextStep.description(landing-approval rule, keyword example, routing prose inworkReason)realBehaviorProofstatus values, evidenceKind nonerealBehaviorProof.status.description(new),evidenceKind.description; the prompt keeps the cross-field rule (missing proof ⇒ contributor action, human-only blocker, no repair markers)reviewFindings[]descriptions; added "say why current behavior breaks" tobodyreviewMetrics(incl. LOC metric),featureShowcase,prRatingpointerfeatureShowcasegains "serious correctness/security concerns use none"); the OpenClaw note points to thereviewMetricsLOC metricmaturityLabels.descriptionRunner seam
Review finding P2 (#1785, prompts/review-item.md:85): with
CLAWSWEEPER_RUNNER=openclaw, the OpenClaw backend never saw the schema, so it would lose the relocated guidance. Theopenclaw agentCLI has no structured-output or schema option (only--message-file).runAgentProcessnow appends an## Output schemasection to the OpenClaw message, built from the same--output-schemafile that Codex receives, so both backends get the same contract from one source. The diagnostic prompt file records that same input. The Codex path is unchanged. New test:test/agent-runner.test.tschecks that the OpenClaw message file contains the full schema file, including the UX-override text. Telemetry:review_schema_charsalready reports the schema size, so the OpenClaw input size isreview_prompt_chars+review_schema_chars+ about 150 chars of section header;promptCharswas not changed. I could not run a local OpenClaw-backed review: theopenclawCLI is not installed on this host.REVIEW_POLICY_VERSION→ v38 (prompt and schema text change).Deferred (contract changes, separate follow-up PRs from main, not opened yet)
labelJustifications[].labelenum. The parser already validates labels and checks that justified labels equal selected labels, but dropping the enum moves validation from constrained decoding to parse time.closeComment.descriptionthatkeep_openuses an empty string. This matches observed output but is a new rule.Why
Audit SlopPrompt findings 3, 4, 6b and 8c: label lists appeared in the prompt and in schema descriptions;
## Field contractsrestated what the schema describes, with three overlapping summary paragraphs.Proof
pnpm run checkon head 832d705 (includes the runner fix), with no live reviews running at the same time: exit 0, 6951 tests pass, 0 fail. On the earlier head a8b75de it also exited 0 (6950 pass).`impact:data-loss`:,`merge-risk: 🚨 compatibility`:) in assembled prompts 1/1 → 0/0; per-field "Always fill" contracts for 9 fields 1 → 0. New tests assert both.review_prompt_chars68,709 → 60,212.review_prompt_chars146,777 → 135,320.Codex review dispositions
codex reviewfound no actionable findings (run before narrowing; the narrowing only restores the main enum and removes one added sentence).Merge Danger