fix: state setup? on the player row that already carries it #112

Merged
sickday merged 2 commits from fix/tick-snapshot-setup-key into main 2026-08-04 14:29:13 +00:00
Owner

World.TickSnapshot.put_player/3 writes nine keys onto a player row and two
places said eight: t:World.TickSnapshot.player_row/0, and the guard test that
exists so that nobody adds a field to that row quietly. setup? — the fact
Contract.Aggression reads to leave a player who has not finished first-login
setup alone — arrived without either being told.

The test is the visible half and was red on main. The type is the half with
teeth: an Elixir map type is closed unless it says otherwise, so a nine-key row
against an eight-key contract is a mismatch that nothing at runtime will ever
report and that a green suite cannot see.

Both now name the field, and the typedoc says three facts ride this row rather
than two, with the reason unchanged — the aggression scan is a point lookup per
shortlisted candidate, the same access pattern as an encoder against the same
row.

World.TickSnapshotTest passes. Nothing else is touched.

`World.TickSnapshot.put_player/3` writes nine keys onto a player row and two places said eight: `t:World.TickSnapshot.player_row/0`, and the guard test that exists so that nobody adds a field to that row quietly. `setup?` — the fact `Contract.Aggression` reads to leave a player who has not finished first-login setup alone — arrived without either being told. The test is the visible half and was red on `main`. The type is the half with teeth: an Elixir map type is closed unless it says otherwise, so a nine-key row against an eight-key contract is a mismatch that nothing at runtime will ever report and that a green suite cannot see. Both now name the field, and the typedoc says three facts ride this row rather than two, with the reason unchanged — the aggression scan is a point lookup per shortlisted candidate, the same access pattern as an encoder against the same row. `World.TickSnapshotTest` passes. Nothing else is touched.
fix: state setup? on the player row that already carries it
All checks were successful
ci / gates (pull_request) Successful in 51s
64f0279f09
The aggression scan's third fact was added to the row written by
put_player/3 without being added to either place that says what the row
holds: player_row named eight keys where nine are written, and the guard
test that exists to make anyone adding a field say so out loud was left
red rather than answered.

The type is the one with teeth. An Elixir map type is closed unless it
says otherwise, so a nine-key row against an eight-key contract is a
mismatch nothing at runtime would ever report.
Merge branch 'main' into fix/tick-snapshot-setup-key
All checks were successful
ci / gates (pull_request) Successful in 56s
build / image (push) Successful in 28s
ci / gates (push) Successful in 55s
380865f44a
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Revenant/Server!112
No description provided.