fix(#2190): replace MANAGER_AGENT fallbacks with "operator" for attribution

- loose_ends.rs: NULL submitter on legacy approval rows → "operator"
- questions.rs: NULL submitter on cancel_loose_end → "operator"
- server.rs: HostRequest::RequestSpawn submitter → "operator"
- dashboard.rs: web-UI spawn submitter → "operator"
- socket_server.rs: submit_init_config with no declared parent → "operator"
- mcp.rs: drop MANAGER_AGENT exception from check_send_allowed; keep <parent> only
This commit is contained in:
damocles 2026-07-04 18:29:42 +02:00 committed by mara
commit 9b2d16ae6a
6 changed files with 16 additions and 22 deletions

View file

@ -16,7 +16,7 @@
use std::time::{SystemTime, UNIX_EPOCH};
use anyhow::Result;
use hive_sh4re::{LooseEnd, MANAGER_AGENT};
use hive_sh4re::LooseEnd;
use crate::coordinator::Coordinator;
@ -56,12 +56,12 @@ pub fn for_agent(coord: &Coordinator, agent: &str) -> Result<Vec<LooseEnd>> {
}
// Show each pending approval to the agent that submitted it. The
// submitter column is NULL for rows predating it; those count as
// the root agent's.
// operator-initiated (no agent tracking predates the column).
for a in coord.approvals.pending()? {
let submitter = coord
.approvals
.submitter_of(a.id)?
.unwrap_or_else(|| MANAGER_AGENT.to_owned());
.unwrap_or_else(|| "operator".to_owned());
if submitter != agent {
continue;
}