Fix cron installation safety on qr init#46
Conversation
Co-authored-by: Aanish Bhirud <baanish@users.noreply.github.com>
|
Warning Review limit reached
Next review available in: 51 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
| let output = Command::new("crontab") | ||
| .arg("-l") | ||
| .output() | ||
| .context("Failed to run `crontab -l`")?; |
There was a problem hiding this comment.
WARNING: Missing crontab binary now aborts qr init instead of degrading gracefully
Previously, if crontab -l could not even be spawned (e.g. cron is not installed on minimal distros, containers, or WSL without cronie), the Err(_) arm printed a "Add this entry manually" hint and let qr init continue. Now that path returns via .context(...)?, so the error propagates through install_cron() (install_cron()? at src/main.rs:356) and aborts the entire qr init with "Failed to run crontab -l: No such file or directory (os error 2)".
The PR's stated intent is to abort on unexpected list failures without wiping the crontab, but a spawn failure (binary missing) is a different case that previously degraded gracefully. Consider detecting the "binary not found" spawn error and retaining the manual-instruction fallback so users without cron can still complete qr init.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge The previously reported Files Reviewed (1 file)
Previous Review Summary (commit 1353757)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 1353757)Status: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (2 files)
Reviewed by glm-5.2-short · Input: 16.8K · Output: 1.8K · Cached: 131.3K |
Co-authored-by: Aanish Bhirud <baanish@users.noreply.github.com>
Summary
Ensures
qr initnever overwrites a user's crontab whencrontab -lfails unexpectedly.crontab -lexit status explicitlycrontab -write)crontab_contents_from_list_output,merge_cron_entryTest plan
cargo testcargo fmt --all -- --checkcargo clippy --all-targets --locked -- -D warningsNote: Merge carefully with
cursor/init-secret-hardening-93e4— both touchinstall_croninmain.rs. Combined cleanly oncursor/public-readiness-93e4.