Fix VerifySettings copy constructor, temp cleanup, and stream/extensi…

Merged
SI
5mo ago
+296-51

…on edge cases

  • VerifySettings copy ctor: copy throwException (was dropped, so settings.AutoVerify(throwException: true) passed as an instance silently did not throw on mismatch)
  • VerifySettings copy ctor: clone the mutable collections it was aliasing (appendedFiles, the extension stream/string comparer dictionaries, and the inner lists of ExtensionMappedInstanceScrubbers), so per-test fluent config no longer leaks into a shared base settings instance
  • TempDirectory/TempFile cleanup: catch IOException/UnauthorizedAccessException for aged-out orphans instead of DirectoryNotFoundException/FileNotFoundException (which File.Delete never throws), so a locked or read-only orphan no longer fails the module initializer on every run
  • IoHelpers.WriteStream: fall back to copying through the handle when File.Copy cannot re-open the source by path (writable / FileShare.None, or a handle-based stream), resetting position only in that fallback
  • Extensions.Extension(FileStream): return "noextension" for extension-less files instead of throwing ArgumentOutOfRangeException
  • TempDirectory/TempFile: guard the AsyncLocal path list with a lock on add/remove/scrub iteration
  • Add tests for the above