{"record":{"id":"bbf9055d47337b18","repo":"Hmbown/CodeWhale","slug":"unsupported-rrule-field-key-for-weekly-allowe","errorCode":null,"errorMessage":"Unsupported RRULE field '{key}' for WEEKLY. Allowed: FREQ,BYDAY,BYHOUR,BYMINUTE","messagePattern":"Unsupported RRULE field '(.+?)' for WEEKLY\\. Allowed: FREQ,BYDAY,BYHOUR,BYMINUTE","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/automation_manager.rs","lineNumber":421,"sourceCode":"                    .transpose()\n                    .context(\"Failed to parse BYMINUTE\")?;\n                if anchor_hour.is_some_and(|hour| hour > 23) {\n                    bail!(\"BYHOUR must be between 0 and 23\");\n                }\n                if anchor_minute.is_some_and(|minute| minute > 59) {\n                    bail!(\"BYMINUTE must be between 0 and 59\");\n                }\n                Ok(Self::Hourly {\n                    interval_hours,\n                    byday,\n                    anchor_hour,\n                    anchor_minute,\n                })\n            }\n            AutomationFrequency::Weekly => {\n                for key in parts.keys() {\n                    if key != \"FREQ\" && key != \"BYDAY\" && key != \"BYHOUR\" && key != \"BYMINUTE\" {\n                        bail!(\n                            \"Unsupported RRULE field '{key}' for WEEKLY. Allowed: FREQ,BYDAY,BYHOUR,BYMINUTE\"\n                        );\n                    }\n                }\n                let byday_raw = parts\n                    .get(\"BYDAY\")\n                    .ok_or_else(|| anyhow::anyhow!(\"WEEKLY schedules require BYDAY\"))?;\n                let byday = parse_byday(&byday_raw.to_ascii_uppercase())?;\n                if byday.is_empty() {\n                    bail!(\"BYDAY cannot be empty for WEEKLY schedules\");\n                }\n                let byhour = parts\n                    .get(\"BYHOUR\")\n                    .ok_or_else(|| anyhow::anyhow!(\"WEEKLY schedules require BYHOUR\"))?\n                    .parse::<u32>()\n                    .context(\"Failed to parse BYHOUR\")?;\n                let byminute = parts\n                    .get(\"BYMINUTE\")","sourceCodeStart":403,"sourceCodeEnd":439,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/automation_manager.rs#L403-L439","documentation":"For FREQ=WEEKLY, the parser whitelists only FREQ, BYDAY, BYHOUR, and BYMINUTE. INTERVAL is deliberately not allowed for weekly schedules, and any other key triggers rejection instead of silent ignoring.","triggerScenarios":"Parsing 'RRULE:FREQ=WEEKLY;INTERVAL=2;BYDAY=MO' or 'RRULE:FREQ=WEEKLY;BYDAY=MO;COUNT=4'.","commonSituations":"Copying RFC-5545 weekly rules that use INTERVAL or COUNT; assuming HOURLY's key set applies to WEEKLY too.","solutions":["Remove unsupported keys (including INTERVAL) from the WEEKLY rule","Encode 'every N weeks' differently, e.g. with CRON frequency","Fix key typos to exactly FREQ, BYDAY, BYHOUR, or BYMINUTE"],"exampleFix":"// before\nRRULE:FREQ=WEEKLY;INTERVAL=2;BYDAY=MO;BYHOUR=9;BYMINUTE=0\n// after\nRRULE:FREQ=WEEKLY;BYDAY=MO;BYHOUR=9;BYMINUTE=0","handlingStrategy":"validation","validationCode":"const ALLOWED = [\"FREQ\",\"BYDAY\",\"BYHOUR\",\"BYMINUTE\"];\nfor (const kv of rule.split(';').slice(1)) {\n  const key = kv.split('=')[0].trim().toUpperCase();\n  if (!ALLOWED.includes(key)) throw new Error(`Unsupported RRULE field ${key} for WEEKLY`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  parse_rrule(rule)?;\n} catch e if e.to_string().contains(\"Unsupported RRULE field\") && e.to_string().contains(\"WEEKLY\") {\n  eprintln!(\"{e}: remove INTERVAL/COUNT etc. from WEEKLY rules\");\n}","preventionTips":["Remember WEEKLY allows no INTERVAL — use CRON for multi-week periods","Sanitize imported RFC-5545 rules before saving","Validate keys against a per-frequency whitelist"],"tags":["rrule","scheduling","validation"],"backgroundTag":"unsupported-config-value","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}