Skip to content

Fail kumo-pytorch T2a and T2b checks when an import is missing - #361

Closed
anle2024 wants to merge 1 commit into
mainfrom
anle/kumo-pytorch-e2e-require-imports
Closed

anle2024 wants to merge 1 commit into
mainfrom
anle/kumo-pytorch-e2e-require-imports

Conversation

@anle2024

@anle2024 anle2024 commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Pass --require-imports to pytest in the lifecycle check of T2a (kumo-pytorch-t2a.yml) and T2b (kumo-pytorch-t2b.yml).
  • tests/e2e/test_lifecycle.py starts with pytest.importorskip("diskgraph") and pytest.importorskip("torch_geometric"). If either import fails, pytest skips the whole file. Without the flag, pytest then exits with code 5 (no tests collected), so the check fails but does not say why. With the flag, pytest exits with code 1 and names the missing module. The flag also covers a later change: if only some tests skip, the other tests still pass, and without the flag the check stays green. kumo-pytorch-diskgraph.yml already passes the flag.

Change map

File-by-file change map

Testing Done

  • The latest checks on main ran every lifecycle test with no skips: T2b run 43837628481 and T2a run 43565305671, each 22 passed, 22 deselected. The flag fails only skips caused by a missing import, so these runs also pass with it.
  • Both workflow files are in their own pull-request path filters, so this PR runs T2a and T2b.
  • Local check in an environment without torch_geometric (Linux aarch64, Python 3.12, pytest 9.0.3): without the flag, the T2a lifecycle command reported 1 skipped and exited with code 5. With --require-imports, it printed tests were skipped because an optional dependency is missing and exited with code 1.

Checklist

  • I listed all the breaking changes introduced by the PR: none.
  • I made sure to update examples and documentation with my changes (if necessary)
  • I added and modified the unit tests required to cover the changes in this PR.

🤖 Generated with Claude Code

test_lifecycle.py calls pytest.importorskip for diskgraph and
torch_geometric. If either import fails, pytest skips the whole file and
the check still passes. --require-imports turns those skips into
failures, as kumo-pytorch-diskgraph already does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@anle2024

Copy link
Copy Markdown
Collaborator Author

Change map

File Function / scope What changed Why
.github/workflows/kumo-pytorch-t2a.yml checks job, "Check the runs" step pytest gets --require-imports A failed diskgraph or torch_geometric import now fails T2a instead of skipping test_lifecycle.py
.github/workflows/kumo-pytorch-t2b.yml checks job, "Check the runs" step pytest gets --require-imports The same for the nightly T2b check
  • Requirement: required kumo-pytorch tests must not disappear through skips.
  • Existing behavior: both commands run without the flag, so an import failure skips the file and the check passes.
  • Smallest change: add the flag to the two commands.
  • Verification: the latest T2a and T2b checks on main ran 22 tests with no skips. This PR runs both workflows.
  • Stopping condition: T2a and T2b pass on this PR.

@copy-pr-bot

copy-pr-bot Bot commented Nov 16, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@anle2024
anle2024 temporarily deployed to gha-kumo-workflow-tests November 16, 2026 21:13 — with GitHub Actions Inactive
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The T2A and T2B workflow pytest commands now include --require-imports. Their existing test selections and other arguments remain unchanged.

Merge Risk: Minimal · up to 75adf

This change makes the T2A and T2B lifecycle checks fail when a required import is missing instead of silently skipping tests. The flag is already supported by the test configuration, and the author reports the recent runs had no skips. No merge-blocking risk was found.

Architecture risk: Low · up to 75adf

The changed surface does not map to a changed system, dependency edge, entrypoint, or external dependency.

Changed systems: None identified.

Architecture concerns
No architecture-level concerns identified.

Review details

Before / after behavior

  • observed — Modified behavior in .github/workflows/kumo-pytorch-t2a.yml: The lifecycle test command now includes --require-imports before --t2a.
  • observed — Modified behavior in .github/workflows/kumo-pytorch-t2b.yml: The pytest command adds --require-imports; the existing test selection and other arguments remain unchanged.
Pre-merge checks: Passed 2 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Change Map Design Review Warning The design is sound, but the Change map comment (ID 6929527878, by anle2024, the PR author) has substantive gaps in its rationale and verification. Verified design evidence - The diff adds `--requ… Revise the Change map comment (ID 6929527878) as follows: 1. Replace "Requirement: required kumo-pytorch tests must not disappear through skips" with the actual requirement and its source. Cite the kumo-pytorch-diskgraph.yml header ("the …
Passed Passed checks: 2 passed

Check name Status Explanation
Pr Size Passed The PR changes 2 files, below the threshold of 40. The changed-file inventory from git diff --name-status refs/coderabbit/pre-merge-check/base refs/coderabbit/pre-merge-check/head lists two modified…
Public Resource Access Passed The check applies only to external resource references (URLs, repository locations, package source locations) that this PR adds or modifies. The PR changes two files, `.github/workflows/kumo-pytorch-t…
Full details: Pr Size

Explanation

The PR changes 2 files, below the threshold of 40. The changed-file inventory from git diff --name-status refs/coderabbit/pre-merge-check/base refs/coderabbit/pre-merge-check/head lists two modified files: .github/workflows/kumo-pytorch-t2a.yml and .github/workflows/kumo-pytorch-t2b.yml. Both are status M, with no additions, deletions, or renames. The --name-only count is also 2. The check fails only above 40 files, so it passes. Line counts were ignored, as the check requires.

Full details: Public Resource Access

Explanation

The check applies only to external resource references (URLs, repository locations, package source locations) that this PR adds or modifies. The PR changes two files, .github/workflows/kumo-pytorch-t2a.yml and .github/workflows/kumo-pytorch-t2b.yml. Each has one changed line in the checks job, and each change adds only the --require-imports pytest flag before the existing --t2a or --t2b argument. The rest of each command is unchanged context. A scan of all added lines for http(s)://, git+, git@, github.com, pypi, registry, docker, ghcr, and uses: found no matches. The PR therefore adds or changes no external resource reference, and the check passes under its "no external resource reference" rule.

Full details: Change Map Design Review

Explanation

The design is sound, but the Change map comment (ID 6929527878, by anle2024, the PR author) has substantive gaps in its rationale and verification. Verified design evidence - The diff adds --require-imports to the pytest command in the run: block of kumo-pytorch-t2a.yml and kumo-pytorch-t2b.yml. No other lines change. - packages/experimental/kumo-pytorch/tests/e2e/test_lifecycle.py lines 37–38 call pytest.importorskip("diskgraph") and pytest.importorskip("torch_geometric"). These are the only skip sites in tests/e2e. - tests/conftest.py lines 65–80 (pytest_sessionfinish) set TESTS_FAILED when a skip report contains "could not import". The flag therefore fails the run only for import-caused skips. - kumo-pytorch-diskgraph.yml already passes --require-imports in three places. The flag sits at the correct layer. It reuses the existing conftest option and the existing diskgraph pattern. The map's "Smallest change" and its file coverage are acceptable. Defects in the map 1. Requirement is unsourced and misleading. The map states "Requirement: required kumo-pytorch tests must not disappear through skips." It cites no source. The T2a and T2b workflow headers say "Not a required check." The map omits the actual precedent: the kumo-pytorch-diskgraph.yml header says the suite runs "with no test skipped for a missing import." The map should cite that statement and drop the unsupported word "required." 2. No observed failure or explicit release requirement is named. The map does not say whether the change is preventive or responds to an event. The PR description and the runs cited show no current skips. The map should state that the change is preventive. 3. Verification does not test the failure path. The map's verification shows only that the main runs passed with no skips. The negative case (missing module, flag on, exit 1 with the "optional dependency is missing" message) appears only in the PR description. The map's stopping condition ("T2a and T2b pass") cannot show that the flag changes the outcome. The map should record the negative run. 4. Scope of the flag is not stated. The map says a failed import "now fails T2a." It does not say that the flag fails only skips whose message contains "could not import." Other skip types still pass silently. This is material to the claim. Not proven defects (optional refinements, kept separate) - Replacing importorskip with a hard import in the --t2a/--t2b-gated file is a possible alternative. The map does not discuss it. It is not required. - The run logs cited (runs 43837628481 and 43565305671) were not checked in this review. The change itself is not shown to be wrong. The failing items are in the map text: the unsourced requirement, the wording that contradicts the workflow headers, the missing negative verification, and the undescribed flag scope.

Resolution

Revise the Change map comment (ID 6929527878) as follows: 1. Replace "Requirement: required kumo-pytorch tests must not disappear through skips" with the actual requirement and its source. Cite the kumo-pytorch-diskgraph.yml header ("the whole suite with no test skipped for a missing import") as the precedent. Do not use "required" for these tests, because the T2a and T2b headers say "Not a required check." 2. State that the change is preventive. Name any observed failure or explicit release requirement that motivates it. If none exists, say so. 3. Add the negative verification to the Verification line: the result with diskgraph or torch_geometric absent, showing exit 1 and the "optional dependency is missing" message. Keep the passing-run evidence as well. 4. Describe the scope: --require-imports fails only skips whose message contains "could not import". Other skip types are not affected. 5. Keep any alternative, such as a hard import in place of importorskip, in a separate, optional refinement section.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between eb47455 and 75adf93.

Files selected for processing: 2

  • .github/workflows/kumo-pytorch-t2a.yml
  • .github/workflows/kumo-pytorch-t2b.yml

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 9 remain after this review.

@anle2024
anle2024 marked this pull request as ready for review November 16, 2026 21:57
nittin-murthi added a commit that referenced this pull request Nov 17, 2026
# Conflicts:
#	.github/workflows/kumo-pytorch-t2b.yml

This branch was previously deployed

1 inactive deployment
gha-kumo-workflow-tests — 75adf930 Deployed Nov 16, 2026 by anle2024 via import #2436
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