@@ -20,8 +20,8 @@ def __init__(
2020 self .config = config
2121 self .name = f"{ format_vars ['game_id' ]} _{ config ['name' ]} "
2222 self .environment = environment
23- self .round = format_vars ["round" ]
2423 self .format_vars = format_vars
24+ self .round = 1 # TODO: This is disconnected from game.round right now
2525
2626 def commit (self ):
2727 """Commit changes to the agent's codebase."""
@@ -32,6 +32,7 @@ def commit(self):
3232 ]:
3333 assert_zero_exit_code (self .environment .execute (cmd ))
3434 print (f"Committed changes for { self .name } for round { self .round } /{ rounds } " )
35+ self .round += 1 # TODO: This is disconnected from game.round right now
3536
3637 def push (self ):
3738 """Push codebase to a branch on the game's remote repository."""
@@ -40,10 +41,14 @@ def push(self):
4041 raise ValueError ("GITHUB_TOKEN environment variable is required" )
4142
4243 for cmd in [
43- f"git remote add origin https://x-access-token:{ token } @github.com/{ GH_ORG } /{ self .name } .git" ,
44- "git push -u origin main" ,
44+ f"git remote remove origin" ,
45+ f"git remote add origin https://x-access-token:{ token } @github.com/{ GH_ORG } /{ self .format_vars ['game_name' ]} .git" ,
46+ f"git push origin { self .name } " ,
4547 ]:
4648 assert_zero_exit_code (self .environment .execute (cmd ))
49+ print (
50+ f"Pushed { self .name } commit history to remote repository (branch { self .name } )"
51+ )
4752
4853 @abstractmethod
4954 def run (self ):
0 commit comments