MCPcopy Index your code
hub / github.com/CodeClash-ai/CodeClash / _get_commit_hash

Method _get_commit_hash

codeclash/agents/player.py:188–194  ·  view source on GitHub ↗

Get the current commit hash.

(self)

Source from the content-addressed store, hash-verified

186 def _round_message(self, round: int) -> str:
187 """Commit/tag message for a round. The tournament sets ``commit_label`` on the player config —
188 a prefix that carries its own separator (the ladder sets ``"Rung 2/50 (opponent, elo #49) — "``;
189 PvP sets ``""``). Pure concatenation, no per-mode branching here."""
190 return f"{self.config['commit_label']}Round {round} Update"
191
192 def _tag_round(self, round: int) -> None:
193 """Git tag the codebase at the given round."""
194 tag = self._get_round_tag_name(round)
195 assert_zero_exit_code(
196 self.environment.execute(f"git tag -a {tag} -m '{self._round_message(round)}'"),
197 logger=self.logger,

Callers 1

__init__Method · 0.95

Calls 2

assert_zero_exit_codeFunction · 0.90
executeMethod · 0.45

Tested by

no test coverage detected