Repository navigation
fix(cron): mutex blank --model/--thinking with matching clear flags - #119894
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 20, 2026, 11:47 PM ET / August 21, 2026, 03:47 UTC. ClawSweeper reviewWhat this changesThe PR makes supplied blank Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open. Current main still normalizes blank model/thinking values before testing the matching clear mutex, so the linked bug remains; the PR repairs that producer boundary without changing standalone blank omission or Gateway semantics. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherCron CLI converts edit flags into a scheduled-job patch before sending it to the Gateway. This change decides locally whether conflicting set and clear flags fail or create a patch that clears an existing model or thinking override. flowchart LR
A[Cron edit command] --> B[CLI option parser]
B --> C[Set and clear conflict check]
C --> D[Normalized job patch]
D --> E[Gateway cron update]
E --> F[Stored scheduled job]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +3, Tests +12. Total +15 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep raw option presence as the mutex input and normalized values as the patch input, so conflict detection cannot erase the existing blank-omission contract. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: on current main blank strings normalize to undefined before the mutex, then the clear path emits null; this read-only review did not execute contributor code. Is this the best way to solve the issue? Yes. The CLI producer owns the distinction between a supplied flag and its normalized patch value, while Gateway validation and null-clear payload merging remain unchanged. AGENTS.md: found but not applied because it conflicted with ClawSweeper's review contract. Codex review notes: model internal, reasoning high; reviewed against 579f9b8a8a5e. 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 (9 earlier review cycles; latest 8 shown)
|
108563d to
46bae56
Compare
|
@clawsweeper re-review Exact-head tip |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Addressed the P1 on New head: |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Empty Commander values skipped the clear-* mutex after normalize, so --model '' --clear-model still cleared the override. Align with fallbacks and delivery clear presence checks. Co-authored-by: Peter Steinberger <[email protected]>
…ject The legacy cron-cli suite still expected blank --model/--thinking to be omitted; that contradicts the fail-closed blank validation and broke CI. Co-authored-by: Peter Steinberger <[email protected]>
Standalone blank overrides stay omitted. Flag presence now conflicts with --clear-model/--clear-thinking instead of silently applying the clear. Co-authored-by: Peter Steinberger <[email protected]>
8d7cbbc to
00f805f
Compare
|
Merged via squash.
|
…penclaw#119894) * fix(cron): reject blank --model/--thinking on cron edit Empty Commander values skipped the clear-* mutex after normalize, so --model '' --clear-model still cleared the override. Align with fallbacks and delivery clear presence checks. Co-authored-by: Peter Steinberger <[email protected]> * test(cron): align empty model/thinking edit expectation with blank reject The legacy cron-cli suite still expected blank --model/--thinking to be omitted; that contradicts the fail-closed blank validation and broke CI. Co-authored-by: Peter Steinberger <[email protected]> * fix(cron): mutex blank --model/--thinking with matching clear flags Standalone blank overrides stay omitted. Flag presence now conflicts with --clear-model/--clear-thinking instead of silently applying the clear. Co-authored-by: Peter Steinberger <[email protected]> * test(cron): focus blank clear mutex coverage Amp-Thread-ID: https://ampcode.com/threads/T-01a0220d-eaa0-76b4-adb9-68841f015b75 --------- Co-authored-by: zyw02 <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Amp <[email protected]>
Closes #119893
What Problem This Solves
cron editintentionally normalizes blank/whitespace--modeland--thinkingto omission. The matching set/clear mutex was incorrectly gated on that normalized value, so blank--modelplus--clear-model(and the thinking pair) bypassed the conflict and applied the clear.Provenance:
d03985415dbaadoptednormalizeOptionalStringfor cron edit’s existing blank-to-omission model/thinking behavior;0888debcd3eblater introduced the truthy model set/clear mutex pattern. #111112 /68771ebdfef1subsequently extracted and carried those checks (including the thinking sibling) into the current cron CLI producer; it was not the sole origin.Fix
nullas intentional clear semantics through normalization and payload merge.Maintainer follow-up removes redundant test cases while preserving @zyw02's contributor-authored commits.
Evidence
Focused tests:
node scripts/check-changed.mjs -- <2 changed files>passed formatting, production/test typechecks, lint, dead-code scans, and repository guards.git diff --checkpassed.Repeated real CLI parsing with an isolated
OPENCLAW_HOME(three runs per case):--clear-model: 3/3 local mutex errors for each value--clear-thinking: 3/3 local mutex errors for each valueThis proves the mutex without changing the intentional blank-omission contract.
Review
nullclear merge, and tests.openai/codex@bd19459358finspected, including omitted model/reasoning settings versus explicit updates.Remaining risk
Low. This changes only CLI mutual exclusion. Clear-only, nonblank set-only, normalizer, protocol, and Gateway behavior remain unchanged.