Keep legacy WhatsApp crontab lint opt-in#99250
Conversation
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Codex review: needs maintainer review before merge. Reviewed July 4, 2026, 3:31 PM ET / 19:31 UTC. Summary PR surface: Source +1, Tests +42. Total +43 across 2 files. Reproducibility: yes. Source inspection shows current main's legacy crontab health check lacks Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Keep the detector in the core Doctor registry but make the lint path opt-in through Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current main's legacy crontab health check lacks Is this the best way to solve the issue? Yes, with maintainer sign-off on the default-output tradeoff. The PR uses the existing AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6c53dfa1df99. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +1, Tests +42. Total +43 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (11 earlier review cycles; latest 8 shown)
|
31ca2d1 to
489e2af
Compare
|
@clawsweeper review Rebased and refreshed on head 489e2af. Real behavior proof is now in the PR body: focused Doctor contribution Vitest passed 70/70, default lint skips core/doctor/legacy-whatsapp-crontab, and explicit --only still reports the warning finding. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Maintainer note: I accept the compatibility tradeoff here. The default I also fixed the ordered Doctor contribution path so explicit lint selection exercises the structured detector, then added real behavior proof to the PR body for head @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
b757ceb to
320cd23
Compare
|
Rebased onto current Post-rebase validation:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
320cd23 to
e25e72d
Compare
Dependency graph guard clearedThis PR no longer has blocked dependency graph changes. A future dependency graph change requires a fresh
|
|
Merged by head-pinned squash.
Validation used for landing:
|
Summary
core/doctor/legacy-whatsapp-crontabdefault-disabled so defaultdoctor --lintdoes not invoke the shell-backedcrontab -lprobe--only core/doctor/legacy-whatsapp-crontaband--allhealthCheckIdsmapping instead of duplicating core checks inlinePublic surface
doctor --lintchanges only by skipping this live crontab probe;--alland--onlystill include it.PR surface
Real behavior proof
Behavior or issue addressed:
Default
doctor --lintleaves the legacy WhatsApp crontab probe opt-in, while explicit--only core/doctor/legacy-whatsapp-crontabstill runs the detector and reports the warning.Real environment tested:
WSL Ubuntu source checkout at head
8964ccb23931a3c0d8e09122f4dff6cfbbd960b4; built OpenClaw doctor lint CLI module from this checkout; isolatedOPENCLAW_STATE_DIR; PATH-scoped temporarycrontabshim returning a redacted legacy~/.openclaw/bin/ensure-whatsapp.shentry. The real system crontab was not modified.Exact steps or command run after this patch:
pnpm buildOPENCLAW_STATE_DIR=<tmp> PATH=<tmp>:$PATH runDoctorLintCli({json:true})OPENCLAW_STATE_DIR=<tmp> PATH=<tmp>:$PATH runDoctorLintCli({json:true, onlyIds:["core/doctor/legacy-whatsapp-crontab"]})Evidence after fix:
{ "defaultRun": { "exitCode": 1, "checksRun": 23, "checksSkipped": 23, "findingCount": 31, "crontabShimCalls": "<none>", "hasLegacyWhatsAppCrontabFinding": false }, "explicitOnlyRun": { "exitCode": 1, "checksRun": 1, "checksSkipped": 45, "findingCount": 1, "crontabShimCalls": "called: -l", "legacyWhatsAppCrontabFindings": [ { "checkId": "core/doctor/legacy-whatsapp-crontab", "severity": "warning", "message": "Legacy WhatsApp crontab health check detected.", "fixHint": "`~/.openclaw/bin/ensure-whatsapp.sh` is not maintained by current OpenClaw and can misreport `Gateway inactive` from cron when the systemd user bus environment is missing.\nRemove the stale crontab entry with crontab -e; use openclaw channels status --probe, openclaw doctor, and openclaw gateway status for current health checks.\nMatched 1 entry." } ] } }Observed result after fix:
Default lint did not call
crontab -land did not includecore/doctor/legacy-whatsapp-crontab. Explicit--only core/doctor/legacy-whatsapp-crontabcalledcrontab -lonce and emitted the structured warning finding.What was not tested:
A real user crontab was not edited; the crontab content was supplied by a PATH-scoped shim to avoid mutating host cron state. Full
openclaw.mjs doctor --lintproof with a PATH shim was not used because the entrypoint startup path can respawn/normalize process env; the tested command module is the same doctor lint implementation invoked by that entrypoint after option parsing.Validation
pnpm exec vitest run src/flows/doctor-health-contributions.test.ts --maxWorkers 1 --no-fileParallelismpnpm exec oxfmt --check src/flows/doctor-health-contributions.ts src/flows/doctor-core-checks.ts src/flows/doctor-health-contributions.test.tspnpm exec oxlint src/flows/doctor-health-contributions.ts src/flows/doctor-core-checks.ts src/flows/doctor-health-contributions.test.tsgit diff --checkpnpm buildNot tested / baseline gaps
pnpm exec tsgo --noEmit --project tsconfig.json --pretty falsepreviously failed outside this PR insrc/config/io.ts/src/secrets/config-io.tsaroundconfigWritePostCommitRollbackexported type naming. This PR does not touch those files.