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.
This commit is contained in:
parent
b83edc40c6
commit
286a7c8fd3
4 changed files with 7 additions and 7 deletions
|
|
@ -142,7 +142,7 @@ fn extract_token(output: &str) -> Option<String> {
|
||||||
/// Must match the `user.email` set by `meta::render_flake` so commits
|
/// Must match the `user.email` set by `meta::render_flake` so commits
|
||||||
/// by the agent link back to their Forgejo profile page.
|
/// by the agent link back to their Forgejo profile page.
|
||||||
fn agent_email(name: &str) -> String {
|
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
|
/// 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)`.
|
/// Idempotently align the Forgejo account email to `agent_email(name)`.
|
||||||
/// Existing agents were created with `{name}@hive.local`; this corrects
|
/// 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.
|
/// Best-effort: failures are warned, not propagated.
|
||||||
///
|
///
|
||||||
/// Uses the admin REST API (`PATCH /api/v1/admin/users/{name}`) rather
|
/// Uses the admin REST API (`PATCH /api/v1/admin/users/{name}`) rather
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ pub fn container_claude_mount(name: &str) -> String {
|
||||||
pub const CONTAINER_SHARED_MOUNT: &str = "/shared";
|
pub const CONTAINER_SHARED_MOUNT: &str = "/shared";
|
||||||
|
|
||||||
const GIT_NAME: &str = "c0re";
|
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
|
/// 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
|
/// hash mod range size), so the dashboard can compute the same port without
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ use crate::lifecycle;
|
||||||
const META_ROOT: &str = "/var/lib/hyperhive/meta";
|
const META_ROOT: &str = "/var/lib/hyperhive/meta";
|
||||||
const APPLIED_ROOT: &str = "/var/lib/hyperhive/applied";
|
const APPLIED_ROOT: &str = "/var/lib/hyperhive/applied";
|
||||||
const GIT_NAME: &str = "c0re";
|
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
|
/// Single-writer lock around every meta-repo operation. Git isn't
|
||||||
/// safe to drive from concurrent processes against the same `.git/`
|
/// safe to drive from concurrent processes against the same `.git/`
|
||||||
|
|
@ -468,7 +468,7 @@ where
|
||||||
hyperhive.user.name = name;
|
hyperhive.user.name = name;
|
||||||
programs.git.config.user = {
|
programs.git.config.user = {
|
||||||
name = name;
|
name = name;
|
||||||
email = "${name}@hyperhive";
|
email = "${name}@hyperhive.local";
|
||||||
};
|
};
|
||||||
# Container-wide env: every service + co-process daemon can
|
# Container-wide env: every service + co-process daemon can
|
||||||
# resolve the agent's durable state dir without hard-coding it.
|
# resolve the agent's durable state dir without hard-coding it.
|
||||||
|
|
|
||||||
|
|
@ -172,7 +172,7 @@ async fn migrate_applied_repo(name: &str) -> Result<()> {
|
||||||
"-c",
|
"-c",
|
||||||
"user.name=c0re",
|
"user.name=c0re",
|
||||||
"-c",
|
"-c",
|
||||||
"user.email=c0re@hyperhive",
|
"user.email=c0re@hyperhive.local",
|
||||||
"add",
|
"add",
|
||||||
"flake.nix",
|
"flake.nix",
|
||||||
],
|
],
|
||||||
|
|
@ -184,7 +184,7 @@ async fn migrate_applied_repo(name: &str) -> Result<()> {
|
||||||
"-c",
|
"-c",
|
||||||
"user.name=c0re",
|
"user.name=c0re",
|
||||||
"-c",
|
"-c",
|
||||||
"user.email=c0re@hyperhive",
|
"user.email=c0re@hyperhive.local",
|
||||||
"commit",
|
"commit",
|
||||||
"-m",
|
"-m",
|
||||||
"migration: module-only flake",
|
"migration: module-only flake",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue