Skip to content

Keep legacy WhatsApp crontab lint opt-in#99250

Merged
giodl73-repo merged 2 commits into
openclaw:mainfrom
giodl73-repo:doctor-whatsapp-crontab-lint-findings
Jul 4, 2026
Merged

Keep legacy WhatsApp crontab lint opt-in#99250
giodl73-repo merged 2 commits into
openclaw:mainfrom
giodl73-repo:doctor-whatsapp-crontab-lint-findings

Conversation

@giodl73-repo

@giodl73-repo giodl73-repo commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • mark core/doctor/legacy-whatsapp-crontab default-disabled so default doctor --lint does not invoke the shell-backed crontab -l probe
  • preserve explicit selection through --only core/doctor/legacy-whatsapp-crontab and --all
  • keep the ordered Doctor legacy-cron contribution wired through the existing healthCheckIds mapping instead of duplicating core checks inline

Public surface

  • No public SDK/plugin/config contract changes.
  • Default doctor --lint changes only by skipping this live crontab probe; --all and --only still include it.
  • Real repair/reporting behavior for the legacy WhatsApp crontab path remains owned by the existing Doctor implementation.

PR surface

  • 2 files changed, +45/-2 after removing the duplicate inline contribution checks and preserving the existing core check mapping.

Real behavior proof

Behavior or issue addressed:
Default doctor --lint leaves the legacy WhatsApp crontab probe opt-in, while explicit --only core/doctor/legacy-whatsapp-crontab still 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; isolated OPENCLAW_STATE_DIR; PATH-scoped temporary crontab shim returning a redacted legacy ~/.openclaw/bin/ensure-whatsapp.sh entry. The real system crontab was not modified.

Exact steps or command run after this patch:

  1. pnpm build
  2. OPENCLAW_STATE_DIR=<tmp> PATH=<tmp>:$PATH runDoctorLintCli({json:true})
  3. 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 -l and did not include core/doctor/legacy-whatsapp-crontab. Explicit --only core/doctor/legacy-whatsapp-crontab called crontab -l once 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 --lint proof 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-fileParallelism
  • pnpm exec oxfmt --check src/flows/doctor-health-contributions.ts src/flows/doctor-core-checks.ts src/flows/doctor-health-contributions.test.ts
  • pnpm exec oxlint src/flows/doctor-health-contributions.ts src/flows/doctor-core-checks.ts src/flows/doctor-health-contributions.test.ts
  • git diff --check
  • pnpm build

Not tested / baseline gaps

  • Full pnpm exec tsgo --noEmit --project tsconfig.json --pretty false previously failed outside this PR in src/config/io.ts / src/secrets/config-io.ts around configWritePostCommitRollback exported type naming. This PR does not touch those files.

@giodl73-repo

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@openclaw-barnacle openclaw-barnacle Bot added the maintainer Maintainer-authored PR label Jul 2, 2026
@clawsweeper

clawsweeper Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 4, 2026, 3:31 PM ET / 19:31 UTC.

Summary
The PR marks the core legacy WhatsApp crontab Doctor health check as default-disabled and adds regression coverage that default lint skips it while --only still runs it.

PR surface: Source +1, Tests +42. Total +43 across 2 files.

Reproducibility: yes. Source inspection shows current main's legacy crontab health check lacks defaultEnabled: false, and the lint runner only skips checks with that flag unless --only or --all selects them.

Review metrics: 1 noteworthy metric.

  • Doctor lint default selection: 1 core health check changed from default-on to default-disabled. This changes default doctor --lint output and any preflight relying on that legacy crontab finding, even though explicit --all and --only still cover it.

Stored data model
Persistent data-model change detected: migration/backfill/repair: src/flows/doctor-core-checks.ts, migration/backfill/repair: src/flows/doctor-health-contributions.test.ts, unknown-data-model-change: src/flows/doctor-health-contributions.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🐚 platinum hermit
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Risk before merge

  • [P1] Default doctor --lint will no longer surface the legacy WhatsApp crontab warning unless callers use --all or --only, so any automation relying on that default finding needs the compatibility tradeoff acknowledged before merge.

Maintainer options:

  1. Accept opt-in lint default (recommended)
    Land this shape if maintainers accept that default doctor --lint skips the legacy crontab probe while --all and --only remain the supported diagnostic paths.
  2. Preserve default diagnostic
    If default lint compatibility matters more than avoiding the shell-backed crontab read, keep the check default-enabled or design a separate no-shell default signal before merge.

Next step before merge

  • No automated repair is needed; the remaining action is maintainer sign-off on the default-output compatibility tradeoff and normal exact-head merge gates.

Security
Cleared: The diff does not change dependencies, workflows, secrets, or credential handling, and it narrows the default path that invokes the shell-backed crontab probe.

Review details

Best possible solution:

Keep the detector in the core Doctor registry but make the lint path opt-in through --all and --only, with the regression test preserving that contract.

Do we have a high-confidence way to reproduce the issue?

Yes. Source inspection shows current main's legacy crontab health check lacks defaultEnabled: false, and the lint runner only skips checks with that flag unless --only or --all selects them.

Is this the best way to solve the issue?

Yes, with maintainer sign-off on the default-output tradeoff. The PR uses the existing defaultEnabled lint contract and keeps the legacy cron contribution wired through core healthCheckIds, which is narrower than adding duplicate contribution checks.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 6c53dfa1df99.

Label changes

Label changes:

  • add merge-risk: 🚨 compatibility: Merging changes the default doctor --lint diagnostic set for existing users and automation that expected the legacy crontab warning without --all or --only.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides after-fix live output for the lint module showing default selection skips the crontab probe and explicit --only runs it with a redacted PATH-scoped shim.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body provides after-fix live output for the lint module showing default selection skips the crontab probe and explicit --only runs it with a redacted PATH-scoped shim.

Label justifications:

  • P2: This is a focused Doctor lint default-behavior fix with limited blast radius, not a runtime outage or user-data risk.
  • merge-risk: 🚨 compatibility: Merging changes the default doctor --lint diagnostic set for existing users and automation that expected the legacy crontab warning without --all or --only.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body provides after-fix live output for the lint module showing default selection skips the crontab probe and explicit --only runs it with a redacted PATH-scoped shim.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides after-fix live output for the lint module showing default selection skips the crontab probe and explicit --only runs it with a redacted PATH-scoped shim.
Evidence reviewed

PR surface:

Source +1, Tests +42. Total +43 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 2 1 +1
Tests 1 43 1 +42
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 45 2 +43

What I checked:

  • Repository policy read: Root AGENTS.md was read fully; its ClawSweeper review guidance treats defaults and setup/Doctor behavior as compatibility-sensitive review surfaces. (AGENTS.md:1, 6c53dfa1df99)
  • Current main behavior: On current main, the legacy WhatsApp crontab check is a core Doctor health check with no defaultEnabled: false, so it is eligible for the default lint selection. (src/flows/doctor-core-checks.ts:659, 6c53dfa1df99)
  • Lint selection contract: runDoctorLintChecks skips default-disabled checks only when defaultEnabled === false and neither --only nor --all requests them. (src/flows/doctor-lint-flow.ts:38, 6c53dfa1df99)
  • Contribution owner boundary: The legacy cron Doctor contribution already references the core crontab and legacy-cron-store checks by healthCheckIds, so the PR's current shape preserves the shared core mapping instead of duplicating checks inline. (src/flows/doctor-health-contributions.ts:1733, 6c53dfa1df99)
  • PR diff reviewed: The diff adds defaultEnabled: false to core/doctor/legacy-whatsapp-crontab and adds a focused test proving default lint skips the check while explicit --only runs it and emits a warning. (src/flows/doctor-core-checks.ts:656, 8964ccb23931)
  • Proof in PR body: The PR body includes real lint-module output from a WSL checkout with isolated state and a PATH-scoped crontab shim: default lint made no shim calls, while explicit --only core/doctor/legacy-whatsapp-crontab called crontab -l and reported the warning finding. (8964ccb23931)

Likely related people:

  • giodl73-repo: Authored this PR and previously added the same default-disabled Doctor lint pattern for workspace suggestions in the same core Doctor files. (role: recent area contributor; confidence: high; commits: fed1e9a9ff71, a94310490394, 8964ccb23931; files: src/flows/doctor-core-checks.ts, src/flows/doctor-health-contributions.test.ts)
  • Mason Huang: Blame and git log -S legacy-whatsapp-crontab tie the current legacy WhatsApp crontab core check and Doctor docs to the current-main history commit containing that surface. (role: introduced current check path; confidence: medium; commits: 1c46fe72c92d; files: src/flows/doctor-core-checks.ts, src/flows/doctor-health-contributions.ts, src/commands/doctor/cron/warnings.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (11 earlier review cycles; latest 8 shown)
  • reviewed 2026-07-04T16:54:49.319Z sha b757ceb :: needs changes before merge. :: [P1] Reuse the existing core health checks
  • reviewed 2026-07-04T16:59:58.827Z sha b757ceb :: found issues before merge. :: [P1] Reuse the existing core health checks
  • reviewed 2026-07-04T17:24:28.319Z sha 320cd23 :: needs changes before merge. :: [P1] Reuse the existing core health checks
  • reviewed 2026-07-04T17:34:58.516Z sha 320cd23 :: needs changes before merge. :: [P1] Reuse the existing core health checks
  • reviewed 2026-07-04T17:41:59.507Z sha 320cd23 :: needs changes before merge. :: [P1] Reuse the existing core health checks
  • reviewed 2026-07-04T18:09:15.898Z sha e25e72d :: needs maintainer review before merge. :: none
  • reviewed 2026-07-04T18:14:52.133Z sha c79a4fb :: needs maintainer review before merge. :: none
  • reviewed 2026-07-04T18:28:51.007Z sha c79a4fb :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jul 2, 2026
@giodl73-repo
giodl73-repo force-pushed the doctor-whatsapp-crontab-lint-findings branch from 31ca2d1 to 489e2af Compare July 4, 2026 15:30
@giodl73-repo
giodl73-repo marked this pull request as ready for review July 4, 2026 15:31
@giodl73-repo

Copy link
Copy Markdown
Contributor Author

@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.

@clawsweeper

clawsweeper Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@giodl73-repo

Copy link
Copy Markdown
Contributor Author

Maintainer note: I accept the compatibility tradeoff here. The default doctor --lint path should not invoke the shell-backed crontab -l probe because legacy WhatsApp crontab entries are a narrow migration case and a live crontab read can surprise users. The check remains available through explicit selection (--only core/doctor/legacy-whatsapp-crontab) and --all.

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 b757ceb104637865c41c364bfd9e993860840c23.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jul 4, 2026
@giodl73-repo
giodl73-repo force-pushed the doctor-whatsapp-crontab-lint-findings branch from b757ceb to 320cd23 Compare July 4, 2026 17:20
@giodl73-repo

Copy link
Copy Markdown
Contributor Author

Rebased onto current main and refreshed proof on head 320cd236eb239cb9f0b2567461d9da0f3cb67f05.

Post-rebase validation:

  • pnpm exec vitest run src/flows/doctor-health-contributions.test.ts --maxWorkers 1 --no-fileParallelism passed, 70/70.
  • changed-file oxfmt --check, changed-file oxlint, and git diff --check passed.
  • pnpm build passed.
  • Real lint-module proof was rerun with isolated state and a PATH-scoped crontab shim: default lint did not call crontab -l; explicit --only core/doctor/legacy-whatsapp-crontab called crontab -l once and emitted the warning finding.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@giodl73-repo
giodl73-repo force-pushed the doctor-whatsapp-crontab-lint-findings branch from 320cd23 to e25e72d Compare July 4, 2026 17:59
@openclaw-barnacle openclaw-barnacle Bot added app: macos App: macos app: web-ui App: web-ui gateway Gateway runtime extensions: diagnostics-otel Extension: diagnostics-otel extensions: llm-task Extension: llm-task extensions: lobster Extension: lobster extensions: memory-core Extension: memory-core extensions: memory-lancedb Extension: memory-lancedb cli CLI command changes security Security documentation scripts Repository scripts commands Command implementations agents Agent runtime and tooling channel: feishu Channel integration: feishu channel: twitch Channel integration: twitch extensions: acpx extensions: byteplus extensions: volcengine extensions: tavily channel: qqbot channel: qa-channel Channel integration: qa-channel extensions: qa-lab extensions: memory-wiki extensions: codex plugin: google-meet plugin: file-transfer extensions: oc-path labels Jul 4, 2026
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Dependency graph guard cleared

This PR no longer has blocked dependency graph changes. A future dependency graph change requires a fresh /allow-dependencies-change comment after the guard blocks that new head SHA.

  • Current SHA: 8964ccb23931a3c0d8e09122f4dff6cfbbd960b4

@giodl73-repo

Copy link
Copy Markdown
Contributor Author

Merged by head-pinned squash.

  • Source head: 8964ccb
  • Merge commit: d5badb9
  • Final PR surface: 2 files, default-disabled legacy WhatsApp crontab lint check plus regression coverage.

Validation used for landing:

  • focused Doctor contribution Vitest passed 70/70
  • changed-file oxfmt and oxlint passed
  • git diff --check passed
  • pnpm build passed before final rebase
  • hosted exact-head CI/Testbox gates passed on the source head after QA Smoke rerun
  • ClawSweeper proof was sufficient / platinum hermit; maintainer accepted the default-output compatibility tradeoff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant