Merge pull request 'fix: No generic flag dispatch: only token_value_inflation is ever zero-rated (#723)' (#797) from fix/issue-723 into master

This commit is contained in:
johba 2026-03-15 03:56:26 +01:00
commit 93b16f3b1f
2 changed files with 10 additions and 2 deletions

View file

@ -37,3 +37,4 @@
- [2026-03-14] increase CALCULATE_PARAMS_GAS_LIMIT from 200k to 500k (#782)
- [2026-03-15] add evolution run 8 champion to seed pool (#781)
- [2026-03-15] fix FitnessEvaluator.t.sol broken on Base mainnet fork (#780)
- [2026-03-15] No generic flag dispatch: only `token_value_inflation` is ever zero-rated (#723)

View file

@ -861,11 +861,18 @@ if not new_items:
# ── 5. Separate pinned (hand-written) from evolved; top-100 cap on evolved only
#
# NOTE: raw fitness values are only comparable within the same evaluation run.
# Entries with fitness_flags='token_value_inflation' (or other flags) are ranked
# Entries whose fitness_flags contain any flag in ZERO_RATED_FLAGS are ranked
# as fitness=0 so that inflated scores do not bias pool admission or eviction.
#
# ZERO_RATED_FLAGS: canonical set of flag strings that force effective_fitness=0.
# Add new inflation/distortion flags here; no other code change is required.
ZERO_RATED_FLAGS = {
'token_value_inflation',
}
def effective_fitness(entry):
flags = entry.get('fitness_flags') or ''
if 'token_value_inflation' in flags:
if any(flag in flags for flag in ZERO_RATED_FLAGS):
return 0
return int(entry.get('fitness') or 0)