Repository navigation
refactor: split review rendering and automation into cohesive modules - #1019
Conversation
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 5:00 AM ET / 09:00 UTC. ClawSweeper reviewWhat this changesThis PR splits ClawSweeper’s review/report rendering, review-comment publication, label synchronization, and GitHub execution into cohesive modules, and fixes successful Codex subprocesses that close stdin early plus a timing-sensitive queue-health assertion. Merge readinessThis active PR remains necessary: current Priority: P2 Review scores
Verification
How this fits togetherClawSweeper turns GitHub item context into review reports and durable comments, then uses guarded automation to synchronize labels and apply GitHub operations. This PR reorganizes the coordinating code that connects those review, publication, labeling, and execution stages without changing the public CLI entrypoint. flowchart LR
Context[GitHub item context] --> Review[Review orchestration]
Review --> Reports[Report rendering]
Reports --> Comments[Durable review comments]
Comments --> Labels[Label synchronization]
Labels --> GitHub[Guarded GitHub operations]
Runtime[Shared runtime wiring] --> Review
Runtime --> GitHub
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the focused façade-and-dependency design, with the current head’s repository gate complete before a maintainer lands the automation refactor. Do we have a high-confidence way to reproduce the issue? Not applicable: the central work restructures existing automation rather than reporting a user-reproducible defect. The two follow-up reliability changes do have concrete after-fix subprocess and queue-health validation described in the PR body. Is this the best way to solve the issue? Yes: explicit façade modules and dependency injection preserve the existing public entrypoints while making automation responsibilities more reviewable; the narrow EPIPE handling retains non-success failure reporting. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a769f25c3500. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
…openclaw#1019) * refactor: split review rendering and automation into cohesive modules * fix: tolerate clean Codex stdin closure and stabilize queue age proof --------- Co-authored-by: Peter Steinberger <[email protected]>
Summary
ghconfiguration, disabled web search, and the no-network prompt.gpt-5.6-solwithxhighreasoning for generated fix PRs.Size reduction
Rendering is now divided into report context, documents, public comment presentation, comment helpers, and report actions. Review publication is separated into stable identities, automation markers, durable state, publication, and leases. Label selection, mutation, and operations have distinct modules. Offline-safe review preparation and GitHub mutation execution are now explicit, independently reviewable modules.
Real offline review proof
Executing the actual compiled local review CLI against a fresh temporary Git checkout and a stub Codex process confirms that local-range review still creates its review artifact while isolating
ghconfiguration. The complete local review suite additionally verifies that GitHub and GitHub Enterprise token aliases are removed, web search is disabled, and the model prompt forbids network access:The repository's complete production gate passed on the refactored tree:
The remaining nine tests were skipped by their platform-specific guards. An independent Codex precommit review additionally verified every extracted function, dependency contract, and module cycle and ran more than 700 directly relevant review/apply/cache/label regressions without identifying any finding.
CI reliability and process robustness
The rebased check exposed two pre-existing execution-time flakes: a Codex subprocess that exits successfully after closing stdin early could incorrectly become a failed review through
EPIPE, and a queue-health test compared an exact elapsed second while inserting 10,001 rows.Safety invariants