A bundle of small rules-vs-engine corrections:
- Science proportions: accept a sum that equals 1 only up to float
rounding (was an exact != 1 comparison); the rules example is reworded
so it is unambiguous that proportions are fractions summing to 1.
- Generation: super-big planets get a resource strictly above 0 (minimum
0.001, was a hard 0.1); the rules table is fixed for big planets (1-10,
not 0.1-10) and the false "0.1-20 / average 1.5" resource claim removed.
- Dismantle over a neutral planet now unloads the colonists and settles
it (the planet becomes the race's); over a foreign planet they are
still lost. The rules clause is clarified for own / neutral / foreign.
- Report: ship-production entries are written at the compacted report
index (was the planet's map index, which could write past the grown
slice and panic); the incoming-group "remaining distance" is measured
from the group's current hyperspace position, not its origin planet
(matching OtherGroup).
- validator: the cargo-value error now carries the cargo value, not the
shields value.
Tests added for each behavioural fix; rules.txt updated in the same patch.
`RandomName` builds the suffix as two independent `rand.Intn(1000)`
calls, so the two 4-digit halves collide on ~0.1% of runs. The
sub-test asserted `g[2] != g[3]`, which flakes whenever the same
value lands twice — once per ~1000 sub-runs per class, so across
the seven `PlanetClass` rows the integration suite hit it on
`#199 go-unit.yaml` against `feature/subscribe-events-heartbeat`
(`"0074"` collision).
Distinctness is not a property `RandomName` promises and is not
load-bearing for callers: `game/internal/controller/generate_game.go`
uses these names for planet labels and already tolerates duplicate
names across planets, so collisions inside one name are no worse
than collisions between names. Drop the assert; keep the format and
class-prefix checks, which are the actual contract.
Stress-tested with `-count=200`: 200 consecutive iterations × 7
classes = 1400 sub-runs without a single failure where the prior
version's flake probability would have surfaced ~once on average.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>