hub (unreleased): the delete journal keeps no id after one year — emptied in the transaction of the year-end prune (D86, decision 314)

Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
admin committed 2026-11-15 15:57:10 +01:00
1 parent b07e4af0c1
commit 0fa1fe56d6
6 files changed
+393 -31

No files matched your search

@@ -0,0 +1,65 @@
== MUTATION: the journal keeps the household's id for ever (no update of customer_resets)
RED on the mutant, GREEN on the real file
--- FAIL: TestD86_AfterTheYearTheJournalHoldsNoIDAndKeepsItsRows (0.04s)
deleted_customer_audit_test.go:140: PruneDeletedCustomerAudit peti: customer_resets: missing argument with index 3
== MUTATION: the box's id stays in host_deletions
RED on the mutant, GREEN on the real file
--- FAIL: TestD86_AfterTheYearTheJournalHoldsNoIDAndKeepsItsRows (0.05s)
deleted_customer_audit_test.go:143: a year after the deletion 1 journal row(s) still hold the household's id or its box's id
== MUTATION: the journal ROWS are deleted, not emptied
RED on the mutant, GREEN on the real file
--- FAIL: TestD86_AfterTheYearTheJournalHoldsNoIDAndKeepsItsRows (0.04s)
deleted_customer_audit_test.go:146: the journal lost rows: 8 before, 7 after — the id goes, the row stays
== MUTATION: the new life's box deletes lose their ids too (no date limit on host_deletions)
RED on the mutant, GREEN on the real file
--- FAIL: TestD86_AnIDUsedAgainKeepsTheJournalOfItsNewLife (0.05s)
deleted_customer_audit_test.go:182: the NEW life's box delete lost its id (0) — the escrow carry of the living household reads it
== MUTATION: the new life's RESET rows lose their ids too
RED on the mutant, GREEN on the real file
--- FAIL: TestD86_AnIDUsedAgainKeepsTheJournalOfItsNewLife (0.05s)
deleted_customer_audit_test.go:185: the NEW life's RESET row: 0 with the id, want 1
== MUTATION: a word in place of the empty string
RED on the mutant, GREEN on the real file
--- FAIL: TestD86_TheEmptiedRowIsNeverReadAsAHousehold (0.04s)
deleted_customer_audit_test.go:205: the next day's run deleted 1 event row(s) of a household it took the emptied journal row for (err <nil>)
== MUTATION: the emptied row is read as a household again
RED on the mutant, GREEN on the real file
--- FAIL: TestD86_TheEmptiedRowIsNeverReadAsAHousehold (0.06s)
deleted_customer_audit_test.go:205: the next day's run deleted 1 event row(s) of a household it took the emptied journal row for (err <nil>)
== MUTATION: the step field is kept as it is
RED on the mutant, GREEN on the real file
--- FAIL: TestD86_TheStepFieldKeepsOnlyPlainWords (0.05s)
deleted_customer_audit_test.go:224: legs_json after the year = {"hosts":"ok","hetzner":"sub-account kata.kovacs@example.com removed","customer_delete":"ok","Kata Kovacs":"ok"}
== MUTATION: a value that is not a plain word stays in the step field
RED on the mutant, GREEN on the real file
--- FAIL: TestD86_TheStepFieldKeepsOnlyPlainWords (0.04s)
deleted_customer_audit_test.go:224: legs_json after the year = {"customer_delete":"ok","hetzner":"sub-account kata.kovacs@example.com removed","hosts":"ok","other":"ok"}
== MUTATION: a key that is not a plain word stays in the step field
RED on the mutant, GREEN on the real file
--- FAIL: TestD86_TheStepFieldKeepsOnlyPlainWords (0.04s)
deleted_customer_audit_test.go:224: legs_json after the year = {"Kata Kovacs":"ok","customer_delete":"ok","hetzner":"other","hosts":"ok"}
== MUTATION: the audit rows are deleted outside the transaction
*** NOT A RED-PROOF *** (mutant rc=0 built=True real rc=0)
== MUTATION: a household one day short of the year is emptied
RED on the mutant, GREEN on the real file
--- FAIL: TestD86_AfterTheYearTheJournalHoldsNoIDAndKeepsItsRows (0.04s)
deleted_customer_audit_test.go:152: the step states of the deleted household's row are not kept as they were: 2
== MUTATION: a household whose delete never ended is emptied
RED on the mutant, GREEN on the real file
--- FAIL: TestD86_AfterTheYearTheJournalHoldsNoIDAndKeepsItsRows (0.04s)
deleted_customer_audit_test.go:156: peti-2: 0 journal row(s) hold the id after the run, want 2 (nothing of it may change)
deleted_customer_audit_test.go:156: living: 0 journal row(s) hold the id after the run, want 2 (nothing of it may change)
13 mutations, 1 not a red-proof
## redone, and one more
== MUTATION: the audit rows are deleted outside the transaction (redone: the mutant failed on a database lock before the journal step, and the test took any error; it asks for the staged one now)
RED on the mutant, GREEN on the real file
--- FAIL: TestD86_TheLogAndTheIDGoInOneTransaction (4.96s)
deleted_customer_audit_test.go:238: the staged failure of the journal step was not returned: PruneDeletedCustomerAudit mari: events: database is locked (5) (SQLITE_BUSY)
== MUTATION: the journal step's failure is swallowed and the audit rows go
RED on the mutant, GREEN on the real file
--- FAIL: TestD86_TheLogAndTheIDGoInOneTransaction (0.04s)
deleted_customer_audit_test.go:238: the staged failure of the journal step was not returned: <nil>
2 mutations, 0 not a red-proof