SentientUpgrade
The one place that makes a shadow sentient full.
| Group | hive |
Declared in src/libs/libhive/hive/SentientUpgrade.hpp.
Detailed description
Before 2026-10-16 the upgrade wrote as it went: the passphrase page re-keyed the hive and wrote the name, and a hook in NodeWindow flipped the registry to full at once, all before the person had seen the recovery phrase. Back on the recovery-phrase page then left a full sentient with an unverified phrase (identity-flow-hardening §IFH-U-0).
Now the flows hold a Draft and call commit() once, at the end. The order of the writes is fixed:
- Re-key the hive (
HiveSession::setPassword()). On failure, stop: nothing is written. - Write a changed name into the vault and into the registry entry.
- Flip the registry entry to full (
SentientRegistry::removeShadowPassphrase()), which also drops a migration verifier.
A crash between the re-key and the flip leaves a re-keyed hive with a shadow entry. The next mount with the shadow passphrase fails, the startup asks for the passphrase, and the self-heal at mount time (SentientRegistry::syncShadowFlagToSession()) flips the entry.
See also SentientUpgradeWizard, SentientRegistry, HiveSession.