Skip to content

Merge main into development; test the declared R 4.2 floor - #369

Merged
eliotmcintire merged 89 commits into
developmentfrom
ci/merge-main-to-development
Sep 3, 2026
Merged

Merge main into development; test the declared R 4.2 floor#369
eliotmcintire merged 89 commits into
developmentfrom
ci/merge-main-to-development

Conversation

@achubaty

Copy link
Copy Markdown
Contributor

development never received the reusable-workflow migration — it landed on main only, so the branch every PR targets still ran the old self-managed workflows, including install-spatial-deps@v0.1.

1. Merge maindevelopment

One conflict, in .github/workflows/R-CMD-check.yaml: development's copy still triggered on master, a branch this repo no longer has. Resolved in favour of main's thin caller.

The merge also removes the last stale spatial pins from developmentmain's versions of pkgdown.yaml, test-coverage.yaml and update-citation-cff.yaml had already dropped install-spatial-deps. After this merge there are none left on the branch:

$ grep -rn "install-spatial-deps@" .github/workflows/
  (none)

That matters, because every published tag — v0.1 through v0.5 — still runs add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable, which installs libgdal37 while Posit's noble binaries link libgdal34. Only @main dropped it.

2. Test the R 4.2 floor

DESCRIPTION declares R (>= 4.2). The base matrix stops at oldrel-1 — currently R 4.5 — leaving three unrestricted minor versions untested.

oldrel-N cannot close that gap, because the ladder is platform-dependent and not monotone. Resolved against the exact platform string setup-r sends:

ubuntu-latest (noble)      ubuntu-22.04
oldrel-1 -> 4.5.3          oldrel-1 -> 4.5.3
oldrel-2 -> 4.4.3          oldrel-2 -> 4.3.3   skips 4.4
oldrel-3 -> 4.3.3          oldrel-3 -> 4.2.3
oldrel-4 -> 4.1.3   !!     oldrel-4 -> 3.6.3   !!
oldrel-5 -> 4.1.3   dup    oldrel-5 -> 4.1.3

On ubuntu-latest, R 4.2 is unreachable by any oldrel index. Exact versions resolve identically on Linux, macOS and Windows (4.2 → 4.2.3), and Posit ships noble .debs down to 4.0.5.

Adds ubuntu legs at 4.4, 4.3 and 4.2.

If a leg fails

That is the finding, not a reason to drop the leg — it would mean the declared floor was never true. Either fix the package or raise Depends:.

Note

SpaDES has no direct spatial dependency of its own, so once system-deps is exposed as a workflow input it should set system-deps: false and stop paying for a GDAL install it never uses.

🤖 Generated with Claude Code

achubaty and others added 26 commits August 19, 2022 10:09
The badge list mixed `master` and `development` across twelve packages.
Ten now point at `main`. SpaDES.addins and SpaDES.experiment point at
`master` instead: neither repo has a `main` branch, so a main-pointing
badge there would render "unknown" forever.

Four of the ten (SpaDES, quickPlot, NetLogoR, and SpaDES.shiny) will read
"unknown" until their coverage workflows are fixed -- .github/workflows/
test-coverage.yaml in those repos still triggers only on master and
development, so codecov has never received an upload for main. Verified
against the live badge endpoints; the six with a main-triggered workflow
(reproducible 80%, Require 45%, SpaDES.core 80%, SpaDES.tools 82%,
SpaDES.project 40%, LandR 6%) render correctly already.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JZWdhVg8NimEUKT5g8mYt9
PredictiveEcology/actions/install-spatial-deps@v0.1 apt-installs
libsqlite0-dev, which does not exist on Ubuntu noble (24.04) -- the name
was retired years ago in favour of libsqlite3-dev. Every run on the
current runner image died there with exit 100, ~29s in, before any R
step. That is what has been keeping the pkgdown site from rebuilding.

The step is redundant regardless: r-lib/actions/setup-r-dependencies@v2
resolves and installs system requirements through pak, so the geospatial
libraries terra and sf need get installed anyway.

Removed from all four workflows (pkgdown, R-CMD-check, test-coverage,
update-citation-cff), not just pkgdown, since all four carried the same
broken step.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JZWdhVg8NimEUKT5g8mYt9
Replaces three bespoke workflows (146 lines) with 24 lines of caller,
matching how reproducible and the other current PE repos are wired:
`uses: PredictiveEcology/actions/.github/workflows/<name>.yaml@main`
with `secrets: inherit`.

What this fixes, beyond consistency:

  * The 9-job R-CMD-check matrix included four ubuntu-20.04 legs. That
    runner image is retired, so those jobs could not be scheduled at all.
    The shared workflow's default matrix runs on current images.
  * pkgdown installed ropensci/NLMR and s-u/fastshp on every build. Neither
    is referenced anywhere in R/, vignettes/, DESCRIPTION or man/ -- they
    were the slowest step and the largest failure surface. Dropped; the
    shared workflow's `post-install` input is there if they are ever needed.
  * The shared pkgdown/R-CMD-check workflows install the geospatial system
    libraries from stock Noble apt rather than the ubuntugis-unstable PPA,
    which ships a libgdal37 that is ABI-incompatible with Posit's noble
    binary cache.
  * Triggers now include `main`, so a push to the default branch actually
    rebuilds the site and uploads coverage. Coverage had only ever been
    uploaded for master/development, which is why the README badge read
    "unknown" on main.

Pinned at @main rather than a version tag, matching reproducible's callers.
The actions README recommends a tag for stability; the tradeoff is that a
stale pin is exactly what broke this repo -- it sat on
install-spatial-deps@v0.1, whose libsqlite0-dev has not existed since
Ubuntu noble, while the action itself was fixed years ago and released
through v0.5.

update-citation-cff.yaml keeps its own steps; there is no shared
equivalent.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JZWdhVg8NimEUKT5g8mYt9
Without a `codecov: branch:` setting, Codecov falls back to `master`. This
repo's default branch is `main` and `master` does not exist, so the repo
total was computed from nothing and read far below the real figure.

SpaDES.tools already carried this fix; propagating it to the rest of the
packages whose default branch is main. Applied to both main and development
so the branches do not drift.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
SpaDES.project is set up; remove "(currently being set up)" from the
package list.

The README's three images -- the logo and the two demo figures -- were
served from `.../SpaDES/raw/master/man/figures/`. **This repo has no
`master` branch**, so all three 404'd on the README and on the site
homepage. Repointed at `main` (the files were always present in
`man/figures/`) and collapsed the `figures//` double slash. Verified all
three now return 200.

The vignette's bug-report list omitted SpaDES.experiment and
SpaDES.project; added both.

Note the SpaDES-modules links legitimately keep `master` -- that repo
still has one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JZWdhVg8NimEUKT5g8mYt9
The reference page rendered two literal, unlinked strings:

    See [SpaDES.core]{SpaDES.core-package}, and the vignettes therein
    See [SpaDES.tools]{SpaDES.tools-package}.

The source wrote `\code{[pkg]{topic}}` -- Rd cross-reference syntax with
the `\link` dropped -- so `\code{}` printed the markup verbatim instead of
producing a hyperlink. These are the dead links on
<https://spades.predictiveecology.org/reference/SpaDES-package.html>.

This package has roxygen markdown enabled, so the fix is
`[SpaDES.core::SpaDES.core-package]`, which generates a real
`\link[SpaDES.core:SpaDES.core-package]{...}`. Both target aliases were
confirmed to exist in the installed packages, so the links resolve rather
than 404.

Collateral from regenerating with roxygen2 8.1.0 (the package was at
7.3.1):

  * DESCRIPTION: `RoxygenNote:` -> `Config/roxygen2/version:`, roxygen2 8's
    field name. Matches what Require already carries.
  * man/pkgEnv.Rd: drops `\docType{data}` and the auto-generated `\format`
    block for `.pkgEnv`, which roxygen2 8 no longer emits for a plain
    environment.
  * man/SpaDES-package.Rd: restores Alex Chubaty to the Authors list. The
    committed Rd had gone stale against DESCRIPTION's Authors@R.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JZWdhVg8NimEUKT5g8mYt9
This workflow kept its own steps when the other three became thin callers,
and it still installed ropensci/NLMR and s-u/fastshp from source. Neither
is referenced anywhere in the package, and building a CITATION.cff needs
neither. The step failed and took the job with it.

It only surfaced now because the workflow triggers on changes to
DESCRIPTION or inst/CITATION, and the roxygen 8.1.0 regeneration in
957268c was the first DESCRIPTION change in a long while. Latent, not new.

Also drops the `fastshp=?ignore` / `NLMR=?ignore` placeholders that existed
only to keep setup-r-dependencies from resolving them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JZWdhVg8NimEUKT5g8mYt9
Brings the reusable-workflow migration to the branch where work actually
happens. R-CMD-check.yaml conflicted -- development still triggered on
`master`, a branch this repo no longer has -- and was resolved in favour of
main's thin caller.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The base matrix stops at oldrel-1, which is R 4.5 -- three unrestricted minor
versions above this package's declared floor. oldrel-N cannot close the gap:
on ubuntu-latest R 4.2 is not reachable by any oldrel index (oldrel-3 gives
4.3.3, oldrel-4 skips straight to 4.1.3). Exact versions resolve identically
on Linux, macOS and Windows, and Posit ships noble .debs down to 4.0.5.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Three defects, two of them introduced by this branch.

Remotes: was deleted by the merge. main strips it for CRAN submission;
development needs it, because it is what makes this branch resolve
quickPlot/reproducible/SpaDES.core/SpaDES.tools from their @development
branches. Without it the integration branch integrates against CRAN -- or
against r-universe, which builds from each repo's default branch, not
development. Restored.

The R 4.2 matrix leg could never have passed. Every package in Imports --
quickPlot, reproducible, SpaDES.core, SpaDES.tools -- declares
Depends: R (>= 4.3), so pak aborts resolution before R CMD check produces any
output. That makes Depends: R (>= 4.2) provably false: SpaDES has not been
installable on 4.2 for some time. Raise the floor to 4.3 and drop the leg,
following the precedent set for R 4.1 in v2.0.10.

.Rbuildignore gained a duplicate ^CRAN-SUBMISSION$ from the merge.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@achubaty

Copy link
Copy Markdown
Contributor Author

Correction: the oldrel-N table in the description is wrong

I need to correct the evidence I gave. The mapping table above does not reproduce. Re-tested across ~4,500 requests — sequential, concurrent, cold-key — every platform currently returns the clean sequence:

linux-ubuntu-24.04:  oldrel/1..7 -> 4.5.3, 4.4.3, 4.3.3, 4.2.3, 4.1.3, 4.0.5, 3.6.3
linux-ubuntu-22.04:  identical
mac / win:           identical

So oldrel-4 does resolve to 4.2.3 on noble today, and my claim that "R 4.2 is unreachable by any oldrel index" was not the steady state. Sorry — I reported a snapshot as if it were the behaviour.

What is actually wrong, and why this PR still stands

The readings I saw were real, but they were stale cache responses, and the underlying bug is worse than a bad mapping.

The resolver behind setup-r is r-hub/rversions.app. In lib/cache.js, MAX_AGE is 3600s, the key + "/old" entry never expires, and stale() returns that never-expiring value while refreshing in the background — so the corrected value only appears on the next request. In lib/endpoints.js the hourly refresh list covers r-oldrel/1..10 but contains zero resolve entries.

Consequence: any /resolve/oldrel/N/<os> tuple not requested within the last hour serves an arbitrarily old answer on its first request, then self-heals. That is why the plain /r-oldrel/N endpoint is always clean while /resolve/... drifts, why rarely-used platform tuples drift most, and why my readings vanished on retry. It was caught live three times during verification, including a self-inconsistent response labelled oldrel/4 while returning 4.1.3.

The failure is silent. A stale answer carries a valid installer URL, so CI installs a different R than the one requested and the job passes. A version-sensitive failure then cannot be reproduced.

Why exact pins are still the right fix

Not because the ladder is misnumbered — it usually isn't — but because an exact pin on a closed R branch is time-invariant. 4.3 resolves to 4.3.3 whether the cache entry is fresh or six months old, so staleness cannot silently substitute a different R. (Worth knowing: pinning a current branch such as 4.6 is not immune, since that branch still moves. Only closed branches, or full versions like 4.3.3, are fully safe.)

The second motive is unchanged and independent of any of this: the base matrix stops at oldrel-1 — currently R 4.5 — which is above this package's declared floor, so the floor was never tested regardless of how the ladder resolves.

One trade-off this creates

Exact pins do not track upward the way oldrel-N does. When R 4.7 ships, the default legs move to 4.7/4.6 while these stay put, and a gap opens with nothing to announce it. That is a deliberate trade — silence about a gap is preferable to silently testing the wrong R — but it does make these legs an annual review item.

An upstream bug report for the cache staleness has been drafted and not yet filed.

@eliotmcintire
eliotmcintire merged commit cf3f35e into development Sep 3, 2026
14 checks passed
@eliotmcintire
eliotmcintire deleted the ci/merge-main-to-development branch September 3, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants