fix: ensure element.out is always created in interstitial autotest #1810
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.
Problem
Some autotest interstitial jobs were failing when using
conf_filters
withmin_dist
constraints that filter out all generated defects. The issue occurred because:element.out
file is never createdpost_process
) expect this file to exist and fail when it's missingdpgen autotest make
to crash with errors like attempting to read from a non-existent fileRoot Cause
The
element.out
file was only created when defects were actually written to it during the generation loop. Ifconf_filters
removed all defects, the file was never opened/created, leaving subsequent processing steps unable to find the expected file.Solution
This PR implements a minimal fix with two key changes:
1. Always Create element.out
The file is now created immediately after cleanup, ensuring it exists even when no defects pass the filters.
2. Robust post_process Handling
Enhanced the
post_process
method to gracefully handle:element.out
filesTesting
Added comprehensive test cases:
test_make_confs_filtered_out
: Reproduces the original bug scenario with highmin_dist
filteringtest_make_confs_partial_filtering
: Tests robust handling of mismatched element/task countsVerification
✅ Unit tests pass (5/5 interstitial tests)
✅ CLI commands work with problematic configurations
✅ Normal workflow remains functional
✅ Integration tests confirm fix works end-to-end
✅ Other autotest functionality unaffected
The fix is surgical and minimal - only 3 lines added to ensure file creation, plus robust error handling in post_process. This resolves the issue while maintaining full backward compatibility.
Fixes #500.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.