Input-validation and edge-case bugs found in the v1.1.0 audit
维护者通常 1 天内回复
评估
- 难度
- 3/5
- 预计耗时
- 3-5 天
- 新手友好度
- 15/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- r
调研方向
This is a bundle of seven separate bugs, and pull request #238 is already open against it, so the work is claimed. Start from R/twsa.R:34 and R/create_sa.R:76-100, which show the outcome matching and the strategy-name checks. Each item needs a failing regression test before its fix. Done means every item has a test and NEWS has matching Bug fixes bullets.
由索引模型根据 Issue 内容生成。
描述
Suggested owner: Jorge Roa · Plan: Phase 2b
Goal
Several functions give cryptic errors, or silently wrong results, on valid or near-valid input. Fix each item with a regression test.
Scope
twsa()on adsa_twowayobject fails with the defaultoutcome. Code-verified.R/twsa.R:34callsmatch.arg(outcome)only in thepsabranch.- The
dsa_twowaybranch passes the 6-element default straight tocalculate_outcome()(R/twsa.R:57). calculate_outcome()matches against a different 8-element choice vector (R/calculate_outcome.R:9-10), so the call errors with "'arg' must be of length 1".- Fix: move
outcome <- match.arg(outcome)above the branch.
make_psa_obj()with the wrong number of strategy names gives "missing value where TRUE/FALSE needed". Reproduced.- The comparison loop at
R/create_sa.R:76runs before the length check atR/create_sa.R:88. - Move the check first. Shared with #208.
- The comparison loop at
other_outcomecolumns are never renamed to the strategy names. Reproduced: names stayChemo_Cost Radio_Cost Surg_Cost.R/create_sa.R:94-100renamescostandeffectivenessonly.
plot.evsi()condition has a misplaced parenthesis. Code-verified.R/evsi.R:324:length(unique(x$WTP > 1))should belength(unique(x$WTP)) > 1.
- Dead
FUNvalidity guard in the DSA runners. Code-verified.R/run_dsa.R:77andR/run_dsa.R:247useis.na(sum(is.na(jj))), which is alwaysFALSE. This is the same pattern asR/run_psa.R:47in #174; fix it the same way.
plot.exp_loss(col = "bw")ignoreslsize. Code-verified.- The bw branch at
R/exp_loss.R:170-171callsgeom_line(aes(linetype = ...))withoutlinewidth = lsize. col_aes = c("color", "line")atR/exp_loss.R:175includes"line", whichadd_common_aes()does not handle.
- The bw branch at
max.col()random tie-breaking also affectscalc_exp_loss(). Code-verified.R/exp_loss.R:60:max.col(-exp_loss)uses the defaultties.method = "random".- Fix it together with #167 (
R/ceac.R:85), usingties.method = "first". See the proposed comment on #167 below.
Acceptance
Each item has a test that fails before the fix. NEWS gets "Bug fixes" bullets.
- 主要语言
- R
- 星标
- 43
- 派生
- 14
- 平均合并
- 4 小时 44 分钟
- 30 天内合并 PR
- 15
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
DARTH-git/dampack 的其他 Issue
-
documentation
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
release
难度 5/5 一周以上 新手友好度 20/100
维护者通常 1 天内回复
-
documentation release
难度 3/5 1-2 天 新手友好度 25/100
维护者通常 1 天内回复
-
documentation
难度 3/5 1-2 天 新手友好度 58/100
维护者通常 1 天内回复
查看 DARTH-git/dampack 的全部 Issue
相似的 Issue
-
documentation priority: low
难度 2/5 1-3 小时 新手友好度 70/100
Pascal-Kueng/dyadMLM#179 ·
维护者通常 1 天内回复
-
Consider changes未关闭
难度 2/5 1-3 小时 新手友好度 68/100
OHDSI/OmopSketch#618 ·
-
难度 2/5 1-3 小时 新手友好度 62/100
-
bug exec:agent status:fix-merged
难度 2/5 1-3 小时 新手友好度 72/100
ichirio/rtfreporter#1046 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
维护者通常 1 天内回复