From 6fcd94b51af02c92608a673ff6e0d72eca6bc205 Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN Date: Thu, 20 Aug 2026 11:21:57 -0400 Subject: [PATCH] Revert one path assertion I changed on inference rather than evidence MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sweep in the previous commit assumed every one of these assertions compares against a path the app normalizes through Path. That is true for four of them — each was observed failing on Windows with a "\tmp\..." actual — and false for the fifth. CreateProfileScreen stores backup_path as the raw `.value.strip()` from its input, so the POSIX literal was already correct and my change broke a test that had been passing on Windows. Nothing local could catch it: the two forms are identical on POSIX, so the assertion reads the same either way here. That is the whole trap in this class of fix, and the only defence is to change an expectation because a failure showed you the actual value, not because a neighbouring line looked similar. Noted in the test so the next sweep does not redo it. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01Vtx94nXDmNgXEeThUZP4QN --- src/tests/test_tui_v3_smoke.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/tests/test_tui_v3_smoke.py b/src/tests/test_tui_v3_smoke.py index d3bb77a8..0e6a0799 100644 --- a/src/tests/test_tui_v3_smoke.py +++ b/src/tests/test_tui_v3_smoke.py @@ -924,7 +924,12 @@ async def test_tui3_create_profile_screen_supports_backup_restore_mode() -> None screen.query_one("#create-password", Input).value = "hunter2" await pilot.press("enter") await pilot.pause() - assert restored["backup_path"] == str(Path("/tmp/profile-backup.enc")) + # NOT str(Path(...)): CreateProfileScreen stores this field as the raw + # `.value.strip()` from the input, without normalizing it, so the + # literal is what the app actually passes through. The two forms are + # identical on POSIX, which is exactly why changing this on inference + # rather than on evidence broke Windows and nothing local caught it. + assert restored["backup_path"] == "/tmp/profile-backup.enc" assert booted == {"fingerprint": "BACKUPFP1", "password": "hunter2"}