fix(schedulers): add default values for optional params $12 and $13 in _install_scheduler_linux#17826
Conversation
_install_scheduler_linux() accessed ${12} and ${13} (on_calendar and
timeout_sec) without default values. Under set -u, callers that pass
fewer than 13 args (e.g. stats-wrapper, process-guard, memory-pressure-
monitor, contribution-watch, profile-readme, token-refresh) trigger an
unbound variable error, causing aidevops update to exit 1.
Fix: use ${12:-} and ${13:-} to default to empty string when not
provided. The downstream _install_scheduler_systemd() already handles
empty timeout_sec (falls back to interval_sec then 3600).
Fixes #17807
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughA surgical fix to Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
MERGE_SUMMARYFix: Added Root cause: Under Change: 2-line diff — Verification: Closes: #17807 aidevops.sh v3.6.171 plugin for OpenCode v1.4.0 with claude-sonnet-4-6 spent 4m and 226 tokens on this as a headless worker. Overall, 11s since this issue was created. |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report SonarCloud: 0 bugs, 0 vulnerabilities, 650 code smells Wed Apr 8 05:05:13 UTC 2026: Code review monitoring started 📈 Current Quality Metrics
Generated on: Wed Apr 8 05:05:16 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|
Up to standards ✅🟢 Issues
|



Summary
_install_scheduler_linux()insetup-modules/schedulers.shaccessed${12}(on_calendar) and${13}(timeout_sec) without default values. Underset -u, any caller that passes fewer than 13 arguments triggers an unbound variable error, causingaidevops updateto exit 1.Root cause
The function signature documents
$12and$13as optional parameters, but the variable assignments used bare${12}and${13}without:-defaults. Multiple callers pass only 11 arguments (omitting both optional params):setup_stats_wrapper(line 781)setup_process_guard(line 988)setup_memory_pressure_monitor(line 1080)_install_cw_linux(line 1281)_install_profile_readme_linux(line 1448)setup_token_refresh(line 1660)Fix
The downstream
_install_scheduler_systemd()already handles emptytimeout_sec(falls back tointerval_sec, then3600), so empty defaults are safe.Verification
bash -n setup-modules/schedulers.sh— syntax check passesshellcheck setup-modules/schedulers.sh— zero violationsset -uerrorsRuntime Testing
Risk level: Low — two-character change to variable defaults, no logic change.
Self-assessed: syntax check + shellcheck pass; downstream empty-value handling confirmed at lines 492-496.
Resolves #17807
aidevops.sh v3.6.171 plugin for OpenCode v1.4.0 with claude-sonnet-4-6 spent 2m and 4,087 tokens on this as a headless worker.
Summary by CodeRabbit