Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions CONTEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ _Avoid_: "attack" used alone (ambiguous); don't conflate the operation kind
An invasion that ends without killing the queen after its cohort was committed: a
**fighter rout** (fewer than 3 of the cohort alive) or the **timeout**. An invasion
that times out before any cohort is committed (no entrance found, or the AI held it
to defend its own nest) is not repelled, nor is one that ends in a queen kill.
to defend its own nest, or that stood down to WarFooting under the need, #426) is not repelled, nor is one that ends in a queen kill.
_Avoid_: "failed invasion" (ambiguous with the pre-cohort timeout).

**Launch gate** (WarFooting → Invading):
Expand All @@ -576,7 +576,11 @@ stores, so up to V72 it could sit at home, growing, and never launch. It now
enters Invading as soon as the gate sees 32 or more; when the cohort commits, every
fighter it has then answers the rally; in playtest 4 a held army only grew, so the wave leaves
sooner and smaller. Below 32 the gate is unchanged, and so is Peacetime → WarFooting
(50 % food). The AI's raid hold defers an invasion's cohort, not the launch.
(50 % food). The AI's raid hold defers an invasion's cohort, not the launch. The gate
counts nest defenders, so a colony defending a raid can pass it and then be thinned
before the cohort commits; since **#426 (simVersion V75)** an invasion with no cohort
committed yet stands down to WarFooting (no Recovery, no floor raise) when its fighters
fall below the need, and launches only once the gate passes again.
_Avoid_: "food gate" for the whole launch gate (the food check is one of its three
tests).

Expand Down
38 changes: 19 additions & 19 deletions src/platform/__snapshots__/apply-commands-golden.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ exports[`applyCommands golden differential (byte-identity of the extraction) > C
"difficulty": "Normal",
"nextEntityId": 25,
"rngState": 2589624975,
"simVersion": 74,
"simVersion": 75,
"terrainSeed": 356124413,
"tick": 1,
},
Expand Down Expand Up @@ -839,7 +839,7 @@ exports[`applyCommands golden differential (byte-identity of the extraction) > D
"difficulty": "Normal",
"nextEntityId": 26,
"rngState": 2589624975,
"simVersion": 74,
"simVersion": 75,
"terrainSeed": 356124413,
"tick": 1,
},
Expand Down Expand Up @@ -1277,7 +1277,7 @@ exports[`applyCommands golden differential (byte-identity of the extraction) > M
"difficulty": "Normal",
"nextEntityId": 25,
"rngState": 2589624975,
"simVersion": 74,
"simVersion": 75,
"terrainSeed": 356124413,
"tick": 1,
},
Expand Down Expand Up @@ -1715,7 +1715,7 @@ exports[`applyCommands golden differential (byte-identity of the extraction) > M
"difficulty": "Normal",
"nextEntityId": 25,
"rngState": 2589624975,
"simVersion": 74,
"simVersion": 75,
"terrainSeed": 356124413,
"tick": 1,
},
Expand Down Expand Up @@ -2153,7 +2153,7 @@ exports[`applyCommands golden differential (byte-identity of the extraction) > M
"difficulty": "Normal",
"nextEntityId": 25,
"rngState": 2589624975,
"simVersion": 74,
"simVersion": 75,
"terrainSeed": 356124413,
"tick": 1,
},
Expand Down Expand Up @@ -2591,7 +2591,7 @@ exports[`applyCommands golden differential (byte-identity of the extraction) > N
"difficulty": "Normal",
"nextEntityId": 25,
"rngState": 2589624975,
"simVersion": 74,
"simVersion": 75,
"terrainSeed": 356124413,
"tick": 1,
},
Expand Down Expand Up @@ -3029,7 +3029,7 @@ exports[`applyCommands golden differential (byte-identity of the extraction) > P
"difficulty": "Normal",
"nextEntityId": 25,
"rngState": 2589624975,
"simVersion": 74,
"simVersion": 75,
"terrainSeed": 356124413,
"tick": 1,
},
Expand Down Expand Up @@ -3467,7 +3467,7 @@ exports[`applyCommands golden differential (byte-identity of the extraction) > S
"difficulty": "Normal",
"nextEntityId": 25,
"rngState": 3221460645,
"simVersion": 74,
"simVersion": 75,
"terrainSeed": 356124413,
"tick": 1,
},
Expand Down Expand Up @@ -3905,7 +3905,7 @@ exports[`applyCommands golden differential (byte-identity of the extraction) > S
"difficulty": "Normal",
"nextEntityId": 25,
"rngState": 2589624975,
"simVersion": 74,
"simVersion": 75,
"terrainSeed": 356124413,
"tick": 1,
},
Expand Down Expand Up @@ -4343,7 +4343,7 @@ exports[`applyCommands golden differential (byte-identity of the extraction) > S
"difficulty": "Normal",
"nextEntityId": 25,
"rngState": 1389894832,
"simVersion": 74,
"simVersion": 75,
"terrainSeed": 356124413,
"tick": 1,
},
Expand Down Expand Up @@ -4781,7 +4781,7 @@ exports[`applyCommands golden differential (byte-identity of the extraction) > S
"difficulty": "Normal",
"nextEntityId": 25,
"rngState": 2589624975,
"simVersion": 74,
"simVersion": 75,
"terrainSeed": 356124413,
"tick": 1,
},
Expand Down Expand Up @@ -5219,7 +5219,7 @@ exports[`applyCommands golden differential (byte-identity of the extraction) > S
"difficulty": "Normal",
"nextEntityId": 25,
"rngState": 2589624975,
"simVersion": 74,
"simVersion": 75,
"terrainSeed": 356124413,
"tick": 1,
},
Expand Down Expand Up @@ -5664,7 +5664,7 @@ exports[`applyCommands golden differential (byte-identity of the extraction) > S
"difficulty": "Normal",
"nextEntityId": 25,
"rngState": 2589624975,
"simVersion": 74,
"simVersion": 75,
"terrainSeed": 356124413,
"tick": 1,
},
Expand Down Expand Up @@ -6102,7 +6102,7 @@ exports[`applyCommands golden differential (byte-identity of the extraction) > S
"difficulty": "Normal",
"nextEntityId": 25,
"rngState": 2589624975,
"simVersion": 74,
"simVersion": 75,
"terrainSeed": 356124413,
"tick": 1,
},
Expand Down Expand Up @@ -6563,7 +6563,7 @@ exports[`applyCommands golden differential (byte-identity of the extraction) > S
"difficulty": "Normal",
"nextEntityId": 25,
"rngState": 2589624975,
"simVersion": 74,
"simVersion": 75,
"terrainSeed": 356124413,
"tick": 1,
},
Expand Down Expand Up @@ -7001,7 +7001,7 @@ exports[`applyCommands golden differential (byte-identity of the extraction) > e
"difficulty": "Normal",
"nextEntityId": 25,
"rngState": 2589624975,
"simVersion": 74,
"simVersion": 75,
"terrainSeed": 356124413,
"tick": 1,
},
Expand Down Expand Up @@ -7439,7 +7439,7 @@ exports[`applyCommands golden differential (byte-identity of the extraction) > i
"difficulty": "Normal",
"nextEntityId": 25,
"rngState": 2589624975,
"simVersion": 74,
"simVersion": 75,
"terrainSeed": 356124413,
"tick": 1,
},
Expand Down Expand Up @@ -7880,7 +7880,7 @@ exports[`applyCommands golden differential (byte-identity of the extraction) > m
"difficulty": "Normal",
"nextEntityId": 25,
"rngState": 758059162,
"simVersion": 74,
"simVersion": 75,
"terrainSeed": 356124413,
"tick": 1,
},
Expand Down Expand Up @@ -8318,7 +8318,7 @@ exports[`applyCommands golden differential (byte-identity of the extraction) > u
"difficulty": "Normal",
"nextEntityId": 25,
"rngState": 2589624975,
"simVersion": 74,
"simVersion": 75,
"terrainSeed": 356124413,
"tick": 1,
},
Expand Down
10 changes: 5 additions & 5 deletions src/platform/save.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ import {
setPoolFoodForTest,
} from '../sim/food/food-test-utils.js';
import { QUEEN_HUNGER } from '../sim/hunger.js';
import { SIM_VERSION_V74_NO_ASCENT_ONTO_BLOCKADE } from '../sim/types.js';
import { SIM_VERSION_V75_INVASION_NEED_STANDDOWN } from '../sim/types.js';
import { stageQueenInNest } from '../sim/health-test-utils.js';
import { pheromoneKeyIsSurface } from '../sim/pheromone/pheromone-store.js';

Expand Down Expand Up @@ -1278,12 +1278,12 @@ describe('save.ts (SCEN-04 + SCEN-06)', () => {
OldSimVersionError,
);
});
it('the pre-1.0 save wipe (#400 V71, #398 V72, #421 V73, #392 V74): every simVersion below MIN (V30 up) is rejected as old; MIN loads', () => {
it('the pre-1.0 save wipe (#400 V71, #398 V72, #421 V73, #392 V74, #426 V75): every simVersion below MIN (V30 up) is rejected as old; MIN loads', () => {
// Pre-1.0 policy (no simVersion gates): MIN moves with LATEST. #400 (V71) was
// the first such raise, from the V50 floor (#290 PR 2); #398 (V72), #421 (V73)
// and #392 (V74) the next — so V30..V73 report OldSimVersionError (bootFromSave
// the first such raise, from the V50 floor (#290 PR 2); #398 (V72), #421 (V73),
// #392 (V74) and #426 (V75) the next — so V30..V74 report OldSimVersionError (bootFromSave
// overwrites such a save instead of loading it).
expect(MIN_ACCEPTED_SIM_VERSION).toBe(SIM_VERSION_V74_NO_ASCENT_ONTO_BLOCKADE);
expect(MIN_ACCEPTED_SIM_VERSION).toBe(SIM_VERSION_V75_INVASION_NEED_STANDDOWN);
for (let v = 30; v < MIN_ACCEPTED_SIM_VERSION; v++) {
const snapshot = makeSavedSnapshot((s) => {
s.simVersion = v;
Expand Down
10 changes: 6 additions & 4 deletions src/platform/save.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// 6. Version-gated: bumping SAVE_FORMAT_VERSION invalidates old saves (intentional for beta)

import type { WorldState, EntityId, AIStateRecord, SpiderState } from '../sim/types.js';
import { LATEST_SIM_VERSION, SIM_VERSION_V74_NO_ASCENT_ONTO_BLOCKADE } from '../sim/types.js';
import { LATEST_SIM_VERSION, SIM_VERSION_V75_INVASION_NEED_STANDDOWN } from '../sim/types.js';
import {
AI_INVASION_FLOOR_MAX,
AI_MAX_OPERATION_FIGHTERS,
Expand Down Expand Up @@ -187,10 +187,12 @@ export class FutureSimVersionError extends Error {
* `gameVersion` carries that build's git SHA, and scripts/analyze-snapshot.ts says
* so instead of replaying.
*
* Why it is V74 today:
* Why it is V75 today:
* - V75: #426, an AI invasion stands down to WarFooting if a raid thins its army
* below the launch need before the cohort commits. Every pre-V75 save is rejected.
* - V74: #392, no civilian climbs out of its shaft onto the spider's blockade, and
* the spider's camp leash is 300 ticks (was 1200).
* Every pre-V74 save is rejected.
* Every pre-V74 save was rejected.
* - V73: #421, a full army (32 or more fighters) launches its invasion without
* the food check. Every pre-V73 save was rejected.
* - V72: #398, the AI escalates after a repelled invasion (new
Expand All @@ -206,7 +208,7 @@ export class FutureSimVersionError extends Error {
* on #290, 2026-09-25).
* - Before that: V30 (PR 6-sim's underground-embedding guards).
*/
export const MIN_ACCEPTED_SIM_VERSION = SIM_VERSION_V74_NO_ASCENT_ONTO_BLOCKADE;
export const MIN_ACCEPTED_SIM_VERSION = SIM_VERSION_V75_INVASION_NEED_STANDDOWN;

export class OldSimVersionError extends Error {
// #229 — explicit field (see SaveVersionMismatchError): strip-only Node compat.
Expand Down
Loading
Loading