R-717: name each test's red-proof file
The six red-proofs are saved under felhom.eu documentation/audits/design-build-2026-10-06/E/red-*.txt; every test comment now names its file and the reverted line. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
@@ -87,8 +87,8 @@ func cmdManager(t *testing.T, yml string) (*Manager, *fakeSwitch, *bytes.Buffer,
|
||||
}
|
||||
|
||||
// The window runs open_command once; the window's end runs command once; the switch ends closed.
|
||||
// COMPANION RED-PROOF (audits/design-build-2026-10-06/E/red-open-then-close.txt): on the unchanged code (no
|
||||
// open_command) the window never opens the switch → "the window did not open" fails.
|
||||
// COMPANION RED-PROOF (felhom.eu audits/design-build-2026-10-06/E/red-open-then-close.txt): drop the open_command
|
||||
// run in liftNativeLock (the code before R-717) → "the window did not open the app's own switch" fails.
|
||||
func TestAfterSetupR717_OpenThenCloseEachRunOnce(t *testing.T) {
|
||||
m, f, _, dir := cmdManager(t, cmdYml)
|
||||
_, err := m.OpenSignupWindow("gapp")
|
||||
@@ -182,7 +182,8 @@ func TestAfterSetupR717_AFailedOpenStaysClosedAndSaysSo(t *testing.T) {
|
||||
}
|
||||
|
||||
// A close that fails at the window's end is logged loudly, never recorded as closed, and retried by the loop.
|
||||
// COMPANION RED-PROOF: none separate — the retry gap is pinned by asserting the second pass (nativeLockOpenRetry).
|
||||
// COMPANION RED-PROOF (red-failed-close-retry.txt): use the 30-minute nativeLockRetry after a window too → "the loop
|
||||
// did not retry the close" fails.
|
||||
func TestAfterSetupR717_AFailedCloseIsRetriedNotTrusted(t *testing.T) {
|
||||
m, f, buf, dir := cmdManager(t, cmdYml)
|
||||
_, err := m.OpenSignupWindow("gapp")
|
||||
@@ -238,7 +239,7 @@ func TestAfterSetupR717_TheCloseRunsAgainAfterAnUpdate(t *testing.T) {
|
||||
|
||||
// A template that closes by command but has no open_command: the window opens the address only, the app's switch
|
||||
// stays closed, and the log says so ONCE (two presses).
|
||||
// COMPANION RED-PROOF: drop the LoadOrStore guard → the warning appears twice and this fails.
|
||||
// COMPANION RED-PROOF (red-no-open-command-logs-once.txt): drop the LoadOrStore guard → logged twice, fails.
|
||||
func TestAfterSetupR717_NoOpenCommandLogsOnceAndKeepsTheWindow(t *testing.T) {
|
||||
yml := strings.Replace(cmdYml, " open_command: [\"sh\", \"-c\", \"open-signup\"]\n open_success: \"SIGNUP-OPENED\"\n", "", 1)
|
||||
m, f, buf, dir := cmdManager(t, yml)
|
||||
|
||||
Reference in New Issue
Block a user