Skip to content

refactor(review): retire dead decision fields - #1758

Merged
obviyus merged 1 commit into
mainfrom
retire-decision-fields
Oct 8, 2026
Merged

obviyus merged 1 commit into
mainfrom
retire-decision-fields

Conversation

@obviyus

@obviyus obviyus commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Every review sends the decision schema to the model and the model fills every field. Two fields cost tokens on every review and nothing acts on them; this removes them.

Field Verdict Why
liveProofPlan removed Already pinned to a fixed empty "retired" shape, yet its 9-variant steps schema was still sent on every call.
mantisRecommendation removed Renders a copy-paste @openclaw-mantis suggestion that nothing acts on: openclaw/openclaw removed the Mantis issue_comment triggers in openclaw/openclaw#126702 (all Mantis workflows are workflow_dispatch only), and openclaw's docs/concepts/mantis.md routes proof through @clawsweeper proof. Mantis proof receipts are separate and kept.
telegramVisibleProof kept Drives the live proof: telegram-e2e label (100+ openclaw PRs, newest 2026-10-07) and the dashboard Telegram proof triage view.

Readers of old stored reports keep their tolerant parsers (reportLiveProofPlan, live-proof commands and attached-verification markers still use them). REVIEW_POLICY_VERSION v28 → v29.

schema/clawsweeper-decision.schema.json   66,531 -> 58,175 bytes (-8.4 KB per review), 63 -> 61 required fields
prompts/review-item.md                    74,822 -> 72,902 bytes
30 files, +157 / -1,223

Evidence

Production entry point, current head c22475cbd. Command: pnpm run review -- --local-only --target-repo openclaw/openclaw --item-number 166090 --codex-model gpt-6.1-sol --output-retention summary (the shipped review CLI; macOS, Node 24.21). Target: openclaw/openclaw#166090 at head b14db4e6dcd4. Observed: review_status: complete, decision keep_open, rating C, and a full review comment rendered from the stored report. The run's own telemetry, compared with a run of the same PR on the previous main:

Telemetry (same PR) previous main this head
schema chars 66,461 58,105
static prompt chars 86,390 84,882
## Live Proof / Mantis sections in the stored report present absent (0 matches)

The model produced a valid decision without the retired fields, so generation works with the reduced schema; publication uses the same renderer covered by the old-report comparison below. Nothing was posted from this run (local-only).

  • Old-report compatibility: the 8 stored reports written by an older main (openclaw/openclaw 166611, 166563, 166601, 166677, 148114, 166599, 166090, 166082) rendered through reviewAutomationMarkersFromReport and renderReviewCommentFromReport on the base and on this branch: automation markers and comments are byte-identical for all 8. A copy of 166082 with a recommended Mantis section differs only by the removed ### Mantis proof suggestion block; markers identical.
  • pnpm run check passed (7,230 tests, 0 failed). Focused suites after rebasing on feat(review): show review scores above the product verdict #1757: 241/241.
  • Codex /review against main: no actionable defects.

Limits: one live review; output-token savings per review are not measured, only the input reduction. No hosted publication from this head yet. Prior proof request (current-head entry-point trace) is answered by the run above.

Merge Danger

Door: two-way. Old reports parse unchanged; a revert restores both fields.

Blast radius: PR review comments lose the "Mantis proof suggestion" / "Proof path suggestion" blocks; every review sends ~10 KB less schema and prompt.

OpenClaw Bay

Not affected: no dashboard code reads live_proof_* or mantis_recommendation_* front matter; the Telegram proof triage view keeps its label.

Drop liveProofPlan (schema-pinned retired shape) and mantisRecommendation (copy-paste @openclaw-mantis suggestion; every OpenClaw Mantis workflow is workflow_dispatch-only, so the comment triggers nothing) from the review schema, prompt, decision type, parser, report document, comment rendering, and default decisions. Stored reports keep parsing: the Live Proof reader stays for the retained live-proof commands and attached-verification markers, and stale Mantis sections are ignored. Bump REVIEW_POLICY_VERSION to v29.
@clawsweeper

clawsweeper Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 8, 2026
@clawsweeper

clawsweeper Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 8, 2026, 4:15 AM ET / 08:15 UTC (Revision 3).

ClawSweeper review

What this changes

Remove retired live-proof planning and inactive Mantis recommendation fields from new review decisions, reports, and comments while preserving historical proof readers.

Example: A maintainer reads a review with a stored Discord Mantis recommendation.

  • Before: The comment includes a “Mantis proof suggestion” block containing an @openclaw-mantis command.
  • After: The comment omits that suggestion while retaining the review result and automation markers.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, coherent cleanup with shipped-entry-point evidence and preserved historical compatibility.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The current-head shipped review CLI ran on macOS with Node 24.21, generated a valid reduced-schema decision, completed the review, and rendered its stored report without retired sections. Eight existing-report comparisons support marker and comment compatibility; retained source readers verify the no-migration case. The prior proof request is addressed. Limits are one live review, no hosted publication, and unmeasured output-token savings.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes
User problem: Maintainers receive an inactive Mantis suggestion, and every review spends input on retired decision fields.
Reason: The recurring input reduction and removal of ineffective guidance justify this deletion-focused cleanup. Prior area ownership and recorded retirement direction support the scope.

Merge readiness

✅ Ready for maintainer review

This PR remains useful, distinct maintenance work. The updated current-head CLI evidence resolves the prior proof request, and review found no actionable defect or remaining merge blocker.

Priority: P3
Reviewed head: c22475cbd96c07343d32af0ba5a5af27b0e5ea8e

Before merge

None.

Findings

None.

Agent review details

How this fits together

ClawSweeper converts repository evidence into structured review decisions, stores reports, and renders GitHub comments and automation markers. This cleanup reduces the generated decision contract while retaining readers for historical proof artifacts.

flowchart TD
  A[Repository evidence] --> B[Review prompt and reduced schema]
  B --> C[Model decision]
  C --> D[Stored review report]
  E[Historical proof reports] --> F[Compatible report readers]
  D --> F
  F --> G[Review comment and automation markers]
Loading

Technical review

Best possible solution:

Keep the reduced generation contract, historical attached-proof compatibility, and active Telegram proof labeling.

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

Not applicable: this is retirement work rather than a reported bug; the base schema and renderer establish the existing overhead and suggestion behavior.

Is this the best way to solve the issue?

Yes: deleting generation and presentation plumbing while retaining historical readers is a narrow, maintainable cutover supported by current-head CLI evidence.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 11c625de8a3c.

Provenance checked

Testing

Proof path: shipped entry point. Added test files: 7.

Security

None.

Evidence

What I checked:

  • Introduced scope and continuing necessity: The pinned base-to-head delta consistently removes the two fields from the schema, decision parser, fallback decisions, report writing, and comment rendering. Current main still contains this plumbing; the merged retirement work did not already implement this cleanup. (src/clawsweeper-decision-parser.ts:1223, c22475cbd96c)
  • Current-head production proof and prior-request disposition: The supplied complete PR body, captured as sourceRevision c68bd4fc2d077ffeb3d8887f156bc8bb03f86c26a8511dbd966252e735e216b6, records the shipped command pnpm run review -- --local-only --target-repo openclaw/openclaw --item-number 166090 --codex-model gpt-6.1-sol --output-retention summary on head c22475c, macOS and Node 24.21. Observed output was review_status: complete, keep_open, rating C, and a rendered full comment; telemetry reports schema characters 66,461 → 58,105 and no retired report sections. This addresses the previous review's sole proof request. Limits are one live review and no hosted publication. (c22475cbd96c)
  • Historical stored-report compatibility: Historical report parsing remains connected to the retained typed plan parser and attached-verification validation; missing plans remain non-runnable. The PR body reports identical automation markers and comments for eight existing reports, with only the intentional suggestion removal for a modified Mantis fixture. No stored records are rewritten, and the complete consumer search found no dashboard use of the removed front matter. (src/clawsweeper-report-parser.ts:139, c22475cbd96c)
  • Affirmative dependency signal and Mantis trigger contract: The PR expressly bases suggestion retirement on OpenClaw's Mantis consumer contract. Current documentation lists manual scenario dispatch and routes request-bound proof through @clawsweeper proof; it does not restore automatic post-review recording. This supports removing the obsolete copy-paste suggestion without removing Mantis proof receipts. (docs/concepts/mantis.md:344, bfe4540e85d6)
  • Scenario workflow entry point: The Discord status-reaction workflow declares workflow_dispatch as its trigger. Legacy issue_comment expressions inside job conditions do not create a comment-triggered workflow entry point. (.github/workflows/mantis-discord-status-reactions.yml:3, bfe4540e85d6)
  • Recorded retirement intent: Merged fix: retire automatic live proof #1280 explicitly retired automatic planning and execution while retaining historical artifact compatibility. This PR preserves that boundary. The original suggestion purpose is documented in merged feat(review): suggest OpenClaw Mantis proof comments #88. (docs/live-proof.md:132, c22475cbd96c)

Likely related people:

  • Ayaan Zaidi: Raw commit 197df62 adds src/clawsweeper-types.ts:665 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 197df625648b; files: src/clawsweeper-types.ts)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Review metrics

Metric Value Why it matters
Review input reduction 10,276 bytes removed; required fields 63 → 61 The schema and prompt shrink recurring review input without claiming measured output-token savings.
Production and test scope Production +3/-346 lines; tests +142/-632 lines The branch removes unused plumbing while retaining historical parser coverage.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P3: This is bounded maintenance of review cost and obsolete guidance, with no urgent user-facing failure.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-08T01:31:13.559Z sha c22475c :: needs changes before merge. :: none
  • reviewed 2026-10-08T01:41:43.584Z sha c22475c :: needs changes before merge. :: none

@obviyus

obviyus commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Oct 8, 2026
@obviyus
obviyus merged commit f47043c into main Oct 8, 2026
34 checks passed
@obviyus
obviyus deleted the retire-decision-fields branch October 8, 2026 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant