Skip to content

Fix ThreadPoolExecutor lifecycle in EntityAgent.stateless_act#248

Open
gut-puncture wants to merge 1 commit into
google-deepmind:mainfrom
gut-puncture:codex/fix-stateless-act-executor-lifecycle
Open

Fix ThreadPoolExecutor lifecycle in EntityAgent.stateless_act#248
gut-puncture wants to merge 1 commit into
google-deepmind:mainfrom
gut-puncture:codex/fix-stateless-act-executor-lifecycle

Conversation

@gut-puncture

Copy link
Copy Markdown
Contributor

Summary

  • use a context-managed ThreadPoolExecutor in EntityAgent.stateless_act
  • preserve existing success-path behavior while guaranteeing cleanup on exceptions
  • add focused unit tests for phase precondition, success path, and exception-path cleanup

Why

stateless_act previously allocated an executor and called shutdown() only after _parallel_call_ returned. If _parallel_call_ raised, shutdown would be skipped.

Testing

  • . .venv/bin/activate && python -m pytest -q concordia/agents/entity_agent_test.py

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