SDD ledger — plan: C:/Users/megahefm/Dropbox/Miami/Code/claude/fine_tuned_jev/replication_materials/plans/2026-11-24-decisions-0.2.0-vignettes-plan.md
plans/2026-11-24-decisions-0.2.0-vignettes-ledger.md · Status: Closed
| Item | Value |
|---|---|
| Status | Closed |
| Version | 1.0 (2026-11-25) |
| Written by | Claude Code |
This ledger is a copy of the working ledger for the plan `C:/Users/megahefm/Dropbox/Miami/Code/claude/fine_tuned_jev/replication_materials/plans/2026-11-24-decisions-0.2.0-vignettes-plan.md`. It was copied on 2026-11-25 at the end of the work. Internal agent IDs are removed.
# SDD ledger — plan: C:/Users/megahefm/Dropbox/Miami/Code/claude/fine_tuned_jev/replication_materials/plans/2026-11-24-decisions-0.2.0-vignettes-plan.md
Setup: branch vignettes-gemini-venn of decisions, from deciders-gemini-venn at 559c43f; spec replication_materials/plans/2026-11-24-decisions-0.2.0-design.md section 3 (D313); plan approved (D322).
Pre-flight: Tasks 1, 2 and 3 share data-raw/vignette_results.R (the key reading of Task 1 Step 1 serves Tasks 1 and 2; Task 3 needs no key). No other shared interface. OK.
Task 1: complete (commits 559c43f..b02cbc7, tests: Rscript -e 'devtools::load_all(quiet = TRUE); s <- readRDS("inst/extdata/choosing-a-model.rds"); stopifnot(identical(names(s$answers), c("jev","microsoft","openai","gemini")), nrow(s$answers$gemini) == 75, all(is.na(s$answers$gemini$.error))); rmarkdown::render("vignettes/choosing-a-model.Rmd", output_dir = tempdir(), quiet = TRUE); cat("choosing-a-model renders with 4 models\n")' → choosing-a-model renders with 4 models)
Task 2: complete (commits b02cbc7..381024f, tests: Rscript -e 'devtools::load_all(quiet = TRUE); s <- readRDS("inst/extdata/images.rds"); stopifnot(identical(names(s$answers), c("jev","openai","gemini","gemini (no references)")), all(purrr::map_int(s$answers, nrow) == 46), length(s$clef_answers) == 3); rmarkdown::render("vignettes/images.Rmd", output_dir = tempdir(), quiet = TRUE); cat("images renders; checks of the counts pass\n")' → images renders; checks of the counts pass)
Task 3: Ruling: the calibrator is cal_estimate_multinomial(smooth = FALSE) (multinomial logistic, nnet, a recommended package of R), not smooth = TRUE — the GAM fit of mgcv failed on the Venn probabilities ('missing value where TRUE/FALSE needed' in gam.outer) after the 464 calls; the case now saves the answers before the calibration — cost if wrong: a calibrator with less flexibility; the vignette shows the code and the saved metrics, so its build needs neither mgcv nor nnet.
Task 3: complete (commits 381024f..ad0b584, tests: Rscript -e 'devtools::load_all(quiet = TRUE); v <- readRDS("inst/extdata/open-models-venn.rds"); stopifnot(nrow(v$answers) == 464, nrow(v$metrics) == 2, file.exists("inst/extdata/open-models.rds")); rmarkdown::render("vignettes/open-models.Rmd", output_dir = tempdir(), quiet = TRUE); cat("open-models renders with the Venn section; Laya results kept\n")' → open-models renders with the Venn section; Laya results kept)
Task 3: follow-up commit: one sentence compared Venn after calibration (0.953, held-out half) with the hosted models (0.947 to 0.987, 75 rows) as if they were better; now it compares Venn without a calibrator only.
Final: review by a fresh reviewer (Fable): ready to merge with fixes; no Critical; every number of the text matches the saved data.
Final: Ruling: the fixes go into a git worktree (../decisions-vignettes-fix) of vignettes-gemini-venn, because the case-study steps run in the main checkout on case-study-gemini; switching branches would change study_again.R under the running steps — cost if wrong: none.
Final: fixed Important 1 (the Venn calibrator had renamed levels, so decision_setup() refused it; cal_apply() left .pred_class stale) — v1_red_green.R RED (decision_setup() error) → GREEN; the truth keeps the answers as levels, cal_apply(pred_class = .pred_class), accuracy from .pred_class, the calibrator saved, and the script checks that decision_setup() takes it; the vignette shows venn-setup.
Final: fixed Important 2 (images.Rmd claimed that the references help Gemini rank the images; the bootstrap interval of the AUC difference spans 0) — the text now says the difference is not clear with 46 images and gives the shift toward defective (13 of 23 nominal images with the references, 0 without); the hidden check pins those counts.
Final: fixed Important 3 (the Gemini-only cases failed on a second run, after the paid calls) — v1_red_green.R RED (second merge: FALSE) → GREEN (TRUE); add_answers() replaces an element of the same name; the saved file is read and checked before decide().
Final: minor (deferred): rsample pools the 3 small classes (now said in the text; the halves are not shown).
Final: minor (deferred): the multinomial fit stops at its iteration cap (maxit 100); digits may differ on another platform (claims hold over 197 seeds).
Final: minor (deferred): the claim 'Venn is right less often than the hosted models' is not checked in a hidden chunk (true like for like: 0.867 against 0.947 to 0.987 on the 75 reports).
Final: minor (deferred): venn-metrics differs from the script by 'metrics <- '; the header comments of vignette_results.R are stale (case list, added lines, images models).
Final: minor (deferred): Gemini calls of the full cases images and choosing-a-model would log under the 0.1.0 purposes (decisions-task11*).
Final: minor (deferred): record.R empties the table of the Gemini calls on the record copy (cell 3 is the call count), as for the fair comparison.
Final: minor (deferred): images.Rmd 'each input holds four reference images' is not true for gemini (no references).
Final: minor (deferred): the saved Venn .seconds are cache hits; no speed claim uses them.
Final: minor (deferred): inst/WORDLIST re-sorted in locale order (66 changed lines).
Final: minor (deferred): 'levels' as a variable name (now 'classes' in the Venn chunks).
Task 4: merge: after PR 3, PR 4 was pointed at main and merged with a merge commit (8d75a02).
Task 4: complete (commits ad0b584..8bb93dd, Task 4 and the fixes of the final review; tests: R CMD check --as-cran → 0 errors | 0 warnings | 0 notes; PR 4 checks → 6 of 6 pass; merged as 8d75a02)