Repository navigation
Match cache survives releases; v2.0.1 round-robin results - #140
Merged
Merged
Conversation
- fingerprint.py ignores the __version__ line: the release workflow rewrites utama_core/__init__.py on every merge into main, which changed every match key and emptied the cache after each merge (found when a strategy branch one release ahead reused 0 of 253 matches). Regression test included. - strategies.md: full 22-config round-robin on v2.0.1, 0 stalls, ~9 min. - STRATEGY_DEVELOPMENT.md: on a stale cache, let the round-robin run; it refills the cache for everyone. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SACGSprm9GiBueqKdxsy2j
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Version-line normalization currently affects every hashed module rather than only the release-managed package initializer.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Makes match-cache fingerprints resilient to release-only version bumps and records updated tournament guidance/results.
Changes:
- Excludes release version lines from fingerprints and adds regression coverage.
- Clarifies stale-cache refill guidance.
- Updates v2.0.1 round-robin standings.
| File | Description |
|---|---|
utama_core/replay/fingerprint.py |
Normalizes version lines before hashing. |
utama_core/tests/replay/test_fingerprint.py |
Tests release-version fingerprint stability. |
docs/STRATEGY_DEVELOPMENT.md |
Updates stale-cache guidance. |
docs/strategies.md |
Records latest tournament results. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+203
to
+204
| code = _VERSION_LINE.sub(b"", mod.source) | ||
| rows.append(f"{mod.path.relative_to(self.root).as_posix()} {_sha(code)}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

fingerprint.pyno longer hashes the__version__line. The release workflow rewritesutama_core/__init__.pyon every merge intomain, which changed every match key and emptied the--reusecache after each merge. Found whenstrategy/zone-split-shape, one release ahead of the refilled cache, reused 0 of 253 matches; with the fix the two checkouts fingerprint identically. Regression test fails without the fix.tournament_20261003_092151): 0 stalls, 129 of 231 draws, about 9 min wall on 15 workers.After merging, match keys change once more (they no longer include the version), so the first round-robin after this refills the cache, about 10 minutes.
🤖 Generated with Claude Code
https://claude.ai/code/session_01SACGSprm9GiBueqKdxsy2j