From 86c226b2970125b374e4eef34c58cd3a066ffaac Mon Sep 17 00:00:00 2001 From: jakeberv Date: Fri, 16 Oct 2026 22:33:11 -0400 Subject: [PATCH 1/9] Finalize CRAN submission comments for 0.2.2 --- cran-comments.md | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/cran-comments.md b/cran-comments.md index f660d80..96d42b4 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,7 +1,8 @@ -# CRAN submission preparation: bifrost 0.2.2 +# CRAN submission comments: bifrost 0.2.2 -Draft for an update from CRAN version 0.2.0 to 0.2.2. Version 0.2.1 was -published on GitHub. Version 0.2.2 has not yet been submitted or published. +This update is from CRAN version 0.2.0 to 0.2.2. Version 0.2.1 was +published on GitHub only. These comments are ready for submission; version +0.2.2 has not yet been submitted to CRAN or published on GitHub. ## Release changes @@ -28,26 +29,28 @@ failures. Installation, attachment, and examples do not require these downloads. ## Verified CI results The following results apply to main commit -`30e58e82af46f6f0ef35ebf69f3a563f8b459774` (2026-10-15 UTC): +`e1d2fe3be99a6677624daf85a64e53a8c16ce166` (2026-10-15 UTC), following +the merge of the final package-check evidence in PR #251: -- [R CMD check](https://github.com/jakeberv/bifrost/actions/runs/38688925126) +- [R CMD check](https://github.com/jakeberv/bifrost/actions/runs/38823234675) passed on macOS and Windows R release, and Ubuntu R release, devel, and oldrel-1, using `--as-cran --run-donttest --no-manual`. -- [Coverage and parallel smoke tests](https://github.com/jakeberv/bifrost/actions/runs/38688925143) +- [Coverage and parallel smoke tests](https://github.com/jakeberv/bifrost/actions/runs/38823234832) passed. Whole-package R coverage was exactly 100%, with zero uncovered rows. The coverage run recorded 4,947 passing assertions, zero failures or warnings, and 43 expected skips for coverage-specific cases or development files absent from the built package. Separate Linux and Windows parallel smoke jobs passed. -- [The pkgdown build and deployment](https://github.com/jakeberv/bifrost/actions/runs/38688925130) +- [The pkgdown build and deployment](https://github.com/jakeberv/bifrost/actions/runs/38823235095) passed. -- [The advisory audit](https://github.com/jakeberv/bifrost/actions/runs/38688925163) +- [The advisory audit](https://github.com/jakeberv/bifrost/actions/runs/38823234738) completed. It still reports print/cat usage and documentation/style findings; a successful advisory job does not mean every advisory finding is cleared. URL-liveness and advisory spelling checks were skipped. ## Final source-package check -On 2026-10-15, `bifrost_0.2.2.tar.gz` built from the same commit passed +On 2026-10-15, `bifrost_0.2.2.tar.gz` built from commit +`30e58e82af46f6f0ef35ebf69f3a563f8b459774` passed `R CMD check --as-cran --run-donttest --library=` with: **0 errors | 0 warnings | 1 note** @@ -71,12 +74,11 @@ Archive SHA-256: 153dbcf17195ad2c0e727fda3acad1e47c91a4ae67f32f5a609b525b0dbfe92b ``` -The first attempt passed tests and the PDF manual but crashed inside the -existing V8 8.2.0 installation during the HTML manual check. A standalone V8 -call reproduced the crash without loading bifrost. A private build of V8 8.2.0 -with bundled engine 14.6.202.26 resolved it. The complete check then passed on -the identical archive, without disabling checks or changing bifrost source. -Existing installations were unchanged during this validation. +The checked archive's SHA-256 was verified again on 2026-10-16. Between its +source commit and the CI-tested main commit above, only `cran-comments.md` +and `tools/releases/0.2.2.md` changed. Both are excluded from source packages; +package source is unchanged. No repeat package check was needed for those +maintainer-note changes. ## Known limitations retained in this update @@ -89,12 +91,9 @@ Existing installations were unchanged during this validation. deferred and is not part of 0.2.2 preparation. Follow-up: https://github.com/jakeberv/bifrost/issues/231. -## Pending before submission +## Submission artifact -Merge the check-evidence PR through normal review and confirm CI on its merge -commit. Select the release commit and verify that its package contents still -match the checked source; rerun the final check if package contents change. -These maintainer notes and `tools/releases/0.2.2.md` are excluded from source -archives. Keep the checksum above tied to the actual checked archive, not an -unverified rebuild. Remove draft/pending wording only when submission is -authorized. No tag, GitHub release, or CRAN submission has been made for 0.2.2. +Use the checked `bifrost_0.2.2.tar.gz` identified by the checksum above. These +comments are excluded from the package, so finalizing them does not alter the +checked artifact. If package contents change before submission, rebuild and +recheck the package and update this evidence and checksum. From b599b3da3c0456a02a22d130208f60465b6bb963 Mon Sep 17 00:00:00 2001 From: jakeberv Date: Fri, 16 Oct 2026 22:36:27 -0400 Subject: [PATCH 2/9] Streamline CRAN submission comments --- cran-comments.md | 113 +++++++++++------------------------------------ 1 file changed, 25 insertions(+), 88 deletions(-) diff --git a/cran-comments.md b/cran-comments.md index 96d42b4..831603d 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,99 +1,36 @@ -# CRAN submission comments: bifrost 0.2.2 +# bifrost 0.2.2 -This update is from CRAN version 0.2.0 to 0.2.2. Version 0.2.1 was -published on GitHub only. These comments are ready for submission; version -0.2.2 has not yet been submitted to CRAN or published on GitHub. +This updates CRAN version 0.2.0; version 0.2.1 was released on GitHub only. -## Release changes +## Changes -Searches now default to data-dependent BM/BMM starting values adapted from -the mvMORPH 1.2.1 development initializer used in earlier analyses. The -compatibility helper passes these values through `start` to the installed -mvMORPH; it does not pin or modify that package. Native initialization remains -available through `start_strategy = "native"` and is required for EmpBayes. -The adapted code credits Julien Clavel in its source and in `Authors@R`. -`corpcor` and `RhpcBLASctl` are now explicit imports. +This release restores the data-dependent starting-value strategy used in +earlier analyses, while retaining an option for native mvMORPH initialization. +It also fixes progress-related random-state and numerical-thread handling. +The adapted starting-value code credits Julien Clavel. New imports are +`corpcor` for initialization and `RhpcBLASctl` for worker thread control. +Further changes and reproducibility limitations are described in NEWS.md. -This update also corrects progress-related random-stream and numerical-thread -handling and refines the console displays. It includes the citation and source -archive updates from the GitHub-only 0.2.1 release. NEWS.md describes the -changed defaults and reproducibility limitations. +## Checks -## Package contents and network access - -Worked articles and empirical data remain on the package website and are -excluded from the source package. `bifrost_example_file()` downloads data -only on explicit request, verifies SHA-256 and byte size, and reports download -failures. Installation, attachment, and examples do not require these downloads. - -## Verified CI results - -The following results apply to main commit -`e1d2fe3be99a6677624daf85a64e53a8c16ce166` (2026-10-15 UTC), following -the merge of the final package-check evidence in PR #251: - -- [R CMD check](https://github.com/jakeberv/bifrost/actions/runs/38823234675) - passed on macOS and Windows R release, and Ubuntu R release, devel, and - oldrel-1, using `--as-cran --run-donttest --no-manual`. -- [Coverage and parallel smoke tests](https://github.com/jakeberv/bifrost/actions/runs/38823234832) - passed. Whole-package R coverage was exactly 100%, with zero uncovered rows. - The coverage run recorded 4,947 passing assertions, zero failures or warnings, - and 43 expected skips for coverage-specific cases or development files absent - from the built package. Separate Linux and Windows parallel smoke jobs passed. -- [The pkgdown build and deployment](https://github.com/jakeberv/bifrost/actions/runs/38823235095) - passed. -- [The advisory audit](https://github.com/jakeberv/bifrost/actions/runs/38823234738) - completed. It still reports print/cat usage and documentation/style findings; - a successful advisory job does not mean every advisory finding is cleared. - URL-liveness and advisory spelling checks were skipped. - -## Final source-package check - -On 2026-10-15, `bifrost_0.2.2.tar.gz` built from commit -`30e58e82af46f6f0ef35ebf69f3a563f8b459774` passed -`R CMD check --as-cran --run-donttest --library=` with: +`R CMD check --as-cran --run-donttest`, including PDF and HTML manuals, +completed on macOS arm64 (R 4.4.2) on 2026-10-15 with: **0 errors | 0 warnings | 1 note** -The sole note was `unable to verify current time`, from the local environment's -timestamp check. Installation, loading, examples (including `\donttest`), -tests, and both PDF and HTML manual checks passed. The test suite recorded -2,969 passing assertions, zero failures or warnings, and 138 expected skips -(including CRAN-mode skips and development files absent from the tarball). -The 101-page PDF manual also passed a separate `qpdf --check`. - -Environment: macOS Sequoia 15.7.9, arm64, R 4.4.2, mvMORPH 1.2.3, and OpenBLAS -0.3.34. Bifrost was installed in an isolated library; other dependencies were -accessed read-only. Numerical libraries used one thread per worker, with at -most eight workers. Archive contents were inspected to confirm that local -outputs, caches, and development tooling were excluded. - -Archive SHA-256: - -```text -153dbcf17195ad2c0e727fda3acad1e47c91a4ae67f32f5a609b525b0dbfe92b -``` - -The checked archive's SHA-256 was verified again on 2026-10-16. Between its -source commit and the CI-tested main commit above, only `cran-comments.md` -and `tools/releases/0.2.2.md` changed. Both are excluded from source packages; -package source is unchanged. No repeat package check was needed for those -maintainer-note changes. - -## Known limitations retained in this update +The sole note was `unable to verify current time`, an environment-related +timestamp check. Installation, examples and tests passed. -- High-dimensional searches remain sensitive to initialization and random - state, and some intermediate fits can fail to converge. The compatibility - policy restores a reproducible starting strategy, not guaranteed optimality. - Follow-up: https://github.com/jakeberv/bifrost/issues/242. -- The existing Gumbel KL-divergence bootstrap can discard valid large draws - because of overflow/underflow and understate uncertainty. Its correction is - deferred and is not part of 0.2.2 preparation. - Follow-up: https://github.com/jakeberv/bifrost/issues/231. +[CI checks](https://github.com/jakeberv/bifrost/actions/runs/38823234675) +also passed on macOS and Windows R release, and Ubuntu R release, devel and +oldrel-1 (`--as-cran --run-donttest --no-manual`). -## Submission artifact +## Additional notes -Use the checked `bifrost_0.2.2.tar.gz` identified by the checksum above. These -comments are excluded from the package, so finalizing them does not alter the -checked artifact. If package contents change before submission, rebuild and -recheck the package and update this evidence and checksum. +- Worked articles and empirical data are hosted separately. Data downloads + occur only on explicit request, not during installation, attachment or checks. +- High-dimensional fits remain sensitive to initialization and random state; + some intermediate fits can fail to converge (issue #242). +- The existing Gumbel KL-divergence bootstrap can understate uncertainty because + of overflow/underflow. Its correction remains deferred to a later release: + https://github.com/jakeberv/bifrost/issues/231. From 616c145a2f85086f8aecc00beb201de783ff9c5b Mon Sep 17 00:00:00 2001 From: jakeberv Date: Fri, 16 Oct 2026 22:42:46 -0400 Subject: [PATCH 3/9] Refresh spelling dictionary for 0.2.2 documentation --- inst/WORDLIST | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/inst/WORDLIST b/inst/WORDLIST index c547a22..d79838a 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -20,7 +20,6 @@ Caetano Carvajal Cheng Claramunt -Clavel Codecov Colab Collyer @@ -29,9 +28,9 @@ Cov Cracraft Cui DF -DOI Dipnoi EB +EmpBayes Escarguel Evaluable Felsenstein @@ -54,7 +53,6 @@ Interspecific Iteratively JS Jolliffe -Julien KDE Kaliontzopoulou Kozak @@ -103,6 +101,7 @@ Pennell Phylogenies Phytologist Precompute +Preprint Probst Purvis Qiao @@ -149,12 +148,12 @@ Welch XQuartz Xie Zenodo +Zenodo's Zhaoqi Zhou Zhu Ziebell abline -accuracies acknowledgements adjustcolor adp @@ -223,6 +222,7 @@ gic gmShiny grDevices grey +gz heterochronous hindlimb hjust @@ -231,6 +231,8 @@ htmltools ic idx ij +initializer +initializer's interpretable intersp intra @@ -260,7 +262,10 @@ morphometric mtext mult multisession +multithreading +mustWork mvMORPH +mvMORPH's mvPGLS mvgls mvmorph @@ -269,6 +274,7 @@ ncol nodelabels nodepath nonmonophyletic +normalizePath nph nrow oma @@ -277,9 +283,7 @@ overrepresented oversubscription pGLS parallelization -parallelize parallelizes -parameterizing passerine pca pch @@ -312,7 +316,6 @@ reclusters rect renderer renormalizes -replicate's reproducibility rescale rescaled @@ -345,11 +348,11 @@ tunable ultrametric ultrametricity uncached -unevaluable unflagged unname unrepresentable unscaled +unshifted vapply vdots vectorize @@ -357,6 +360,7 @@ vectorized vectorizes vectorizing viridis +winslash xend xlab xlim From d97b288312d872d7efa5c5631e276f49ec9f9803 Mon Sep 17 00:00:00 2001 From: jakeberv Date: Fri, 16 Oct 2026 22:52:09 -0400 Subject: [PATCH 4/9] Record rebuilt 0.2.2 check results and worker-limit warning --- cran-comments.md | 7 +++++-- tools/releases/0.2.2.md | 42 +++++++++++++++++++++++++++++++++++++---- 2 files changed, 43 insertions(+), 6 deletions(-) diff --git a/cran-comments.md b/cran-comments.md index 831603d..ef86571 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -14,12 +14,15 @@ Further changes and reproducibility limitations are described in NEWS.md. ## Checks `R CMD check --as-cran --run-donttest`, including PDF and HTML manuals, -completed on macOS arm64 (R 4.4.2) on 2026-10-15 with: +completed on macOS arm64 (R 4.4.2) on 2026-10-17 UTC with: **0 errors | 0 warnings | 1 note** The sole note was `unable to verify current time`, an environment-related -timestamp check. Installation, examples and tests passed. +timestamp check. Installation, examples and tests passed. Testthat separately +reported one worker-limit warning: the RNG chunk-invariance test requests +three workers when only two cores are advertised. This test resource-use +issue must be resolved before submission; no assertions failed. [CI checks](https://github.com/jakeberv/bifrost/actions/runs/38823234675) also passed on macOS and Windows R release, and Ubuntu R release, devel and diff --git a/tools/releases/0.2.2.md b/tools/releases/0.2.2.md index 1b9ac07..3d35d7e 100644 --- a/tools/releases/0.2.2.md +++ b/tools/releases/0.2.2.md @@ -54,9 +54,14 @@ for details. GitHub publication does not update CRAN automatically. `\donttest` examples and PDF/HTML manuals: **0 errors, 0 warnings, 1 note** (`unable to verify current time`). See `cran-comments.md` for the environment, archive checksum, and resolution of the local V8 crash using a private build. -- [ ] Merge the check-evidence PR through normal review and confirm its CI. - Select the exact release commit: **pending**. Confirm package contents match - the checked source; rerun the final check if package contents change. +- [x] Check-evidence PR #251 merged as `e1d2fe3`; its post-merge CI passed. +- [x] Rebuild with the PR #252 dictionary update and run the complete package + and manual check. See the latest evidence below, including its test warning. +- [ ] Resolve the test that explicitly requests three workers under a two-core + check budget, preserving the RNG invariance assertion. Rebuild and recheck + after that change before CRAN submission. +- [ ] Merge PR #252 through normal review and confirm its CI. Select the exact + release commit and verified submission archive after the test issue is resolved. - [ ] Retain the documented deferral of #231; this preparation does not fix it. Keep the initialization/convergence follow-up (#242) and RRphylo dependency work (#247) separate from this release. @@ -70,7 +75,36 @@ for details. GitHub publication does not update CRAN automatically. - [ ] Apply the publication-time documentation edits below through a PR. Update CRAN availability separately, only after CRAN actually publishes it. -## Checked archive and local evidence +## Latest check: PR #252 dictionary update + +Source commit: `616c145a2f85086f8aecc00beb201de783ff9c5b`; checked on 2026-10-17 UTC. +Archive SHA-256: `10757602747ee58d4d934f85b66a3abd008fd3569020daf07b95d499f2a1d023`. + +`R CMD check --as-cran --run-donttest` with both manuals returned **0 errors, +0 check warnings, 1 note** (`unable to verify current time`). Testthat recorded +2,969 passing assertions, zero failures, **one warning**, and 138 expected skips. +The 101-page PDF also passed `qpdf --check`. + +A diagnostic rerun identified the warning in `test-search-progress.R`: +“animated Future RNG matches ordinary work and preserves parallel chunk +invariance” explicitly compares two workers with three. With only two cores +advertised, `parallelly` warns about the three-worker request. This must be +resolved before CRAN submission; the passing check does not establish +compliance with CRAN's two-core check limit. No test or package code was changed +as part of recording these results. + +Validation used a fresh isolated library with existing dependencies accessed +read-only, numerical libraries set to one thread, and two advertised cores. +The test explicitly launched three workers despite those advertised settings, +remaining within the user's eight-core ceiling. Existing dependency DESCRIPTION +hashes were unchanged. The archive differs from the prior checked archive only +in `inst/WORDLIST` and its generated packaging timestamp. + +Evidence: `output/release-0.2.2-pr252-check/run-jx3msm29/`, including the archive, +`SHA256SUMS`, `final-summary.txt`, `bifrost.Rcheck/00check.log`, the manual, +`test-warning-diagnostic.log`, and `test-results-diagnostic.rds`. + +## Earlier checked archive and local evidence Checked archive: `bifrost_0.2.2.tar.gz`, built from `30e58e8` on 2026-10-15. SHA-256: `153dbcf17195ad2c0e727fda3acad1e47c91a4ae67f32f5a609b525b0dbfe92b`. From 49e8b20faef72532fcee6a127d625e5da32e963b Mon Sep 17 00:00:00 2001 From: jakeberv Date: Fri, 16 Oct 2026 22:54:59 -0400 Subject: [PATCH 5/9] Limit RNG chunk-invariance test to two real workers --- tests/testthat/test-search-progress.R | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/tests/testthat/test-search-progress.R b/tests/testthat/test-search-progress.R index 9322b30..a1c18df 100644 --- a/tests/testthat/test-search-progress.R +++ b/tests/testthat/test-search-progress.R @@ -557,6 +557,21 @@ test_that("animated Future failures cancel remaining work and restore settings", }) test_that("animated Future RNG matches ordinary work and preserves parallel chunk invariance", { + # Compare two and three real Future chunks on at most two worker processes. + # Only cap the backend; retain production chunking and per-item RNG streams. + with_future_plan <- .bifrost_search_with_future_plan + testthat::local_mocked_bindings( + .bifrost_search_with_future_plan = function(workers, work, ...) { + with_future_plan( + workers = min(workers, 2L), + work = function() { + testthat::expect_lte(future::nbrOfWorkers(), 2L) + work() + }, + ... + ) + } + ) run_random_work <- function(workers) { set.seed(42) .bifrost_search_future_lapply( @@ -592,7 +607,10 @@ test_that("animated Future RNG matches ordinary work and preserves parallel chun set.seed(42) serial_reference <- as.list(stats::runif(6L)) testthat::expect_identical(run_random_work(1L), serial_reference) - testthat::expect_equal(run_random_work(2L), run_random_work(3L)) + two_chunks <- run_random_work(2L) + seed_after <- .Random.seed + testthat::expect_identical(run_random_work(3L), two_chunks) + testthat::expect_identical(.Random.seed, seed_after) testthat::expect_error( run_random_work(NA_integer_), "`workers` must be a single finite number", From 573e2a3f392eb79109e08205c480964275ac684a Mon Sep 17 00:00:00 2001 From: jakeberv Date: Fri, 16 Oct 2026 22:59:44 -0400 Subject: [PATCH 6/9] Record clean two-core package and manual check --- cran-comments.md | 7 +++-- tools/releases/0.2.2.md | 57 ++++++++++++++++++++--------------------- 2 files changed, 31 insertions(+), 33 deletions(-) diff --git a/cran-comments.md b/cran-comments.md index ef86571..9b3bea2 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -19,10 +19,9 @@ completed on macOS arm64 (R 4.4.2) on 2026-10-17 UTC with: **0 errors | 0 warnings | 1 note** The sole note was `unable to verify current time`, an environment-related -timestamp check. Installation, examples and tests passed. Testthat separately -reported one worker-limit warning: the RNG chunk-invariance test requests -three workers when only two cores are advertised. This test resource-use -issue must be resolved before submission; no assertions failed. +timestamp check. Installation, examples and tests passed, with 2,980 passing +test assertions and no test warnings or failures. The RNG chunk-invariance +test now exercises two and three chunks using at most two worker processes. [CI checks](https://github.com/jakeberv/bifrost/actions/runs/38823234675) also passed on macOS and Windows R release, and Ubuntu R release, devel and diff --git a/tools/releases/0.2.2.md b/tools/releases/0.2.2.md index 3d35d7e..aff1aa7 100644 --- a/tools/releases/0.2.2.md +++ b/tools/releases/0.2.2.md @@ -55,13 +55,12 @@ for details. GitHub publication does not update CRAN automatically. (`unable to verify current time`). See `cran-comments.md` for the environment, archive checksum, and resolution of the local V8 crash using a private build. - [x] Check-evidence PR #251 merged as `e1d2fe3`; its post-merge CI passed. -- [x] Rebuild with the PR #252 dictionary update and run the complete package - and manual check. See the latest evidence below, including its test warning. -- [ ] Resolve the test that explicitly requests three workers under a two-core - check budget, preserving the RNG invariance assertion. Rebuild and recheck - after that change before CRAN submission. +- [x] Rebuild with the PR #252 dictionary update and test worker-limit fix; + complete the package and manual check with zero test warnings or failures. +- [x] Preserve the two-versus-three-chunk RNG comparison using at most two real + workers; also verify identical final caller RNG state. - [ ] Merge PR #252 through normal review and confirm its CI. Select the exact - release commit and verified submission archive after the test issue is resolved. + release commit and use the verified submission archive recorded below. - [ ] Retain the documented deferral of #231; this preparation does not fix it. Keep the initialization/convergence follow-up (#242) and RRphylo dependency work (#247) separate from this release. @@ -75,34 +74,34 @@ for details. GitHub publication does not update CRAN automatically. - [ ] Apply the publication-time documentation edits below through a PR. Update CRAN availability separately, only after CRAN actually publishes it. -## Latest check: PR #252 dictionary update +## Latest check: PR #252 dictionary and test worker-limit updates -Source commit: `616c145a2f85086f8aecc00beb201de783ff9c5b`; checked on 2026-10-17 UTC. -Archive SHA-256: `10757602747ee58d4d934f85b66a3abd008fd3569020daf07b95d499f2a1d023`. +Source commit: `49e8b20faef72532fcee6a127d625e5da32e963b`; checked on 2026-10-17 UTC. +Archive SHA-256: `4ad44c0dde81d0ae924c4ef1b524c536ad12cdce7d9e44c142a0a29d0df0beea`. `R CMD check --as-cran --run-donttest` with both manuals returned **0 errors, -0 check warnings, 1 note** (`unable to verify current time`). Testthat recorded -2,969 passing assertions, zero failures, **one warning**, and 138 expected skips. -The 101-page PDF also passed `qpdf --check`. - -A diagnostic rerun identified the warning in `test-search-progress.R`: -“animated Future RNG matches ordinary work and preserves parallel chunk -invariance” explicitly compares two workers with three. With only two cores -advertised, `parallelly` warns about the three-worker request. This must be -resolved before CRAN submission; the passing check does not establish -compliance with CRAN's two-core check limit. No test or package code was changed -as part of recording these results. +0 warnings, 1 note** (`unable to verify current time`). Testthat recorded +**2,980 passing assertions, zero failures, zero warnings**, and 138 expected +skips. The 101-page PDF also passed `qpdf --check`. + +The RNG chunk-invariance test retains two and three real Future chunks, but +caps its backend at two worker processes. It asserts the worker limit and +identical results and final caller RNG state. Production fitting code and RNG +handling are unchanged; no test skips, warning suppression, or coverage +exclusions were added. The original targeted test failed on the worker warning; +the fixed test passed. A diagnostic mutation bypassing per-item seeding made +the fixed test fail as expected, confirming it still detects that RNG regression. Validation used a fresh isolated library with existing dependencies accessed -read-only, numerical libraries set to one thread, and two advertised cores. -The test explicitly launched three workers despite those advertised settings, -remaining within the user's eight-core ceiling. Existing dependency DESCRIPTION -hashes were unchanged. The archive differs from the prior checked archive only -in `inst/WORDLIST` and its generated packaging timestamp. - -Evidence: `output/release-0.2.2-pr252-check/run-jx3msm29/`, including the archive, -`SHA256SUMS`, `final-summary.txt`, `bifrost.Rcheck/00check.log`, the manual, -`test-warning-diagnostic.log`, and `test-results-diagnostic.rds`. +read-only, one numerical thread per worker, and two advertised cores. Existing +dependency DESCRIPTION hashes were unchanged. Relative to the previous PR #252 +archive, only the corrected test and generated packaging timestamp differ. + +Evidence: `output/release-0.2.2-pr252-check/run-hivedoav/`, including the archive, +`SHA256SUMS`, `final-summary.txt`, `bifrost.Rcheck/00check.log`, and the manual. +Targeted regression logs: `output/rng-worker-limit-regression/`. +The earlier warning and its diagnostic evidence remain preserved under +`output/release-0.2.2-pr252-check/run-jx3msm29/`; that archive is superseded. ## Earlier checked archive and local evidence From c74f5d8bb5fc073edc83f62f6121a65ec0a850ed Mon Sep 17 00:00:00 2001 From: jakeberv Date: Fri, 16 Oct 2026 23:26:02 -0400 Subject: [PATCH 7/9] Diagnose Windows worker cancellation detritus --- .github/workflows/R-CMD-check.yaml | 7 +++++++ tools/diagnose-windows-temp.R | 25 +++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 tools/diagnose-windows-temp.R diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 0fb4ef7..f27da02 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -66,6 +66,13 @@ jobs: combinat=?source needs: check + - name: Diagnose Windows worker cancellation temporary files + if: runner.os == 'Windows' + shell: Rscript {0} + run: | + dir.create("output/windows-temp-investigation", recursive = TRUE) + source("tools/diagnose-windows-temp.R") + # Generate NAMESPACE + Rd files from roxygen comments - name: Generate Rd + NAMESPACE via roxygen2 run: Rscript -e 'roxygen2::roxygenise(roclets = c("rd","namespace"))' diff --git a/tools/diagnose-windows-temp.R b/tools/diagnose-windows-temp.R new file mode 100644 index 0000000..81f7a9a --- /dev/null +++ b/tools/diagnose-windows-temp.R @@ -0,0 +1,25 @@ +# Run each cancellation mode in a separate R session/temp root on Windows. +root <- normalizePath("output/windows-temp-investigation", mustWork = TRUE) +for (mode in c("interrupt", "cooperative")) { + work <- file.path(root, mode) + dir.create(work, showWarnings = FALSE) + script <- file.path(root, paste0(mode, ".R")) + writeLines(c( + 'library(future)', + 'plan(multisession, workers = 2L)', + 'a <- future({Sys.sleep(0.05); stop("synthetic worker failure")})', + 'b <- future({Sys.sleep(1); Sys.getpid()})', + 'try(value(a), silent = TRUE)', + sprintf('cancel(b, interrupt = %s)', if (mode == "interrupt") "TRUE" else "FALSE"), + 'cat("Cancelled state:", b$state, "\\n")', + 'plan(sequential)' + ), script) + vars <- c("TMPDIR", "TMP", "TEMP") + old <- Sys.getenv(vars, unset = NA_character_) + do.call(Sys.setenv, as.list(setNames(rep(work, 3L), vars))) + status <- system2(file.path(R.home("bin"), "Rscript.exe"), c("--vanilla", shQuote(script))) + for (v in vars) if (is.na(old[[v]])) Sys.unsetenv(v) else do.call(Sys.setenv, setNames(list(old[[v]]), v)) + Sys.sleep(2) + cat("MODE:", mode, "status:", status, "remaining files:\n") + print(list.files(work, all.files = TRUE, recursive = TRUE)) +} From 87b6d31444424a90f823aebcbcbd291bbf80b5d6 Mon Sep 17 00:00:00 2001 From: jakeberv Date: Fri, 16 Oct 2026 23:36:02 -0400 Subject: [PATCH 8/9] Contain cancelled-worker temporary files in the failure test --- .github/workflows/R-CMD-check.yaml | 7 ------- tests/testthat/test-search-progress.R | 5 +++++ tools/diagnose-windows-temp.R | 25 ------------------------- 3 files changed, 5 insertions(+), 32 deletions(-) delete mode 100644 tools/diagnose-windows-temp.R diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index f27da02..0fb4ef7 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -66,13 +66,6 @@ jobs: combinat=?source needs: check - - name: Diagnose Windows worker cancellation temporary files - if: runner.os == 'Windows' - shell: Rscript {0} - run: | - dir.create("output/windows-temp-investigation", recursive = TRUE) - source("tools/diagnose-windows-temp.R") - # Generate NAMESPACE + Rd files from roxygen comments - name: Generate Rd + NAMESPACE via roxygen2 run: Rscript -e 'roxygen2::roxygenise(roclets = c("rd","namespace"))' diff --git a/tests/testthat/test-search-progress.R b/tests/testthat/test-search-progress.R index a1c18df..dd2c008 100644 --- a/tests/testthat/test-search-progress.R +++ b/tests/testthat/test-search-progress.R @@ -489,6 +489,11 @@ test_that("search progress stage preserves failure lifecycle and rethrows errors }) test_that("animated Future failures cancel remaining work and restore settings", { + # Killing a Windows Rscript worker bypasses its normal temporary-file cleanup. + # Keep this fault-injection test's worker files in a directory it owns. + worker_tmp <- withr::local_tempdir(pattern = "bifrost-cancel-") + withr::local_envvar(c(TMPDIR = worker_tmp, TMP = worker_tmp, TEMP = worker_tmp)) + thread_vars <- c( "OMP_NUM_THREADS", "OPENBLAS_NUM_THREADS", diff --git a/tools/diagnose-windows-temp.R b/tools/diagnose-windows-temp.R deleted file mode 100644 index 81f7a9a..0000000 --- a/tools/diagnose-windows-temp.R +++ /dev/null @@ -1,25 +0,0 @@ -# Run each cancellation mode in a separate R session/temp root on Windows. -root <- normalizePath("output/windows-temp-investigation", mustWork = TRUE) -for (mode in c("interrupt", "cooperative")) { - work <- file.path(root, mode) - dir.create(work, showWarnings = FALSE) - script <- file.path(root, paste0(mode, ".R")) - writeLines(c( - 'library(future)', - 'plan(multisession, workers = 2L)', - 'a <- future({Sys.sleep(0.05); stop("synthetic worker failure")})', - 'b <- future({Sys.sleep(1); Sys.getpid()})', - 'try(value(a), silent = TRUE)', - sprintf('cancel(b, interrupt = %s)', if (mode == "interrupt") "TRUE" else "FALSE"), - 'cat("Cancelled state:", b$state, "\\n")', - 'plan(sequential)' - ), script) - vars <- c("TMPDIR", "TMP", "TEMP") - old <- Sys.getenv(vars, unset = NA_character_) - do.call(Sys.setenv, as.list(setNames(rep(work, 3L), vars))) - status <- system2(file.path(R.home("bin"), "Rscript.exe"), c("--vanilla", shQuote(script))) - for (v in vars) if (is.na(old[[v]])) Sys.unsetenv(v) else do.call(Sys.setenv, setNames(list(old[[v]]), v)) - Sys.sleep(2) - cat("MODE:", mode, "status:", status, "remaining files:\n") - print(list.files(work, all.files = TRUE, recursive = TRUE)) -} From 310f14f8b99a8576ff2d079c251cf867355c1827 Mon Sep 17 00:00:00 2001 From: jakeberv Date: Fri, 16 Oct 2026 23:40:35 -0400 Subject: [PATCH 9/9] Record the rebuilt package check after Windows test cleanup --- cran-comments.md | 8 +++++--- tools/releases/0.2.2.md | 29 ++++++++++++++++++++++++++++- 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/cran-comments.md b/cran-comments.md index 9b3bea2..588da40 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -23,9 +23,11 @@ timestamp check. Installation, examples and tests passed, with 2,980 passing test assertions and no test warnings or failures. The RNG chunk-invariance test now exercises two and three chunks using at most two worker processes. -[CI checks](https://github.com/jakeberv/bifrost/actions/runs/38823234675) -also passed on macOS and Windows R release, and Ubuntu R release, devel and -oldrel-1 (`--as-cran --run-donttest --no-manual`). +[CI](https://github.com/jakeberv/bifrost/pull/252/checks) +also checks macOS and Windows R release, and Ubuntu R release, devel and +oldrel-1 (`--as-cran --run-donttest --no-manual`). A Windows temporary-file +note was traced to the worker-cancellation test; its worker files now use a +test-owned temporary directory with scoped cleanup. ## Additional notes diff --git a/tools/releases/0.2.2.md b/tools/releases/0.2.2.md index aff1aa7..316f175 100644 --- a/tools/releases/0.2.2.md +++ b/tools/releases/0.2.2.md @@ -74,7 +74,34 @@ for details. GitHub publication does not update CRAN automatically. - [ ] Apply the publication-time documentation edits below through a PR. Update CRAN availability separately, only after CRAN actually publishes it. -## Latest check: PR #252 dictionary and test worker-limit updates +## Latest check: PR #252 Windows cancellation-test cleanup + +Source commit: `87b6d31444424a90f823aebcbcbd291bbf80b5d6`; checked on 2026-10-17 UTC. +Archive SHA-256: `4a817a3ab4e3f6c98efc01342ebaf8fb0b47b61287a05294d943c596a78a00dc`. + +The Windows NOTE came from a test that deliberately cancels an active Future +worker. A Windows diagnostic reproduced leftover `Rscript…` files after forced +cancellation and none after cooperative shutdown. Windows R removes those +scripts during normal exit, which forced termination bypasses. The test now +launches its workers with temporary paths in a test-owned directory and cleans +that directory on exit. It still forcibly cancels a real worker and retains all +eight assertions. Production behavior and the RNG tests are unchanged. +Temporary CI diagnostic code was removed after gathering this evidence. + +`R CMD check --as-cran --run-donttest`, including both manuals, returned +**0 errors, 0 warnings, 1 note** (`unable to verify current time`). All **2,980 +assertions passed**, with zero test warnings/failures and 138 expected skips. +The PDF passed `qpdf --check`. The isolated library used existing dependencies +read-only, two advertised cores, and one numerical thread per worker; +dependency DESCRIPTION hashes remained unchanged. + +Evidence: `output/release-0.2.2-pr252-check/run-yr9i7roc/` and +`output/windows-temp-investigation/`. The Windows diagnostic is retained in +[its CI log](https://github.com/jakeberv/bifrost/actions/runs/38998764680/job/117297030452). +Check the latest [PR #252 CI](https://github.com/jakeberv/bifrost/pull/252/checks) +before merging; the older archives below are superseded. + +## Earlier check: PR #252 dictionary and test worker-limit updates Source commit: `49e8b20faef72532fcee6a127d625e5da32e963b`; checked on 2026-10-17 UTC. Archive SHA-256: `4ad44c0dde81d0ae924c4ef1b524c536ad12cdce7d9e44c142a0a29d0df0beea`.