superseded: bounded interactive menu choices are canonical in #330 - #309
superseded: bounded interactive menu choices are canonical in #330#309seonghobae wants to merge 1 commit into
Conversation
Changed `^[0-9]+$` to `^[12]$` to prevent arbitrarily large number coercion which caused `NA` crashes via `as.integer()`.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Warning Review limit reachedNext included review available in 54 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
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 |
| for (attempt in seq_len(3)) { | ||
| n <- readline(prompt = "Is it correct? (1: Yes 2: No) : ") | ||
| if (grepl("^[0-9]+$", n)) { | ||
| if (grepl("^[12]$", n)) { |
| **Learning:** In R, optional boolean parameters that default to `NULL` should be validated using explicit runtime type validation (e.g., `if (!is.null(flag) && (!is.logical(flag) || length(flag) != 1 || is.na(flag)))`). | ||
| **Prevention:** Always implement explicit runtime type validation for optional boolean parameters. | ||
|
|
||
| ## 2024-08-30 - Fix weak regex validation for integer coercion |
Verified-successor closure. The valid production delta is exactly the same three
R/aFIPC.Rmenu-admission changes now carried by canonical Draft #330 at4b38d796e411e4e87c5bf8e9d0ea2f1c65a589fe, where production-path prompt regressions also exercise bounded invalid input and accepted2. The generated Sentinel note and MEDIUM/DoS characterization are not independent product semantics and are intentionally not inherited. No valid test, fixture, contract, or source behavior remains unique to #309; this is not a merge.