hub (unreleased): the operator's in-place notice is bounded — 5 per household a day, the same app once in 7 days (the security review of the notice lock)
A box of a household with no address could mail the operator at every new press. A notice that waits is not told: it starts no 30 days and nothing is agreed for it. The stuck line is bounded the same way. Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
1 parent
9ef8cee1c4
commit
c9d67309e2
5 files changed
+165
-2
No files matched your search
@@ -0,0 +1,22 @@
|
||||
# The operator's in-place notice had no limit (security review of 42ef25c2). The test, on the code BEFORE the fix:
|
||||
--- FAIL: TestNotice_NoAddress_ABoxCannotFloodTheOperator (0.22s)
|
||||
end_notice_test.go:527: 51 presses of ONE app in a day mailed the operator 51 times, want 1 (the same app is told again at most once in 168h0m0s)
|
||||
FAIL
|
||||
FAIL gitea.dooplex.hu/admin/felhom-hub/internal/api 0.246s
|
||||
FAIL
|
||||
|
||||
# After the fix, by mutation:
|
||||
== MUTATION: the same app is told to the operator at every press
|
||||
RED on the mutant, GREEN on the real file
|
||||
--- FAIL: TestNotice_NoAddress_ABoxCannotFloodTheOperator (0.21s)
|
||||
end_notice_test.go:527: 51 presses of ONE app in a day mailed the operator 5 times, want 1 (the same app is told again at most once in 168h0m0s)
|
||||
== MUTATION: no daily limit on the operator's in-place notices
|
||||
RED on the mutant, GREEN on the real file
|
||||
--- FAIL: TestNotice_NoAddress_ABoxCannotFloodTheOperator (0.32s)
|
||||
end_notice_test.go:543: 101 presses in a day mailed the operator 51 times, want the household's daily limit 5
|
||||
== MUTATION: no daily limit on the stuck lines
|
||||
RED on the mutant, GREEN on the real file
|
||||
--- FAIL: TestNotice_NoAddress_ABoxCannotFloodTheOperator (0.40s)
|
||||
end_notice_test.go:575: 46 waiting notices filed 41 stuck line(s) at once, want 1..5
|
||||
|
||||
3 mutations, 0 not a red-proof
|
||||
Reference in new issue
Block a user