Repository navigation
refactor(review): let Codex judge changed PR content - #1328
Conversation
Remove the compiler-backed semantic cache and its patch, tree-mode, revalidation, telemetry, and runtime-install plumbing. Keep exact-input caches, restricted checkout hydration, scanner admission, and durable publication gates. Bundle matching runtime configuration, prompts, and schemas.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed September 1, 2026, 12:09 AM ET / 04:09 UTC. ClawSweeper reviewWhat this changesThis PR removes compiler-backed semantic equivalence caching so any changed pull-request content receives a normal Codex review, while exact structural and content cache reuse remains. Merge readinessKeep open: the refactor is coherent and the PR body supplies archive-backed real-behavior evidence, but the previously raised requirement to record the OpenClaw Bay impact remains unresolved. Priority: P2 Review scores
Verification
How this fits togetherThe scheduled review pipeline receives pull-request metadata and source history, reuses only exact unchanged inputs, and sends changed content through a restricted Codex checkout. It emits a durable review report and workflow ledger outcome. flowchart LR
A[Scheduled pull request] --> B[Exact cache checks]
B -->|Changed content| C[History and blob hydration]
C --> D[Restricted Codex review]
D --> E[Durable report and ledger]
B -->|Exact unchanged input| E
Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the exact-input cache design, add a concise statement that Bay is unaffected (or update and prove Bay if it is affected), then obtain a review of the updated PR body. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug report: the changed review path has a high-confidence after-fix local-range receipt in the PR body, while the remaining item is a required Bay-impact declaration. Is this the best way to solve the issue? Yes. Removing the duplicate compiler-backed source-equivalence judgment while preserving exact-input cache gates is the narrowest maintainable direction; the remaining policy declaration should be added before merge. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1bcce8bcf392. LabelsLabel changes:
Label 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
History |
|
@clawsweeper re-review The PR body now includes the completed archive-backed Codex proof: one real session, a complete report for the synthetic comment-only head, verified checkout access, zero findings, and a clean target checkout. The final documentation commit updates the cache guide; runtime code is unchanged. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
🦞👀 Re-review progress:
|
ClawSweeper was reparsing TypeScript/JavaScript patches to decide whether a changed PR could reuse an old review. That duplicated code judgment outside Codex and required a semantic cache, separate patch hydration and revalidation, per-file Git mode probes, and a native compiler installation in review shards.
This removes that path. Structural and exact-content caches still reuse unchanged inputs with the existing policy, freshness, durable-comment identity, checkout-access, and lease checks. Changed PR content—including source comments and formatting—goes to Codex. Git history and blob hydration remain explicit preparation for the restricted review checkout. Historical semantic-cache metadata is ignored and ages out through normal reviews; there is no bulk invalidation.
The review artifact now includes its matching config, prompts, and schemas and needs no compiler installation. TypeScript remains a build dependency. The architecture guide records the design principle: Codex owns reasoning; ClawSweeper owns authorization, isolation, scheduling, durable state, and GitHub writes.
Net reduction: 3,469 lines across 34 files, including 1,716 lines of source and scripts. The tradeoff is more model reviews for content changes that the old cache treated as equivalent. No GitHub mutation or close policy is weakened.
OpenClaw Bay impact: no Bay lane, status, projection, endpoint, or UI contract changes. Comment-only and formatting-only PR revisions now produce ordinary full-review activity instead of a semantic-cache hit. The removed semantic-cache counters were per-run review artifacts, not Bay read-model inputs; existing queue deduplication metrics are separate and remain intact. The full dashboard test suite passed with the refactor, so no Bay code or visual update is needed.
Validation: full
pnpm run checkpassed on Node 24 in AWS Crabbox: 4,233 tests passed, eight skipped, plus 13 focused coverage tests and all build/lint/static checks. Workflow regressions cover unchanged structural/content cache hits, changed PR handoff, scanner refusal before inference, and durable terminal events. The actual runtime archive was extracted in a neutral directory and loaded without TypeScript or an install step.Live proof: extracted the runtime archive outside the repository and ran
review --local-only --local-rangeon a synthetic comment-only Git change through real TruffleHog and the authenticated Codex CLI. One session completed withreview_status: complete, runner-verified checkout access, the exact fixture head, high-confidencekeep_open, and zero findings. The transcript confirms source and raw Git-history inspection; the target checkout remained clean. No GitHub item was mutated. A shortened attempt timed out amid local thread-store contention; the normal ten-minute review budget completed successfully. The full-check runtime differs from the live-tested JavaScript only by a comment cleanup.After-fix receipt from the actual local-range command (synthetic repository; no mocked Codex process):
The fixture head adds only a comment to
add.js; both implementation and test source were read by Codex. Scheduled cache selection is covered separately by the production workflow-factory tests with controlled GitHub inputs; the live smoke exercises archive loading, restricted source access, inference, schema validation, and final report production.