From 286a7c8fd3d5f52a84ed71776e89c2dd0352c09e Mon Sep 17 00:00:00 2001 From: atlas Date: Mon, 1 Jun 2026 18:28:22 +0200 Subject: [PATCH] fix(#975): use hyperhive.local email domain to pass Forgejo validation `@hyperhive` (no dot) is rejected by Forgejo's PATCH /admin/users API with 422 Unprocessable Entity. Switch to `@hyperhive.local` across all four files that construct hive-c0re/agent git emails and Forgejo account emails, so both stay in sync and pass RFC-valid domain validation. --- hive-c0re/src/forge.rs | 4 ++-- hive-c0re/src/lifecycle.rs | 2 +- hive-c0re/src/meta.rs | 4 ++-- hive-c0re/src/migrate.rs | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hive-c0re/src/forge.rs b/hive-c0re/src/forge.rs index 9ae7bc34..99bc5199 100644 --- a/hive-c0re/src/forge.rs +++ b/hive-c0re/src/forge.rs @@ -142,7 +142,7 @@ fn extract_token(output: &str) -> Option { /// Must match the `user.email` set by `meta::render_flake` so commits /// by the agent link back to their Forgejo profile page. fn agent_email(name: &str) -> String { - format!("{name}@hyperhive") + format!("{name}@hyperhive.local") } /// Thin Forgejo REST helper. Sends `method` to `url` with a JSON body @@ -227,7 +227,7 @@ async fn change_user_password(name: &str, password: &str) -> Result<()> { /// Idempotently align the Forgejo account email to `agent_email(name)`. /// Existing agents were created with `{name}@hive.local`; this corrects -/// that so git commits (which use `{name}@hyperhive`) link to profiles. +/// that so git commits (which use `{name}@hyperhive.local`) link to profiles. /// Best-effort: failures are warned, not propagated. /// /// Uses the admin REST API (`PATCH /api/v1/admin/users/{name}`) rather diff --git a/hive-c0re/src/lifecycle.rs b/hive-c0re/src/lifecycle.rs index 49821d2b..cc834ae0 100644 --- a/hive-c0re/src/lifecycle.rs +++ b/hive-c0re/src/lifecycle.rs @@ -38,7 +38,7 @@ pub fn container_claude_mount(name: &str) -> String { pub const CONTAINER_SHARED_MOUNT: &str = "/shared"; const GIT_NAME: &str = "c0re"; -const GIT_EMAIL: &str = "c0re@hyperhive"; +const GIT_EMAIL: &str = "c0re@hyperhive.local"; /// Sub-agent web UI port range. Deterministic from the agent's name (FNV-1a /// hash mod range size), so the dashboard can compute the same port without diff --git a/hive-c0re/src/meta.rs b/hive-c0re/src/meta.rs index 6a8d137a..30c29589 100644 --- a/hive-c0re/src/meta.rs +++ b/hive-c0re/src/meta.rs @@ -15,7 +15,7 @@ use crate::lifecycle; const META_ROOT: &str = "/var/lib/hyperhive/meta"; const APPLIED_ROOT: &str = "/var/lib/hyperhive/applied"; const GIT_NAME: &str = "c0re"; -const GIT_EMAIL: &str = "c0re@hyperhive"; +const GIT_EMAIL: &str = "c0re@hyperhive.local"; /// Single-writer lock around every meta-repo operation. Git isn't /// safe to drive from concurrent processes against the same `.git/` @@ -468,7 +468,7 @@ where hyperhive.user.name = name; programs.git.config.user = { name = name; - email = "${name}@hyperhive"; + email = "${name}@hyperhive.local"; }; # Container-wide env: every service + co-process daemon can # resolve the agent's durable state dir without hard-coding it. diff --git a/hive-c0re/src/migrate.rs b/hive-c0re/src/migrate.rs index f33ee52c..e2c4336c 100644 --- a/hive-c0re/src/migrate.rs +++ b/hive-c0re/src/migrate.rs @@ -172,7 +172,7 @@ async fn migrate_applied_repo(name: &str) -> Result<()> { "-c", "user.name=c0re", "-c", - "user.email=c0re@hyperhive", + "user.email=c0re@hyperhive.local", "add", "flake.nix", ], @@ -184,7 +184,7 @@ async fn migrate_applied_repo(name: &str) -> Result<()> { "-c", "user.name=c0re", "-c", - "user.email=c0re@hyperhive", + "user.email=c0re@hyperhive.local", "commit", "-m", "migration: module-only flake",