fix: heal main — unleak warnPartialMatchArgs on R 4.2 and name args at norm_coords()/make_star() call sites for the lifecycle-errors leg - #2799
Merged
Conversation
The "head args go through base R partial matching" test enables `warnPartialMatchArgs` via `rlang::local_options()`. On R < 4.3, restoring the option to NULL (unset) at test exit does not switch the warning off again -- the internal flag keeps its last set value -- so the warning leaked into every later test in the file. On the rcc-full ubuntu-26.04 (4.2) leg this rewrote tests/testthat/_snaps/migration-fixture.md, prepending "partial argument match of 'di' to 'dimvector'" to the forbidden-prefix guard snapshot, and failed the update-snapshots step (snapshot PR #2796). Pin the option to FALSE before flipping it on, so the scoped restore lands on FALSE -- which does reset the flag -- on every R version. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016M32izVHZPfxAqemAe4BrX
…ors leg #2782 added an rcc-full leg (IGRAPH_LIFECYCLE_ERRORS=true) that fails any test in which an unasserted lifecycle deprecation fires. The ellipsis refactors that merged after #2782 was cut left two call sites behind: `plot.igraph()` called `norm_coords(layout, -1, 1, -1, 1)` positionally, and tests called `make_star(5, "undirected")` with positional `mode`. Together they account for all 36 deprecation warnings in the default test run, and each would fail its test on the new leg -- which has never executed yet because the smoke gate broke first. Name the arguments at both sites. With this, the full suite passes with IGRAPH_LIFECYCLE_ERRORS=true: FAIL 0 (plus the sandbox-only test-foreign.R network error), WARN 0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016M32izVHZPfxAqemAe4BrX
On the rcc-full ubuntu-26.04 (4.2) leg, this snapshot records an extra
Warning in `migration_fixture_prefix()`:
partial argument match of 'di' to 'dimvector'
ahead of the guard error,
which rewrites tests/testthat/_snaps/migration-fixture.md
and keeps force-pushing snapshot PR #2796.
Per maintainer decision, skip the test on R 4.2,
mirroring the existing version-gated skips
(e.g. test-adjacency.R, test-community.R).
The `warnPartialMatchArgs` pin in the previous commit
already removes the R 4.2 leak that produced the extra warning;
the skip makes the intent explicit
and keeps the snapshot single-variant on older R either way.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016M32izVHZPfxAqemAe4BrX
krlmlr
enabled auto-merge (squash)
July 27, 2026 19:30
Contributor
|
This is how benchmark results would change (along with a 95% confidence interval in relative change) if 6fcaca3 is merged into main:
|
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.
Prepared with Claude Code (Claude Fable 5).
mainhas been red since 17:36 UTC today,after #2787 (guard-emitting migrations generator)
and the ellipsis-refactor train merged close together.
The diagnosis found four independent breakages;
the first was fixed by #2798 while this PR was in preparation
(it carries the identical regeneration this branch originally produced,
so that commit dropped out on rebase),
and this PR delivers the remaining three.
1. (landed via #2798)
rcc-smokemigrations drift checkFor the record, every
mainpush from 17:36 to 19:04 UTC failed"Smoke test: stock R" at
Run ./.github/workflows/custom/after-install:because the refactor PRs had regenerated their ARG_HANDLE blocks
on branches cut before #2787's generator learned to emit
migrate_check_call_tags()guards.#2798 committed the regenerated blocks;
on this branch
Rscript tools/generate-migrations.Ris a verified no-op on
R/.2.
rcc: ubuntu-26.04 (4.2)rewrites the migration-fixture snapshotThe runs whose smoke test still passed
(e.g. #2787's own merge run, 30289034966)
failed only in the R 4.2 leg,
at
Run ./.github/workflows/update-snapshots,which keeps force-pushing snapshot PR #2796 and then fails via
false.The recorded difference, in
tests/testthat/test-migration-fixture.R>test_that("forbidden prefixes error only when legacy arguments engage recovery"):Code migration_fixture_prefix(c(2, 2), 0.5, di = 2) Condition + Warning in `migration_fixture_prefix()`: + partial argument match of 'di' to 'dimvector' Error in `migration_fixture_prefix()`: ! Argument `di` matches multiple formal arguments of `migration_fixture_prefix()`.Root cause: an earlier test in the same file enables
warnPartialMatchArgsviarlang::local_options().On R < 4.3, restoring that option to
NULL(unset)does not switch the warning off again —
the internal flag keeps its last set value (fixed in R 4.3) —
so it leaks into every later test in the file, on R 4.2 only.
Verified on stock R 4.2.3 (via
rig):set
TRUE→ restore toNULLstill warns, while R 4.5.3 does not.Beyond the snapshot, the leak would also fail the
expect_no_condition()test two blocks later on R 4.2,so a skip alone would not heal the leg.
Fix (two layers):
options(warnPartialMatchArgs = FALSE)before flipping it on,so the scoped restore lands on
FALSE,which resets the flag on every R version;
on R 4.2 (
skip_if(getRversion() < "4.3")),mirroring the existing version-gated skips in
test-adjacency.Randtest-community.R.(A sweep of every failed rcc run across all branches since 2026-07-18
confirmed this is the only snapshot that ever diverges on the 4.2 leg;
the local suite runs R 4.5.3, so the skip is exercised only in CI.)
3. The never-yet-run "with lifecycle errors" leg would fail next
#2782 added a matrix leg (ubuntu-26.04, R release,
IGRAPH_LIFECYCLE_ERRORS=true) that fails any testin which an unasserted lifecycle deprecation fires.
It has not executed yet — the smoke gate broke first —
but once smoke passes it will,
and the refactors that merged after #2782 was cut
left exactly two unasserted call sites
(all 36 deprecation warnings of the default suite reduce to them):
plot.igraph()itself callednorm_coords(layout, -1, 1, -1, 1)positionally (R/plot.R) —32 warnings across the plotting tests;
make_star(5, "undirected")with positionalmodein
test-stochastic_matrix.Randtest-centralization.R— 5 warnings.Fix: name the arguments at both sites
(
norm_coords(layout, xmin = -1, xmax = 1, ymin = -1, ymax = 1),make_star(5, mode = "undirected")).The matrix plumbing itself is sound:
a faithful offline simulation of
.github/workflows/versions-matrix/action.Ras of #2798(stubbing only the svn fetch)
sources
.github/versions-matrix.Rcleanlyand appends the leg
{"os":"ubuntu-26.04","r":"4.6","env":"IGRAPH_LIFECYCLE_ERRORS=true","desc":"with lifecycle errors"}to matrix JSON that
jsonliteparses.Validation (all on this branch, R 4.5.3)
Rscript tools/generate-migrations.Ris a no-op onR/(three consecutive runs;
git status --porcelain R/stays empty),air format R/ tools/ tests/is a no-op,devtools::document()leavesman/andNAMESPACEuntouched,(
filter = "migration|generate-migrations|constant-defaults"):FAIL 0 | WARN 0 | SKIP 0 | PASS 83,
call-site fixes,
IGRAPH_LIFECYCLE_ERRORS=trueafter them:FAIL 1 | WARN 0 | SKIP 8 | PASS 9181 —
the single failure is the sandbox-only
test-foreign.Rgraph_from_graphdb()download(no network in the sandbox; CI can reach it).
Generated by Claude Code