pub fn register_node(
aida_repo: &Path,
user_id: u32,
hostname: &str,
) -> Result<u32>Expand description
Register a new node in the aida registry via git CAS push loop.
This is the core distributed identity mechanism:
- Pull latest from remote
- Read node_counter, claim the next ID
- Write updated counter + registry entry
- Commit and push
- If push rejected (someone else registered first), pull and retry
Returns the assigned node_id on success.