You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
discovery(llc): dual agent-identifier keyspace — AgentOrgNode.id (UUID PK) vs agent_id (String slug) used inconsistently across joins #10032
#9861 review (org-chart assigned-count enrichment) — the enrichment initially joined str(LLCWorkItem.assignee_agent_id) (UUID) against AgentOrgNode.agent_id (String(255) logical slug) and silently returned 0 for hire-generated slug agents.
The two keyspaces
AgentOrgNode.id — UUID PK. Used by work_items._item_to_dict (work_items.py:255) to resolve assignee_agent_id.
Any join/lookup that picks the wrong column compiles fine and returns empty/zero rows — invisible in SQLite tests that seed agent_id = str(uuid4()) (both keyspaces collide to the same string).
Suggested resolution
Document the convention (which column is the FK target for which table) in the LLC models module; add a lint/test helper that seeds NON-UUID slugs in harnesses so wrong-column joins fail loudly; audit existing joins (budget, org-chart, work-item assignee, runs) for consistency.
Discovered during
#9861 review (org-chart assigned-count enrichment) — the enrichment initially joined
str(LLCWorkItem.assignee_agent_id)(UUID) againstAgentOrgNode.agent_id(String(255) logical slug) and silently returned 0 for hire-generated slug agents.The two keyspaces
AgentOrgNode.id— UUID PK. Used bywork_items._item_to_dict(work_items.py:255) to resolveassignee_agent_id.AgentOrgNode.agent_id— String(255) logical id (hire flow generates e.g.assistant-...-{hex8}, agent_hires.py:252). Used byllc_agent_budgets.agent_id(feat(llc/budget): no public endpoint to provision a per-agent budget #9901), heartbeat scheduler dispatch, controls pause/resume.Any join/lookup that picks the wrong column compiles fine and returns empty/zero rows — invisible in SQLite tests that seed
agent_id = str(uuid4())(both keyspaces collide to the same string).Suggested resolution
Document the convention (which column is the FK target for which table) in the LLC models module; add a lint/test helper that seeds NON-UUID slugs in harnesses so wrong-column joins fail loudly; audit existing joins (budget, org-chart, work-item assignee, runs) for consistency.
Related: #9861, #9901, #8997, umbrella #9923.