Watch
0
0
Fork
You've already forked hyperhive
0

agents get a per-agent repo limit in their permissions record, orgs are locked

max_repos (default 0, 0..=100) lives in the agent's agent-permissions record and is edited on its permissions panel. The controller applies each agent's own value as max_repo_creation at CreateForgeUser and to existing accounts on change, restart and every five minutes; agent accounts may not create organizations.
This commit is contained in:
atlas 2026-11-15 20:47:21 +01:00 • committed by mara
commit 1edeb5c55d

View file

@ -591,7 +591,7 @@ mod tests {
#[test]
fn an_agent_called_hive_x_is_not_hive_xs_account() {
// Both ways round: the hive job refuses the agent's account, and the
// agent's own guard (`disable_repo_creation`) refuses the hive's,
// agent's own guard (`limit_agent_account`) refuses the hive's,
// because neither accepts the other's email.
let login = forge::hive_login("alpha");
for agents in [
@ -638,7 +638,7 @@ mod tests {
)
.await;
client
.ensure_agent_user("hive-alpha")
.ensure_agent_user("hive-alpha", 0)
.await
.expect_err("the hive's account is not the agent's");
assert!(lockdown_patch(&seen, "hive-alpha").is_none());