Store the person uuid the master issues, so renames keep our identity
The welcome now carries a personId; it lands in the instance_id setting and rides on every hello and HTTP report from then on. The master keys the person by that uuid, so changing instance_name moves our history to the new name instead of starting a stranger. Read-only in Settings on purpose — editing it by hand would detach this machine from its person. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
de9cbffd83
commit
a088381749
+8
-1
@@ -132,7 +132,14 @@ export async function sendReport(): Promise<void> {
|
||||
await fetch(new URL('/api/report', url), {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ instance: instanceName, firms, scheduler }),
|
||||
body: JSON.stringify({
|
||||
instance: instanceName,
|
||||
// Same identity the socket hello carries, so a rename resolves
|
||||
// to the same person whichever transport the report takes.
|
||||
id: getSetting('instance_id') || undefined,
|
||||
firms,
|
||||
scheduler,
|
||||
}),
|
||||
});
|
||||
} catch {
|
||||
// Master might be down — silently continue
|
||||
|
||||
Reference in New Issue
Block a user