Skip to content

Add: Specify the players subsystem - #54

Open
CubeB wants to merge 7 commits into
mainfrom
spec-players
Open

CubeB wants to merge 7 commits into
mainfrom
spec-players

Conversation

@CubeB

@CubeB CubeB commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Spec writer: the behavioural spec of players, for ozgb/byte-tactics-moddable#1193.

Lead: lead-c

  • Kit: interfaces-v110 / reference-traces-v65 (b9fe223ca), interfaces/players.h 5.4. The manifest section follows the kit's players entry exactly: its exports, engine slots, imports (the pass's pathfinding, movement, ai, los_radar, units and economy imports, services.SimAlloc and services.SchedPassDeliver included), kinds, publishes, data words and 32 KB window. The entry is blocked, so by ABI 4.2 it has no budgets and the gate judges a module on the recordings alone.
  • Revision 6 (the move to v110): the condition classes by the class word table, the empty condition list by SimAlloc, the whole pass (UpdatePlayers, UpdatePlayersOnStream) with its import order, every Emit payload as the recordings now compare it, and example 8 from orders-move-attack.
  • Section 7: every example was recomputed from the spec's own definitions against the v110 recordings, and all of them reproduce (the pass's import order on all 17 ticks of orders-move-attack).
  • tools/speclint.py --kit: passes.
  • Phase 2 (leakage): every revision was approved on its diff before it was pushed; the verdicts are in the comments, revision 6's at Add: Specify the players subsystem #54 (comment)
  • Phase 1 (completeness, in the sandbox): three runs on the v68 revisions; their remaining points were kit gaps, which v110 closes (K1, K5, K6), or gate matters (payloads, now compared).
  • Kit gaps left, in section 2, "Kit gaps": K4 (the account-name tables, engine slots only), K7 (settled by the spec), K8 (a null respawned unit, which no gate can judge).

Assisted-by: Claude Code:claude-opus-5-5
@CubeB

CubeB commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator Author

Spec reviewer: phase 2 (leakage) on specs/players.md, at the head 0eed9f5

First review (on the draft): lint passes. I read every section next to its source. There is no leakage: no prose control flow beyond the import orders, no helper breakdown, no names found only in the decompilation, no C syntax, no build advice. Correctness matches the source in these places: the Body outcome table and its result rule, watch mode, the checks and the allied victory, all 18 condition classes, every refusal and outcome of Apply, the hand-over, the kill, the transfer (Q1), the rank pass (Q2), the tail, the finish and the respawn. Findings:

  1. must-fix, the respawn, step 3: the storage flag and the bonuses are written whatever unit creation returns, and a null unit is undefined, not a no-op.
  2. optional, UpdatePlayerBody: a p above 9 has no defined result in the reference; mark returning 0 as the spec's own choice.
  3. optional, the respawn: the feature test is on the low 16 bits of the result.
  4. optional, the transfer: write the clamped zero row as one condition.

changes

  • 1

Revision (the diff in this commit): lint passes. All four are resolved: the flag and the bonuses are now unconditional and the null case is K8; the choice for a p above 9 is marked under #25; the feature test is on the low 16 bits; and each transfer row is a single condition, every case under exactly one row. The changed passages have no new leakage.

approve

Assisted-by: Claude Code:claude-opus-5-5
@CubeB

CubeB commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator Author

Spec reviewer: phase 2 (leakage) on specs/players.md, revision 2 (the move to interfaces-v68), at the head e36ec21

Lint: speclint.py --kit against the v68 export (906e69ae4) passes.

  • The import table's two new rows match the v68 entry exactly: map.CanPlaceUnitFootprint [block, int, linear, int] -> int and services.RandomInt [int] -> int. Their uses in the respawn match the source: nine footprint calls per try, with the type record, other-type 0, the module's own Point16 cell and flags 1, and two draws per try, x first. The other imports, majors, exports, engine slots and publishes still match the entry.
  • blocked: true, with no reason, matches the entry.
  • The routes paragraph is right to name services.ScheduleMapCanPlaceUnitFootprint as the recorded form of the footprint import.
  • Removing K2 and K3 is right. The new imports resolve K2. The host slot needs no import, because section 3 defines it from block fields, and that definition matches the source.
  • Section 8 is re-pinned to interfaces-v68 / reference-traces-v55 (906e69ae4).

No leakage. Two optional points, a missing comma and a note on the skipped K numbers, are both taken in this commit.

approve

@CubeB

CubeB commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator Author

Spec reviewer: phase 1 (completeness, in the sandbox) on specs/players.md at e36ec21, kit interfaces-v68 / reference-traces-v55. The reviewer had only the spec and the kit. The proxy log is all on the allowlist (3 requests).

The spec writer's notes: the scratch replay matched every call of all 10 recordings on imports, result, region and writes. The only exceptions were recorder artefacts (2a). The points marked kit gap below are K1, K5, K6 and K8, posted on ozgb/byte-tactics-moddable#1193. The rest are answered in the next revision.


players spec review, phase 1

Method: I parsed all 10 recordings and modelled every slot in Python (/tmp/rv), on recorded fields. Every call matches on imports, result, region and writes, except the artefacts in 2a. Respawn, watch mode, rank pass and UpdatePlayers* come from the spec alone. No Rust was written.

1. Unanswerable from spec and kit

  • [kit gap K1] Condition class (§2, §3). The module sees only block bytes. Recordings name the class (VictoryKillAllOfType#1), never the vptr. No condition can be dispatched, so Body checks, UNIT_DIED and GIVE_UNIT are blocked. layout.json also shows a second vptr at offset 12 (DefeatAllUnitsKilled size 16), which the spec never mentions.
  • [kit gap K5, K6, K8] (§2). UpdatePlayers*, the empty condition list and a null CreateUnit are undefined. In K6 "the count 1" does not say which count, nor where the new object goes.
  • Respawn (§4).
    • Do all nine footprint calls always run, or do they stop at the first 0?
    • What if FindUnitTypeId gives 0xffff?
    • How is the position P written on i lines?
  • Watch mode, row 1 (§4). "watching set or an active AI exists; no active AI player" is circular. It does not say whether the AI count is taken before or after bit 0x40 is set, or what a null info does.
  • Game type 2 victory (§4 Checks). Is i 0–9 or 0–10? Must the player be in play?
  • KILL selfDestruct (§4). The spec says "type 1 or 2". players.h says "its owner plays". Type 3 is ambiguous.
  • Effect payloads. Recordings give only SchedPublish 4 <size>, and ScheduleEconomySpend has no arguments. selfDestruct, INCOME resources/amounts, RECALCULATE, SEND/CAPTURE contents and the EconomySpend fields are never checked.
  • RecordSimEvent kinds 19, 25, 26 are not in the spec. Only sim_events.csv has them. Recordings show kind 2 only.
  • Not in the spec's "Not covered" list (§7), and no recording covers them:
    • Body, g=1, V=1.
    • g≠1, flag case, V=1.
    • The whole g≠1, D=1 block (countdown 4 and decrement, respawn, watch).
    • A check with game type other than 1 to 3.
    • KILL_UNITS with selfDestruct 1, SET_TYPE, and the Head/Body refusal for p ≥ 10.

2. Contradictions with kit or recordings

a. §2 "Routes". It says w Game.playerIndex follows a publish. It also appears in console-economy t10 (SET_STORE, no import), mission-defeat-passes-x t0 (UNIT_CREATED) and mission-kill-of-type t180 (UNIT_DIED). The last two also have w Game.localPlayer. This is the first Apply of the file, where the write-set fields have no known value (replay-format "Lines"). It is not a delivery effect.
b. §2 and §4 Kill. The spec says effects are applied when Emit returns and later units' flags are read after the kills. No recording has o Unit#… after SchedPublish, only o rng.seed. The clause cannot be checked, and the replayer apparently does not apply effects.
c. §4 DEACTIVATE. The spec says active becomes 0. console-units t150 (lines 28023, 28923) has no w …active. A later r …active 0 shows the value did change, so the write set omits it.
d. §4 UnitsInRange. "unit n of Game.units" is correct only because Unit#N is slot N (replay-format l.112). The spec should say so, and that id 0 is not a unit.

3. Original's coding described instead of behaviour

  • §4 "A condition is met" and §6 describe scan mechanics:

    • DefeatAllUnitsKilled sets satisfied 1 then back to 0.
    • "The visits never stop early".
    • Q4's "second scan visits one unit".
    • numUnits and count are zeroed, then counted to above 1.

    These come from the visitor classes. The behaviour is "count ≤ 1".

  • Decompiler names such as field_1df2 and list_391ed.

  • Tracker and status text in §2: ozgb/btm#25/#43/#180, blocked: true and the fuel rule.

  • "p is the low byte of player".

4. Verdict

changes

  • Give a class value or number for conditions (K1) and define K6.
  • Define K5 (UpdatePlayers*).
  • Correct §2 on w Game.playerIndex and "applied when Emit returns".
  • Settle the respawn, watch-mode and game type 2 questions.
  • Extend "Not covered".
  • Say what checks effect payloads.
  • State the unit id to slot mapping.

Assisted-by: Claude Code:claude-opus-5-5
@CubeB

CubeB commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator Author

Spec reviewer: phase 2 (leakage) on specs/players.md, revision 3 (answers to phase 1), at the head 347996a

Lint: speclint.py --kit against the v68 export passes.

I read every changed passage against the source, the kit and the recordings:

  • The routes paragraph matches docs/replay-format.md ("A random draw inside an import", "Against the WASM module", "Lines") and the recordings. The w Game.playerIndex and w Game.localPlayer lines fall in each file's first Apply, and DEACTIVATE's active has no w line.
  • Sim event kinds 2, 19, 25 and 26 match interfaces/sim_events.h.
  • The second class word at bytes 12 to 15 is right for every class it names.
  • Watch mode (W), the respawn's nine calls per try, the game type 2 victory over slots 0 to 9, K6's entry and count, DefeatAllUnitsKilled as an outcome, the radius visits and selfDestruct for type 3 all match the source.
  • Every entry of the "Not covered" list is a case no recording reaches.

No leakage. One optional point, that layout.json leaves the second word unnamed and that it is K1's unknown too, is taken in this commit.

approve

@CubeB

CubeB commented Nov 28, 2026

Copy link
Copy Markdown
Collaborator Author

Spec reviewer: phase 1 (completeness, in the sandbox), second run, on specs/players.md at 347996a, kit interfaces-v68 / reference-traces-v55. The reviewer had only the spec and the kit. The proxy log is all on the allowlist (3 requests).

The spec writer's notes:

  • The scratch replay matched every one of the 6,821 calls in all 10 recordings.
  • Kit gaps (K1, K5, K6 and K8, posted on Spec: Write the players spec for btm byte-tactics-moddable#1193): items 1, 2, 3 and part of 5, and the first bullet of the verdict list.
  • Gate matters: item 7, effect fields judged only by the traces.
  • The rest is answered in revision 4: the hook point, a null conditions object, an L above 9, the respawn's argument encodings and cell mapping, example 6, the "Not covered" additions and the recorded spellings.
  • Section 3's "coding" points (the kill's single read of unitsEnd, the scan stops, the 9999 tries, the second class word) are kept: each is observable, in import order or in a stored count.

players.md phase 1 review

I wrote a scratch implementation in /tmp/rev (Python, not Rust). It covers Head, Body, Tail, Finish, Apply (all kinds except the rank pass), the conditions and Region*/Init. I replayed all 10 recordings, 6,821 calls, comparing the imports, the results and the w lines, regions included. It matched on every call. Two things made that possible. The class of each condition came from the recording's text (VictoryKillAllOfType#1), not from the block. Game.field_1df2 was read as Player#1.unitCount, as §3 says.

Several slots cannot be implemented from the spec and kit alone. They are listed below.

1. Questions I could not answer

  1. Class of a condition (K1, §2/§3). layout.json marks MissionCondition.vptr true and gives no values. A Rust module cannot tell VictoryKillAllOfType from VictoryKillUnitType from the block. This blocks the conditions, UNIT_DIED, GIVE_UNIT, V and D. The spec itself says so.
  2. Empty condition list (K6, §4 Checks). The empty-list branch needs services.SimAlloc, which is not an import in wasm/modules.json, and the class word. My scratch code can only raise there. No recording has an empty list.
  3. UpdatePlayers and UpdatePlayersOnStream (K5). Both are in exports but nothing says what the module should do. The other subsystems' steps are not imports. A trap or a no-op is a guess.
  4. Null Game.list_391ed in a check (§4 Checks). §3 says the pointer is null when there are no conditions. Only Apply handles a null object (the refusal rows). V and D with a null object are undefined. Every recording has a non-null object.
  5. Respawn and watch mode. No recording covers them.
    • The argument encodings are unknown: FindFeatureAtPos(P,0,0) with null linear arguments, GetCellMeanHeight(P), the MissionParams buffer (prefilled or not), and the footprint cell passed as a Point16 address.
    • "each in three steps of Hh and Hw" is ambiguous. I read it as offsets −H, 0 and +H, with cell x from X and cell y from Z. The spec never says which of X and Z goes to x and y.
    • A null CreateUnit result is undefined (K8).
  6. Result of the Game.localPlayer > 9 case. Body uses players[L] and §4 doesn't say what happens for 10 or more.
  7. Effect fields cannot be checked against the recordings. A publish is compared by outbox and size only, and the Spend record is not in the line (docs/module-abi.md §9.3, replay-format.md). That covers selfDestruct, the SEND/CAPTURE record copy, the INCOME amounts and the EconomySpend fields. The spec says the scenario traces judge them, but I could not test them.
  8. Outcomes no recording covers. The spec's "Not covered" list (§7) is accurate. These are not on it:
    • the UpdatePlayersFinish advance-with-0 path (all 504 Finish calls have one import and no writes);
    • PLAYERS_SET_TYPE with type 3;
    • PLAYERS_END_GAME with victory 0;
    • KILL_UNITS for player 10 and with selfDestruct 1;
    • a transfer with a NaN amount or store, and from equal to to;
    • an undersized Apply.
  9. Shutdown with g_region. §2 is fine (ABI 8.2 says g_region is 0 before Init), but Shutdown has no recording, so the "address in the block" check is untested.

2. Contradictions and gaps between the spec and the kit

  • Hooks (§2 "Hooks"). The spec says the module raises none. interfaces/players.h:26 gives GIVE_UNIT the hook UnitTransfer. ABI §6 says a re-implementation keeps a hook "as a call or an event of its own… at the same point". The spec does not say where that point is.
  • g_quirks.rankCompactionPerTick (§3 Read). The spec says it is 0 in every recording. No recording carries an r line for it, in 504 Finish calls, so the claim is unverifiable. The gate must supply a 0.
  • Game.field_1df2. The recordings only expose Player#1.unitCount. The spec's aliasing is correct and required. Without it mission-defeat-all-units tick 360 fails: field_1df2 reads 0 and VictoryDestroyAllUnits is wrongly met.
  • Field names.
    • The recordings split pos into posX, posY and posZ.
    • They carry PlayerInfo.flags_97_wide, flags_9d_wide and flags, not host, f9d_1 or bit6.
    • layout.json types id and field_1df2 as signed short, and the spec says "16 bits".
    • All of these are harmless but should be noted.
  • Example 6 (§7). It mentions only player 0's body at tick 30. In skirmish2.txt player 1's body also gives 2.
  • Q1 and the import table (§2). SendShareMetal is described as the energy send. That matches the recordings and network.h (kind 1, "called metal by the sharing code"), but the names read inverted.

3. Where the spec describes the original's coding rather than its behaviour

  • K8 and §4 respawn. "The reference reads the new unit… without a test", "nine calls all nine on every try", Q5 (the footprint offsets by the whole map's size) and the "9999 tries" are reproductions of the original's structure. If they are observable they should be stated as imports, not as loops.
  • Kill (§4). "unitsEnd is read once" and "flags are read after the kills before it" describe a loop.
  • Scans. "stops after the first visit that says stop", numUnits and count capped at 2, and the Q4 second scan visiting one unit describe the original's loop. The observable behaviour is the stored count and the imports.
  • Rank pass (§4, Q2). "for each place i… goes on to i+1" is an algorithm. Q2 admits it takes more than one pass to close a run of gaps.
  • §3. The unused "second class word" in bytes 12 to 15 describes the original's object layout.

4. Verdict

changes

  • Resolve the class of each condition (K1) and the empty-list allocation (K6).
  • Define UpdatePlayers and UpdatePlayersOnStream (K5).
  • Define V and D for a null conditions object, and players[L] for L > 9.
  • Specify the respawn imports' argument encodings, the footprint cell mapping and the null-unit path (K8).
  • Say where the UnitTransfer hook goes.
  • Add the uncovered outcomes in item 8 to the "Not covered" list.

Assisted-by: Claude Code:claude-opus-5-5
@CubeB

CubeB commented Nov 28, 2026

Copy link
Copy Markdown
Collaborator Author

Spec reviewer: phase 2 (leakage) on specs/players.md, revision 4 (answers to the second phase 1 run), at the head 8b7e813

Lint: speclint.py --kit against the v68 export passes.

I read every changed passage against the source, the kit and the recordings:

  • The UnitTransfer hook point is the Apply of a PLAYERS_GIVE_UNIT, as ABI 6 "Hook points" says.
  • An L outside 0 to 9, and a null conditions object in the checks, have no defined result in the reference. The 0 the spec gives for the null object is marked as its own choice under Spec: Reject a malformed effect at delivery #25.
  • The respawn's nine cells, their order, the Point16 passed by address and the x/y mapping match the source. So do the arguments of FindFeatureAtPos, GetCellMeanHeight and GetMissionParams.
  • Example 6 (players 0 and 1 both give 2), the recorded spellings, and each "Not covered" addition were checked against the recordings.

No leakage.

approve

@CubeB

CubeB commented Nov 28, 2026

Copy link
Copy Markdown
Collaborator Author

Spec reviewer: phase 1 (completeness, in the sandbox), third run, on specs/players.md at 8b7e813, kit interfaces-v68 / reference-traces-v55. The reviewer had only the spec and the kit. The proxy log is all on the allowlist (3 requests).

The spec writer's notes:

  • The scratch replay matched every call of all 10 recordings.
  • Kit gaps: items 1 to 3 (K1, K6, K5), item 7 (the kit gives no way to raise a hook), and the null-unit part of item 9 (K8).
  • Gate matters: item 8 (rows no recording reaches, effect fields compared by size only), and the second bullet of section 2.
  • Answered in revision 5: item 4 (the info of slot 10), item 5 (writes before an Emit), item 6 (kind 18 reaches Apply as a TRANSFER), and item 9's FindUnitTypeId 0, the ids an answer gives, and the bits of the recorded words.
  • Kept, each with its reason:
    • K7: an outcome 0 for a refused event is the kit's general rule.
    • Q1: it is how the header names the sends.
    • Section 3's naming points: field_1df2 and the marker are kit names and observable values; the scan stops, the second word and "no defined result" are observable behaviour or the limits of it.

players spec, phase 1 review

Method: I wrote a Python model of every slot (/tmp/rev) and replayed all 10 recordings call by call. It matched on imports (name, arguments, order), results, w lines and region bytes. The one exception is DEACTIVATE_CONDITIONS in console-units at tick 150, where the recording has no w for active, as spec §2 says. The model has no Wasm and no block memory, and it takes each condition's class from the recording's object name. So the pointer and layout questions below are untested.

1. Cannot be answered from spec + kit

  1. K1, class of a condition. layout.json MissionCondition has vptr true and no value, and the recordings give only the object name. A module can't tell the classes apart (§3, §4 "Checks"). This blocks the build.
  2. K6, empty list. It needs an allocation and a class word. The entry has no SimAlloc (§2 imports) and the README says there is no allocator. This can't be written.
  3. K5, UpdatePlayers and UpdatePlayersOnStream. They are exported (modules.json), but the other subsystems' steps aren't imports and no recording holds them.
  4. Player 10's info (§4 respawn H, watch players[h].info, host slot). "The record past the ten players" could be players_1b63[10].info (a possibly null Ref) or Game.infos[10]. No recording names an eleventh PlayerInfo.
  5. Write order against synchronous delivery. The watch-mode table doesn't say whether the 0x40 flag and the map-flag clear precede Emit RECALCULATE. los_radar reads both (sim-events.md Terms). The same question applies to the respawn's flag and bonus writes against CreateUnit and its Emits.
  6. Kind 18. routes.csv:13 and economy.h queue ECONOMY_EFFECT_SHARE to players. The spec's "any other kind: 0" (§4 Apply) never mentions it.
  7. UnitTransfer hook. ABI §6 says to keep a hook "as a call or an event of its own". §2 says the module raises none, and the kit gives no way to raise one.
  8. No recording covers:
    • the respawn and watch mode;
    • Body rows with D=1 outside type 1, V=1 in type 1, and the flag-0x40 rows;
    • the Finish countdown and rank pass;
    • SET_CHEATS, LEAVE_GAME, COMPACT_RANKS;
    • every Apply refusal and short size;
    • SEND_UNIT and the hand-over refusals;
    • an unannounced or zero transfer;
    • nine condition classes;
    • a second UnitsInRange call;
    • Shutdown and DeactivateConditions;
    • GIVE_UNIT with record.present 1. Every recorded record is all zero and publishes are compared by size only, so the nine record words are unchecked.
  9. Smaller gaps:
    • K8, a null CreateUnit result, and a null u.player, def or info in the notices.
    • FindUnitTypeId returns 0 for none (units.h). The spec never says so.
    • Whether "every id of every answer" means result ids or 256.
    • §3 doesn't map recording names to PlayerInfo bits: flags_97_wide is host, flags is bit6 and watching, flags_9d_wide is f9d_1. I read it from layout.json.

2. Contradictions

  • §4 Apply makes DEACTIVATE_CONDITIONS with a null C outcome 0 (K7). players.h says "outcome 1", with no refusal.
  • The null-C check result 0 and the p > 9 result 0 (Spec: Reject a malformed effect at delivery #25) are the spec's own choices. No recording can test them.
  • network.h calls SendShareMetal "kind 1 (called metal)". The spec's Q1 and the recordings have it carry energy. The recordings back the spec, so the header comment misleads.

3. Reads as code, not behaviour

  • Game.field_1df2 (§3, §4) is a decompiler name for player 1's unitCount. No recording ever shows it; they show Player#1.unitCount.
  • The 0x12345678 marker in pos.y is an in-band sentinel. The behaviour is "not yet clamped".
  • The scan wording ("stops after the first visit that says stop") and the "second class word" at bytes 12–15 (a UnitScanVisitor vptr) describe the original class layout.
  • "The reference reads the new unit without a test" (K8) and "the reference has no defined result" describe the reference's code, not its behaviour.

4. Verdict

changes:

  • (a) K1 and K6: the class word and an allocator are missing.
  • (b) K5: whole-pass imports are missing.
  • (c) player 10's info (item 4).
  • (d) write order in watch mode and the respawn (item 5).
  • (e) the kind-18 route and the UnitTransfer hook (items 6, 7).
  • (f) the uncovered rows (item 8): add recordings or mark them untested.
  • (g) the §3 wording.

Assisted-by: Claude Code:claude-opus-5-5
@CubeB

CubeB commented Nov 28, 2026

Copy link
Copy Markdown
Collaborator Author

Spec reviewer: phase 2 (leakage) on specs/players.md, revision 5 (answers to the third phase 1 run), at the head 777e43a

Lint: speclint.py --kit against the v68 export passes.

I read every changed passage against the source, the kit and the recordings:

  • Writes made before an Emit are in the block when the effect is delivered. Watch mode's order is right: info flag 0x40 and the map flags come before the RECALCULATE, and endGameVictory after the last import. So is the respawn's: the flag and the bonuses come after CreateUnit and before the first INCOME.
  • H for host slot 10 is element 10 of Game.players_1b63.
  • Kind 18 reaches Apply only as the announced TRANSFER the engine builds from a SHARE.
  • The radius visits cover the first count ids of each answer.
  • The bits of the recorded PlayerInfo words, and FindUnitTypeId's 0 for no type, match the kit.

No leakage. Two optional wording points, the binding of n in the radius row and section 3's description of Game.players_1b63, are taken in this commit.

approve

Assisted-by: Claude:claude-opus-5-5
Assisted-by: Claude:claude-opus-5-5
@CubeB

CubeB commented Nov 30, 2026

Copy link
Copy Markdown
Collaborator Author

Spec reviewer: phase 2 (leakage) on specs/players.md, revision 6 (the move to interfaces-v110), at the head 75abbc8

Lint: speclint.py --kit against the v110 export (b9fe223ca) passes.

I read every changed passage against the source, the kit and the recordings:

  • The new majors (pathfinding 4, movement 5, ai 6) and every new import row match the v110 entry exactly.
  • The pass matches the source step for step: Step; the Poll loop (event buffer zeroed each round, Poll(event, 28, points, 64), stop below 20 signed, ApplyPathEvent with min(n, 28)); each player's deliveries and imports in order; both skips (head 0, body 0); economy only for a body of 2; the line of sight loop (unitsBegin once, unitsEnd before each unit, stride 280, the 0x10000000 flag alone); Game.playerIndex read at the two places given; deliver 4 and the finish. The module ids match the kit's "The phase driver".
  • The empty list: a count of 0 inside game type 1, straight after the check's GetGameType; SimAlloc(12) with entry 34, SimAlloc(16) with entries 6 and 7. The allocation is zeroed by the kit's services.
  • All 18 class word entries and the ten base entries match class_words of layout.json.
  • The Emit payload forms match every i services.Emit line of tests/replay/players/.
  • Example 8 matches orders-move-attack.txt line for line at ticks 180 and 181.
  • No stale reference to K1, K5, K6 or SchedPublish remains; section 8 is re-pinned.

No leakage. The numbered pass is an ordered list of import calls, which the gate compares, and naming UpdatePlayers the driver of the head, body, tail and finish is kit knowledge.

Optional points: (1) drop "n compared unsigned" in the Poll step; (2) the zeroing wording of the event buffer could be cut back; (3) drop "an empty slot has it clear"; (4) mark the head, body, tail and finish rows of the slot table as inside UpdatePlayers.

approve


The spec writer: points 1, 3 and 4 are taken in e73fb64. Point 2 is kept: it pins the bytes ApplyPathEvent gets past a short answer. Example 8 and every other example were recomputed against the v110 recordings, and all reproduce.

@CubeB

CubeB commented Nov 30, 2026

Copy link
Copy Markdown
Collaborator Author

Spec reviewer: phase 2 (leakage) on specs/players.md, revision 7 (the optional wording points of revision 6), the diff 75abbc8..e73fb64, at the head e73fb64

Lint: speclint.py --kit against the v110 export passes.

I read each changed passage beside the source:

  • The slot rows' "(inside UpdatePlayers, section 4)" is right: the head, body and tail run in the pass's per-player loop and the finish after it. Naming the driver is kit knowledge ("The phase driver"), and the rows add no control flow, no decompilation name and no reason.
  • The UpdatePlayerBody row's dropped docs/schedule.md citation loses nothing: the UpdatePlayers row still cites it.
  • Dropping "(n compared unsigned)" loses no behaviour: min(n, 28) is reached only with n at least 20, where signed and unsigned agree.
  • Dropping "(an empty slot has it clear)" loses no behaviour: the step still says the test is the 0x10000000 flag alone.

No leakage.

Optional: (1) point the rows at section 4's UpdatePlayers(), UpdatePlayersOnStream(stream) subsection; (2) name UpdatePlayersOnStream in the rows too, since the load run drives the same slots (that subsection already says so, so this is not a correctness defect).

approve


The spec writer: both optional points are left as they are, so the approved text stays the spec head.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant