Clean # out of file name parameters - #1857
Merged
Merged
Conversation
`{prefix}#` is the indexed-target namespace, and MatchingFileFinder matches it by
prefix, but `#` was not cleaned out of parameter values. With cases "x" and "x#1"
on one method, running "x" deleted `C.M_p=x#1.received.txt` and swept
`C.M_p=x#1.verified.txt` into the stale set, which deletes it under AutoVerify.
The two cannot be told apart after the fact, since `C.M_p=x#1.verified.txt` is
exactly what an indexed target of `C.M_p=x` looks like, so `#` now joins the
characters FileNameCleaner replaces with `-`.
This was referenced Aug 26, 2026
This was referenced Aug 27, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
{prefix}#is the indexed-target namespace (Type.Method#00.verified.txt,Type.Method#targetName.verified.txt), andMatchingFileFindermatches it by prefix.#was not among the charactersFileNameCleanercleans out of parameter values, so the two namespaces overlapped.With cases
"x"and"x#1"on one method, running the"x"case deletedC.M_p=x#1.received.txtand sweptC.M_p=x#1.verified.txtinto the stale set — which deletes it under AutoVerify.The finder cannot tell these apart after the fact:
C.M_p=x#1.verified.txtis exactly what an indexed target ofC.M_p=xlooks like. So the fix is at the naming end —#now joins: * ? / < > |and friends as a characterFileNameCleaner.AppendValidreplaces with-.Behaviour change: a parameter value containing
#now produces_p=x-1where it previously produced_p=x#1. Any existing snapshot with a#that came from a parameter value needs renaming. Nothing in this repo was affected — all 146 tracked file names containing#are genuine indexed targets.Tests:
NameForParameterTests.StringHashpins the cleaning, andNamerTests.ParametersWithHashruns the colliding pair end to end.Verify.Tests(1302),StaticSettingsTestsandVerify.NUnit.Testsall pass.