Repository navigation
Fix 0.5.0 release blockers from the release review - #64
Merged
Merged
Conversation
Found in the 0.5.0 release review. When any variable forces the legacy path (an unsupported feature, validate = FALSE, and the other legacy triggers), the legacy generator ignored mockFormula: z = x * 2 came back as unrelated random values (0 of 200 rows matched), or vanished entirely with DerivedVar:: notation, with default validation on. create_mock_data() now stops and names the formula variables, mirroring the survival guard (ADR v05-survival-dates D10). The check runs before the legacy derived-variable exclusion, which would otherwise hide DerivedVar:: rows, and scopes mockFormula to the requested databaseStart the same way the v0.4 adapter does. Both guards share one description of when the legacy path is used.
) height's high-garbage range had an infinite upper bound, (2.1;inf], so sampling produced NaN in the packaged example's default output. The range is now (2.1;2.5] (one cell, changed through read.csv/write.csv), and a contract test pins that the example produces no NaN. Closes #60. README: the minimal-example output showed three columns from the legacy path; it is regenerated by running the code (five representative columns, with a note on the missing codes it shows). The two other README outputs were regenerated too and still match. Closes #49. NEWS: the fixture-corrections entry no longer says survival dates stay off the v0.4 pipeline, and mentions the height range; a Breaking changes entry records the new formula legacy guard.
Found in the 0.5.0 release review. .gitignore excluded man/*.Rd, so the repository held no Rd files: installing from GitHub gave "No man pages found" and no help for any function, including create_mock_data() and mock_spec_survival(). CI hid this because it runs roxygen2 before checking. The 61 generated Rd files are now tracked, as is usual for R packages; regenerate them with devtools::document() when roxygen comments change.
This was referenced Sep 27, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes from an external review of the release candidate (PR #63 at
c69d626). The review recommended holding the release for two blockers and three smaller items. Each finding was reproduced before it was fixed; each fix is test-first where it changes behaviour.1. Formula variables silently wrong on the legacy path (blocker). When any variable forces the legacy generator (an unsupported feature such as a lognormal distribution,
validate = FALSE, or the other legacy triggers), the legacy generator ignoredmockFormula. Reproduced with default validation on:z = x * 2matched on 0 of 200 rows; withDerivedVar::notationzvanished.create_mock_data()now stops and names the formula variables, mirroring the survival guard (ADR D10). The check runs before the legacy derived-variable exclusion, which would otherwise hideDerivedVar::rows, and scopesmockFormulato the requesteddatabaseStartthe way the v0.4 adapter does. Test:the legacy generator stops on formula metadata instead of generating wrong values, which was RED on all three legacy routes and keeps a v0.4-path control. (fe4a739)2. GitHub installs had no help pages (blocker).
.gitignoreexcludedman/*.Rd, so the repository held no Rd files, and a fresh install reported no help for any function. CI hid it by running roxygen2 first. The 61 Rd files are now tracked. Verified by cloning this branch, building, installing into an empty library: 62 help topics, includingcreate_mock_data,mock_spec_survivalandgenerate_survival_dates. (a2d8225)3. Smaller items (b803718):
heightgarbage range(2.1;inf]producedNaN. Now(2.1;2.5], one cell changed throughread.csv/write.csv, with a contract test that the example produces noNaN. Closes Minimal example: height garbage range (2.1;inf] produces NaN values #60.Verification (local, R 4.4.2, macOS 27.0)
--as-cranand pkgdown: running; results to follow in a commentAfter this merges into
dev, release PR #63 picks it up; rerun its checks before merging and tagging.🤖 Generated with Claude Code