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

+4 -1
View File
@@ -53,6 +53,8 @@ type CustomerResidue struct {
OffsiteAbandonRequests int
// D72: the hub's own record of which apps the household's box runs (offsite_ended.go).
OffsiteAppPresence int
// The hub's own first sight of a large ended-app request (offsite_ended.go).
OffsiteLargeRequests int
}
// Total is the single number the "is there anything left at all?" decision hangs on.
@@ -62,7 +64,7 @@ func (r *CustomerResidue) Total() int {
}
return r.Reports + r.AppTelemetry + r.AppLogTails + r.LogTailRequests +
r.NotificationPrefs + r.SelfBindTokens + r.ApplianceRegistrations + r.AppLogIssueRefs +
r.OffsiteKeys + r.OffsiteWindows + r.OffsiteAbandonRequests + r.OffsiteAppPresence
r.OffsiteKeys + r.OffsiteWindows + r.OffsiteAbandonRequests + r.OffsiteAppPresence + r.OffsiteLargeRequests
}
// residueQueries is the ONE list both the counter and the purge walk, so a table can never be
@@ -82,6 +84,7 @@ var residueQueries = []struct {
{"offsite_windows", func(r *CustomerResidue) *int { return &r.OffsiteWindows }},
{"offsite_abandon_requests", func(r *CustomerResidue) *int { return &r.OffsiteAbandonRequests }},
{"offsite_app_presence", func(r *CustomerResidue) *int { return &r.OffsiteAppPresence }},
{"offsite_large_requests", func(r *CustomerResidue) *int { return &r.OffsiteLargeRequests }},
}
// CustomerResidue counts the customer's report-derived + binding residue. Read-only.