Skip to content

Conversation

@mdmosby
Copy link
Collaborator

@mdmosby mdmosby commented Dec 22, 2025

The updated (much faster) spec ID computation did not include quite enough information to ensure unique IDs are generated for large test suites. For example, if generator files had the same hash, root, and parameter set, they would generate the same ID. For SIERRA's large test suite, this structure is fairly common (with additional/different assets influencing test behavior), and including the generator path relative to repo-root is sufficient to differentiate specs.

This PR includes the additional information and now successfully generates specs for the full SIERRA test suite without duplicates.

@mdmosby mdmosby changed the title fix duplicate spec ids fix duplicate spec ids for large test suites with copy/paste structure Dec 22, 2025
@mdmosby mdmosby requested a review from tjfulle December 22, 2025 15:47
return cls._repo_root[path]
except KeyError:
pass
def _compute_repo_root(cls, path: Path) -> Path:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It seems like this method would return user paths and would result in unstable spec IDs for different users. Should we actually include this in the ID hash, or only use it to compute the relative paths? Thoughts @tjfulle ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As a counter argument, the returned path is simply the parent if we don't find a VC directory in the tree. Generally speaking, constructing stable hashes from such a path would be very difficult or impossible so maybe this fall-back case should instead return /? This would make rel_repo be the full-path to the file and we can drop repo_root from the hash.

@mdmosby
Copy link
Collaborator Author

mdmosby commented Dec 22, 2025

This MR also resolves #80. I believe it is related to the spec id being constructed only if not set (see aa3e6548)

@tjfulle
Copy link
Collaborator

tjfulle commented Dec 22, 2025

Thanks @mdmosby - putting the repo root and not the relative path was bug, thanks for the fix!

@tjfulle tjfulle merged commit ace7b07 into sandialabs:main Dec 22, 2025
15 checks passed
@mdmosby mdmosby deleted the fix-dup-ids branch December 28, 2025 22:08
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