"A secret's home is the OS keystore. Not a config file, not a log line, not a constant in your source."
The Secret Has a Home, and It's Not Your Code
When Flint reaches a brain running on another machine, that call is authenticated — and authentication means a secret. The first rule of a secret is where it lives: in the macOS Keychain, the operating system's protected store, and nowhere else. Not hardcoded in the source, not written to the macros file, not printed to a log, not committed to a repo. A private repo does not change this — 'it's private' is not a place to keep a live secret. The Keychain exists precisely so an app never has to hold a durable secret in its own files or code.
Keychain for the Durable, Memory for the Session
There are two secrets with two lifetimes, and they live in two places accordingly. The durable one — the PIN the user set — lives in the Keychain, retrieved only when needed and never copied elsewhere. From it, Flint mints a short-lived session token, and that token lives only in memory for the length of the session; it is never persisted. Matching the storage to the lifetime is the discipline: durable secret in the protected keystore, ephemeral token in RAM that vanishes when the app quits. Neither ever touches disk in plaintext.
SECRET LIFETIME HOME
---------------- ------------ ------------------------
the PIN durable macOS Keychain (protected)
session token ephemeral memory only (never persisted)
Never: hardcoded, logged, in a config file, in the repo.
A Private Wire
The transport matters too. Remote calls travel over a private network overlay rather than the open internet, so the wire itself is not publicly reachable, and the session header rides that private connection. The combination — a secret held in the Keychain, a short-lived token in memory, over a private wire — is a layered posture: even the network path is not exposed, so the header isn't crossing the public internet to begin with. Each layer assumes the others might fail and adds protection anyway.