decisions 0.1.1: the fix for S7 1.0.0 (short design)
plans/2026-11-24-decisions-0.1.1-design.md
# decisions 0.1.1: the fix for S7 1.0.0 (short design)
Date: 2026-11-24. Decisions: D305 (two releases), D308 (approval). Status: approved by fmm on 2026-11-24 (D308).
## Intent
The CRAN checks of decisions 0.1.0 show ERROR on 7 of 13 platforms (all Linux platforms, r-release-windows and r-oldrel-windows; last update 2026-11-24). The installation stops:
```
** byte-compile and prepare package for lazy loading
Error in get(f@name, envir = envir) : object 'decider' not found
ERROR: lazy loading failed for package 'decisions'
```
The cause is S7 1.0.0 (on CRAN from 2026-11-19). The class `setup_class` has the property `decider = decider_class`. The class has the name `"decider"`, but the object has the name `decider_class`. When a property has no default, S7 1.0.0 makes a default that calls the constructor by the name of its class (`class_construct_expr()` runs `get(f@name, envir)`). No object `decider` exists, so the package cannot load. The 6 platforms with OK still have an older S7. A local installation with S7 1.0.0 gives the same error.
Version 0.1.1 fixes the installation and goes to CRAN this week (D305). Gemini, Venn and Box go in version 0.2.0.
## Goals, non-goals, anti-goals
- Goals: decisions installs and passes R CMD check with S7 1.0.0 and with S7 0.2.2. CRAN accepts 0.1.1.
- Non-goals: no new function, provider or vignette. No change to the Description text, other than the version.
- Anti-goals: no change that a user can see. The class names, the printed output and the setup files stay the same. `read_setup()` reads a file of 0.1.0.
## Approaches
| Approach | Result | Choice |
|---|---|---|
| 1. Make the property `decider` required: `S7::new_property(decider_class, default = quote(stop("`decider` is required.")))`. S7 then makes no default from the class name. | In a test copy, all 938 tests pass with S7 1.0.0 and with S7 0.2.2 (4 live tests skipped, no key). | Chosen |
| 2. Give the class object the name of its class (`decider`). | In a test copy, 81 tests fail: the argument `decider` of `decide()` and `decision_setup()` hides the class (`S7_inherits(decider, decider)`). Many names would change. | Rejected |
| 3. Give the class the name `"decider_class"`. | `class()` of each decider changes. A user can see it. | Rejected |
| 4. Require S7 1.0.0 or newer. | Not necessary: approach 1 works with both versions. It would stop users who have an older S7. | Rejected |
## Design
- `R/setup.R`: the property `decider` of `setup_class` becomes required (approach 1). No other code changes.
- `tests/testthat/test-setup.R`: one new test. `setup_class()` with no decider stops with the message "`decider` is required.". The test fails with the old property, and it fails at installation with S7 1.0.0.
- `DESCRIPTION`: Version 0.1.1. The Imports stay (`S7 (>= 0.2.0)`).
- `NEWS.md`: a section `# decisions 0.1.1` with one item: decisions installs again with S7 1.0.0.
- `cran-comments.md`: the text for an update. It gives the reason (the check errors since S7 1.0.0), the fix, and the test environments. Claude Code shows the lines to fmm before it writes them (D221).
- Checks, before the submission:
- local `R CMD check --as-cran` with S7 1.0.0, from a separate library (the user library keeps S7 0.2.2), and with S7 0.2.2;
- GitHub Actions R-CMD-check (it installs S7 1.0.0 from CRAN);
- R-hub (`rhub.yaml`): Linux, Windows, macOS, macOS arm64 and the nosuggests container;
- win-builder: R-devel, R-release and R-oldrel (r-oldrel-windows also failed).
- Git: the work goes on the branch `fix-s7-1.0.0` of decisions. Claude Code pushes the branch, so that GitHub Actions and R-hub can run. After all checks pass, Claude Code merges the branch into `main` and pushes. fmm submits to CRAN (D221).
- After CRAN publishes 0.1.1: the tag `v0.1.1`, a GitHub release, the development version `0.1.1.9000`, and a refresh of the copy of the record (`data-raw/record.R`), as for 0.1.0 (D299).
- The Space needs no change. Its Docker file installs decisions 0.1.0 from the package snapshot of 2026-11-09, which has S7 0.2.2.
## Left to the builder
- The words of the NEWS item and of cran-comments.md (fmm sees cran-comments.md first).
- Version 0.2.0 has its own design (Gemini, Venn and Box; D302, D305 to D307).