Skip to content

Commit 9783219

Browse files
committed
Fix single-player tournament: default commit_label (was KeyError in _round_message)
1 parent b0a886a commit 9783219

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

codeclash/tournaments/single_player.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ def get_game_context(self, agent_config: dict, *, round: int) -> GameContext:
6262

6363
def get_agent(self, agent_config: dict, round: int) -> Player:
6464
"""Create an agent with environment and game context."""
65+
# Commit/tag messages are prefixed with `commit_label` (see Player._round_message);
66+
# single-player has no rung/opponent prefix, so default it to empty (as PvP does).
67+
agent_config.setdefault("commit_label", "")
6568
environment = self.game.get_environment(f"{self.game.game_id}.{agent_config['name']}")
6669
game_context = self.get_game_context(agent_config, round=round)
6770
return get_agent(agent_config, game_context, environment)

0 commit comments

Comments
 (0)