hub: the first sight of a large request is the hub's own record; no box text in the ledger (security review)

The wait of a large removed-app request was timed from a search of the
windows' refusal text, which also held names a box had claimed. A box could
plant the marker in a claimed name a week ahead and skip the wait and the mail.

- offsite_large_requests (household, key of the app set, first_seen): written
  only by the hub; at most 50 rows per household; it goes with the household.
  No text is searched any more.
- A claimed name that has not the shape of an app name is written nowhere: the
  ledger, the answer and the operator's message carry a fixed placeholder.

Tests seen red; 6 mutations seen red (redproof-review-s1.txt).

Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
admin committed 2026-11-15 14:50:55 +01:00
1 parent be272b7cf4
commit 1fac9c16f1
10 files changed
+261 -32

No files matched your search

+1
View File
@@ -28,6 +28,7 @@ var orphanTables = []struct{ table, where string }{
{"offsite_windows", `customer_id NOT IN (SELECT customer_id FROM customer_configs) AND customer_id NOT IN (SELECT customer_id FROM hosts)`},
{"offsite_abandon_requests", `customer_id NOT IN (SELECT customer_id FROM customer_configs) AND customer_id NOT IN (SELECT customer_id FROM hosts)`},
{"offsite_app_presence", `customer_id NOT IN (SELECT customer_id FROM customer_configs) AND customer_id NOT IN (SELECT customer_id FROM hosts)`},
{"offsite_large_requests", `customer_id NOT IN (SELECT customer_id FROM customer_configs) AND customer_id NOT IN (SELECT customer_id FROM hosts)`},
}
// PurgeOrphanRows removes, in ONE transaction, the rows of boxes and households that no longer exist from the six