Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 16, 2025

Analyzed three packages with newly broken checks to determine root causes and assess whether issues stem from igraph bugs or downstream package issues.

Analysis

Created revdep/problems-analysis.md with detailed findings:

1. Cascade - Namespace Collision (Minor)

New circulant() export conflicts with magic::circulant. Non-breaking warning only.

Root cause: make_circulant() added in v2.2.1.9003 exports constructor alias that collides with magic package.

2. jewel - Integer Validation (High Impact)

Package breaks on non-integer niter values:

# Fails with "not representable as an integer"
rewire(g, keeping_degseq(niter = 2.45))

Root cause: rewire_impl() uses as.numeric() but C code now strictly validates integers. Previously silently truncated.

Recommendation: Add as.integer(round(niter)) in rewire_keeping_degseq() for backward compatibility.

3. rSpectral - Modularity Changes (Medium Impact)

Tests fail due to different modularity values.

Root cause: modularity_impl() auto-detects weight attribute when weights = NULL:

if (is.null(weights) && "weight" %in% edge_attr_names(graph)) {
  weights <- E(graph)$weight
}

Workaround discovered: Passing weights = numeric() effectively disables auto-detection:

modularity(g, membership, weights = numeric())  # Forces unweighted calculation

This works because numeric() is not NULL (skips auto-detection), but !all(is.na(numeric())) is FALSE, causing the code to set weights <- NULL internally.

Deliverables

  • revdep/problems-analysis.md: Root cause analysis, assessment, and recommendations for each issue
  • revdep/examples/*.R: Runnable minimal reproducible examples demonstrating each problem, including the weights = numeric() workaround
  • revdep/notify-maintainers.sh: Automation script to notify package maintainers via GitHub issues or email drafts
  • revdep/NOTIFY-README.md: Documentation for using the notification script

Maintainer Notification Script

Created notify-maintainers.sh to automate notifying package maintainers:

  • Intelligent routing: Determines upfront whether package is on GitHub, then creates either a GitHub issue or an email draft (not both)
  • GitHub Integration: Uses gh CLI to create GitHub issues directly for packages hosted on GitHub (Cascade, jewel, rSpectral)
  • Email Fallback: Generates email draft templates only for packages not accessible via GitHub
  • Efficient output:
    • For GitHub packages: Issues created directly, no local files saved
    • For non-GitHub packages: Only email draft files created in notifications/ directory
  • Template-based: Creates well-formatted issue/email content with:
    • Problem summary and error messages
    • Root cause analysis
    • Minimal reproducible examples
    • Suggested fixes with code examples
    • Severity ratings
    • References to igraph repository

Usage: ./notify-maintainers.sh

The script checks repository accessibility first and creates only the appropriate output type per package, eliminating redundant files.

See NOTIFY-README.md for detailed instructions on using the script, authentication setup, and troubleshooting.


Original prompt

This section details on the original issue you should resolve

<issue_title>Verify revdep problems</issue_title>
<issue_description>The file revdep/problems.md contains packages that now fail their checks, compared to the most recent CRAN version. Create minimal reproducible examples for the underlying problems and assess whether we uncovered a bug in a downstream package or if we inadvertently changed behavior.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits November 16, 2025 15:57
Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com>
Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com>
Copilot AI changed the title [WIP] Create minimal reproducible examples for revdep issues docs(revdep): Analyze and document reverse dependency problems Nov 16, 2025
Copilot AI requested a review from krlmlr November 16, 2025 16:02
Copilot finished work on behalf of krlmlr November 16, 2025 16:02
@krlmlr
Copy link
Contributor

krlmlr commented Nov 16, 2025

@copilot: Check if passing weights = numeric() would work for rSpectral. Update code and assessment as needed.

Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 16, 2025

@copilot: Check if passing weights = numeric() would work for rSpectral. Update code and assessment as needed.

Yes! weights = numeric() works perfectly as a workaround.

The mechanism: numeric() is not NULL (skips auto-detection), but !all(is.na(numeric())) evaluates to FALSE, causing the code to set weights <- NULL internally.

Updated analysis and examples to document this workaround. Commit: 3351e96

Copilot finished work on behalf of krlmlr November 16, 2025 16:19
@krlmlr
Copy link
Contributor

krlmlr commented Nov 16, 2025

@copilot: Create a script that uses gh and creates issues or PRs in the corresponding repositories. If not on GitHub, create a script that creates a GMail draft.

Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 16, 2025

@copilot: Create a script that uses gh and creates issues or PRs in the corresponding repositories. If not on GitHub, create a script that creates a GMail draft.

Created notify-maintainers.sh script that:

  1. Uses gh CLI to create GitHub issues for all three packages (Cascade, jewel, rSpectral)
  2. Falls back to generating email drafts when GitHub is not accessible
  3. Creates well-formatted issue templates with root cause, examples, and fixes

Usage: ./notify-maintainers.sh

Outputs to notifications/ directory:

  • {Package}-issue.md - GitHub issue template
  • {Package}-email.txt - Email draft

See NOTIFY-README.md for detailed instructions. Commit: 7ad2400

Copilot finished work on behalf of krlmlr November 16, 2025 20:35
@krlmlr
Copy link
Contributor

krlmlr commented Nov 16, 2025

@copilot: Determine now if the package is on GitHub or not, the script should either create an issue or draft an e-mail, not both.

Co-authored-by: krlmlr <1741643+krlmlr@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 16, 2025

@copilot: Determine now if the package is on GitHub or not, the script should either create an issue or draft an e-mail, not both.

Updated script to determine upfront if package is on GitHub:

  • Checks repository accessibility first
  • Creates either GitHub issue (via gh) or email draft, not both
  • For GitHub repos: Issue created directly, no local files
  • For non-GitHub repos: Only email draft file created

Previously created 6 files (3 issue templates + 3 emails), now creates only what's needed. Commit: 1ad205a

Copilot finished work on behalf of krlmlr November 16, 2025 20:55
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.

Verify revdep problems

2 participants