Repository navigation
fix(claws): compare cron definitions without response metadata - #139018
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. Reviewed September 5, 2026, 6:43 AM ET / 10:43 UTC. ClawSweeper reviewWhat this changesThe PR separates scheduled-job definitions from Gateway response metadata so unchanged Claw jobs can reconcile, update, and remove successfully. Merge readiness✅ Ready for maintainer review Keep open: current main still contains the false-drift comparison, and this focused repair has no blocking findings. Priority: P2 Review scores
Verification
How this fits togetherClaws are packaged agent setups that register scheduled jobs with OpenClaw’s Gateway. Their lifecycle checks compare live jobs with recorded declarations to preserve operator edits. flowchart TD
A[Recorded Claw declaration] --> E[Compare job definitions]
B[Gateway scheduled job] --> C[Public response with status]
C --> D[Remove response metadata]
D --> E
E --> F[Continue when unchanged]
E --> G[Refuse definition drift]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +25, Tests +32. Total +57 across 6 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep the explicit response-to-definition projection beside its cron producer, preserving storage hashing, public output, and operator-drift protection. Do we have a high-confidence way to reproduce the issue? Yes, from source: current-main cron.get/list responses include metadata that the matcher hashes against a metadata-free declaration. No runtime reproduction was executed in this review. Is this the best way to solve the issue? Yes. The explicit inverse fixes all shared consumers; changing the storage codec or global revision algorithm would unnecessarily broaden token semantics, so the small production increase is justified. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 41651036f27f. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
Claw updates, removal, and completed-install reconciliation can reject unchanged scheduled jobs as “changed after planning.” The real Gateway response includes a revision token and flattened run/delivery status, while the comparison incorrectly hashes those response fields as part of the stored definition.
Why This Change Was Made
Move the unchanged read-view producer into the cron owner and co-locate the projection that removes exactly its declared response metadata. The shared Claw matcher uses that projection once. Arbitrary definition fields remain hash-significant; stored revisions, codecs, private-field redaction, API output, CAS, and lifecycle ordering stay unchanged. Existing consumer fixtures now use the actual producer.
User Impact
An unchanged scheduled job can be reconciled and updated using the normal Claw flow. Actual operator edits still stop Claw mutation. The separate system-monitor removal policy is unchanged.
Evidence
Production +25 lines (including the moved producer; inverse boundary is the justified growth); tests +32 lines. No schema/config/protocol changes. Failed attempts are retained in the local evidence pack.