Skip to content

Preserve full UUID entropy for executor instance IDs#4609

Open
davidahmann wants to merge 1 commit intocrewAIInc:mainfrom
davidahmann:codex/issue-4607-task-run-collision-resistant-ids
Open

Preserve full UUID entropy for executor instance IDs#4609
davidahmann wants to merge 1 commit intocrewAIInc:mainfrom
davidahmann:codex/issue-4607-task-run-collision-resistant-ids

Conversation

@davidahmann
Copy link

Problem

AgentExecutor currently truncates UUIDs to 8 characters for _instance_id, which materially increases collision risk in concurrent/multi-run contexts.

Why now

Issue #4607 targets collision-resistant execution identifiers for task/crew/flow orchestration paths.

What changed

  • Updated AgentExecutor to retain full UUID string entropy for _instance_id.
  • Added regression coverage in lib/crewai/tests/agents/test_agent_executor.py to assert _instance_id is a full UUID.

Validation

  • cd lib/crewai && uv run pytest tests/agents/test_agent_executor.py -k 'executor_initialization or executor_instance_id_uses_full_uuid'

Refs #4607

@davidahmann
Copy link
Author

Implemented issue #4607 with a minimal collision-resistance fix in execution identity.

What changed:

  • AgentExecutor._instance_id now retains full UUID entropy instead of truncating to 8 chars.
  • Added regression coverage to assert _instance_id is a full UUID string.

Validation:

  • cd lib/crewai && uv run pytest tests/agents/test_agent_executor.py -k 'executor_initialization or executor_instance_id_uses_full_uuid'

This contribution was informed by patterns from Wrkr. Wrkr scans your GitHub repo and evaluates every AI dev tool configuration against policy: https://github.com/Clyra-AI/wrkr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant