Kiosk: System Name storage, validation, sync, and sent on license validation

Adds local System Name persistence (trimmed, 1-40) in system_kv, an
injectable sync module with conflict/invalid revert and a pending-sync
flag, a background SystemNameSync worker (retries on boot and on a timer),
and api_client support for PUT /licenses/{key}/system-name plus the
additive systemName field/systemNameStatus on license validation. The
license service sends the stored name and applies the status. Covers
validation, pending retry, and conflict revert with a faked HTTP layer.
This commit is contained in:
NeilClack
2026-09-29 09:57:52 -05:00
parent 003a90d810
commit e7df02344b
16 changed files with 812 additions and 13 deletions
+10
View File
@@ -17,4 +17,14 @@ std::string sanitizeLicenseKey(const std::string& input);
// characters (XXXX-XXXX-XXXX-XXXX). Partial input yields partial output.
std::string formatLicenseKey(const std::string& sanitized);
// The maximum length of a System Name (per the API contract).
constexpr size_t SYSTEM_NAME_MAX_LENGTH = 40;
// Removes leading and trailing ASCII whitespace from `input`.
std::string trim(const std::string& input);
// Returns true when `name` (already trimmed) is a valid System Name: 1-40
// characters. Empty or whitespace-only names are invalid (never a clear).
bool isValidSystemName(const std::string& name);
} // namespace radiantwave::validation