Skip to content

Clean # out of file name parameters - #1857

Merged
SimonCropp merged 1 commit into
mainfrom
fix-hash-in-parameters
Aug 17, 2026
Merged

Clean # out of file name parameters#1857
SimonCropp merged 1 commit into
mainfrom
fix-hash-in-parameters

Conversation

@SimonCropp

Copy link
Copy Markdown
Member

{prefix}# is the indexed-target namespace (Type.Method#00.verified.txt, Type.Method#targetName.verified.txt), and MatchingFileFinder matches it by prefix. # was not among the characters FileNameCleaner cleans out of parameter values, so the two namespaces overlapped.

With cases "x" and "x#1" on one method, running the "x" case 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 finder cannot tell these apart after the fact: C.M_p=x#1.verified.txt is exactly what an indexed target of C.M_p=x looks like. So the fix is at the naming end — # now joins : * ? / < > | and friends as a character FileNameCleaner.AppendValid replaces with -.

Behaviour change: a parameter value containing # now produces _p=x-1 where 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.StringHash pins the cleaning, and NamerTests.ParametersWithHash runs the colliding pair end to end. Verify.Tests (1302), StaticSettingsTests and Verify.NUnit.Tests all pass.

`{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 `-`.
@SimonCropp SimonCropp added this to the 32.0.0 milestone Aug 17, 2026
@SimonCropp
SimonCropp merged commit 5cf328e into main Aug 17, 2026
7 checks passed
@SimonCropp
SimonCropp deleted the fix-hash-in-parameters branch August 17, 2026 12:27
This was referenced Aug 26, 2026
This was referenced Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant