Skip to content

Fix bug in test rematerialization [] - #345

Closed
wchilders-nvidia wants to merge 1 commit into
mainfrom
remat-bugfix
Closed

wchilders-nvidia wants to merge 1 commit into
mainfrom
remat-bugfix

Conversation

@wchilders-nvidia

@wchilders-nvidia wchilders-nvidia commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

This fixes a small bug that broke edg-rematerialize-test-run in rare cases (and thus prevent AcknowlEDG from publishing) on #343.

For posterity the issue occurred in #343 because the of the walk associated with:

image
  1. It starts at .includes/meta/meta.stdh (because it's in the diff), which isn't a test so it searches for the associated affected test
  2. It then proceeds up to .includes/meta/ which only contains meta.stdh. That has a suffix, so nothing goes wrong.
  3. It then moves up to .includes/, whose children are the directories meta/ and exp_meta/.
  4. A directory with no extension has an empty suffixes list, so suffixes[0] on either of these would raise IndexError and crash the tool.

Summary by CodeRabbit

  • Bug Fixes
    • Test discovery now recognizes associated files when .mft is the first suffix, including filenames with additional suffixes afterward. Previously, only files with .mft as the exact first suffix were included. This change ensures those additional files are also picked up by the test discovery workflow.

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6ca7634a-63a6-42fc-ad14-2be578d8a31d
📥 Commits

Reviewing files that changed from the base of the PR and between 625d8b7 and 0f8b26d.

📒 Files selected for processing: 1
  • dev_tools/bin/edg-rematerialize-test-run

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

📝 Walkthrough

Test discovery now includes associated files whose first suffix is .mft, even when the file has additional suffixes.

Changes: Test discovery

Layer / File(s) Summary
Match the first suffix
dev_tools/bin/edg-rematerialize-test-run
The suffix check accepts files with .mft as the first suffix, including files with additional suffixes.

Priority: ⬆️ High

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Suggested reviewers: darkarc

Merge Risk: ⚪ Minimal · up to 0f8b2

The rematerialization fix safely handles extensionless paths while discovering associated .mft files with additional suffixes.

Architecture risk: 🔵 Low · up to 0f8b2

The change affects 1 system.

Changed systems: dev_tools

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — dev_tools (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in dev_tools/bin/edg-rematerialize-test-run: Associated test discovery now accepts paths whose first suffix is .mft, including files with later suffixes; previously it required the first suffix to equal .mft exactly.
Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the main change: fixing a bug in test rematerialization. The trailing brackets add minor noise but do not make the title unclear or misleading.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@mohitmishra786 mohitmishra786 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for this

@mborland mborland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@edgcpp-bot

Copy link
Copy Markdown
Collaborator

AcknowlEDG review results updated for 0f8b26d17d0a:

CI success.

@wchilders-nvidia

Copy link
Copy Markdown
Collaborator Author

Merged as d1838fb.

@wchilders-nvidia
wchilders-nvidia deleted the remat-bugfix branch October 22, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants