Round 4 notification validation¶
One production bug proven and corrected: Windows accepts the single-leading-backslash spelling \?\C:\tools\pavlok.exe in Path.IsPathFullyQualified. Path.GetFullPath then resolves it to C:\?\C:\tools\pavlok.exe on this checkout's drive, and the old post-normalization drive guard accepts it. The first test run failed with Assert.Throws() Failure: No exception was thrown for that exact input (see notify-tests-r4.log). A direct .NET path probe also returned FullyQualified: True and the drive-relative normalization above. This violates the pinned local-path contract.
The production fix rejects leading slash/backslash paths on Windows before normalization. Ordinary drive-qualified paths remain accepted; Unix absolute paths remain accepted on Unix. The same failing test is retained unchanged as regression coverage. No executable is launched.
Round4NotifyValidationTests.cs exercises pinned executable validation (including Windows rooted, drive-relative and device spellings), exact exception messages, outbox budget endpoints, the null/default deadline, subject fallback precedence and ASCII truncation, and cancellation before budget validation or reservation. All delivery/process collaborators are in-memory fakes. The default deadline test observes cancellation at approximately 30 seconds; its 29–45 second tolerance allows scheduling delays and is not a claim of tick-accurate timing.
Observable coverage limits¶
- Original
Notifications.cs:47–49: the Windows checks run afterPath.GetFullPath. Short and drive-relative inputs fail the first guard; device/UNC inputs now fail the early guard too, including the corrected single-backslash case above. Tests assert the actual early message,Configure a pinned absolute local executable path.The later message,Configure a local drive executable, never UNC/device paths., is not reachable with these inputs. No claimed kills for redundant post-normalization checks. Notifications.cs:123–125: Unicode/control subject transformations execute, butActionJson.Serializesubsequently validates the original target (Models.cs:111–114,120–152) before invoking the sender. Non-ASCII/control labels therefore throwJsonException. Tests assert that exact error and no delivery, including a valid surrogate pair starting at index 79. The intended summary for 79acharacters plus that pair would be 79acharacters;one\0two,one\ttwo,one\u007ftwo,one\u2028two, andone\u2029twowould becomeone two, andone\r\ntwowould becomeone two. Those transformed subjects cannot be asserted through the public sender seam. Tests do not duplicate the transformation or claim its mutants are killed.Notifications.cs:92:SmtpEmailSenderconstructs and disposes its ownSmtpClient. Credentials are not observable through a reflection-free seam without an SMTP server. One explicitly skipped test records this limitation, as authorized. No network or real credentials used.
No thresholds changed, mutants excluded, feature flags enabled, or production seams added. Mutation score has not been remeasured by this pass.
Verification receipt¶
Command: dotnet test --no-restore -p:OutputPath=bin/R4/, launched hidden with Approvals__Enabled=false.
Initial run (notify-tests-r4.log): Failed! - Failed: 1, Passed: 485, Skipped: 1, Total: 487, Duration: 31 s.
After the guard fix (notify-tests-r4-fixed.log):
Passed! - Failed: 0, Passed: 486, Skipped: 1, Total: 487, Duration: 36 s - Forge.Approvals.Tests.dll (net10.0)
The single skip is the explicitly permitted SMTP credential observability case. No commit or push performed.