Make the v0.30 stability/gathering mechanic a visible world change: a new TurnResult.takeovers field carries non-military regime changes (coups / revolutions) that automatically rename the target nation — no player confirm (that stays the domain of nationOps rename).
shared/protocol.ts: new Takeover = { nationRef, newRegimeName }; TurnResult.takeovers required (default []), between nationOps and markers
server/engine.ts:
validateTakeovers — defensive (non-array → [], non-empty trimmed ref + name, 200-char cap, never throws); nationRef resolved at apply time via resolveNationRef (unknown/ambiguous → no-op)
applyTurnResult applies takeovers after the per-region recompute, before markers: only n.name changes — stable id, territory, relations, stats, and playerNationId all preserved (the player keeps leading an overthrown nation under its new regime)
isMeaningful counts a takeovers-only turn; buildSystemPrompt documents the field (automatic, NOT player-confirmed) tied to the stability < 30 + gathering mechanic; the runTurn "unclear" fallback carries takeovers: []
server/stub.ts: returns takeovers: [] (never performs a takeover) — one-conquest behavior and all e2e assertions untouched
Client: no change (a takeover is a plain name change; nations keep their stable id-keyed color)
15 new unit tests (apply: rename-with-preservation / player takeover / unknown ref / ambiguous ref / empty name / multiple / single version bump / case-insensitive name; isMeaningful; system-prompt contract both modes; validateTakeovers; stub) + takeovers: [] on every existing TurnResult literal
Version bump 0.32.0 + changelog
Local gates: typecheck, lint, 322 unit tests (14 files), build all green.
Make the v0.30 stability/gathering mechanic a *visible* world change: a new `TurnResult.takeovers` field carries non-military regime changes (coups / revolutions) that **automatically rename** the target nation — no player confirm (that stays the domain of `nationOps` rename).
- `shared/protocol.ts`: new `Takeover = { nationRef, newRegimeName }`; `TurnResult.takeovers` required (default `[]`), between `nationOps` and `markers`
- `server/engine.ts`:
- `validateTakeovers` — defensive (non-array → `[]`, non-empty trimmed ref + name, 200-char cap, never throws); `nationRef` resolved at apply time via `resolveNationRef` (unknown/ambiguous → no-op)
- `applyTurnResult` applies takeovers after the per-region recompute, before markers: only `n.name` changes — stable id, territory, relations, stats, and `playerNationId` all preserved (the player keeps leading an overthrown nation under its new regime)
- `isMeaningful` counts a takeovers-only turn; `buildSystemPrompt` documents the field (automatic, NOT player-confirmed) tied to the stability < 30 + `gathering` mechanic; the `runTurn` "unclear" fallback carries `takeovers: []`
- `server/stub.ts`: returns `takeovers: []` (never performs a takeover) — one-conquest behavior and all e2e assertions untouched
- Client: no change (a takeover is a plain name change; nations keep their stable id-keyed color)
- 15 new unit tests (apply: rename-with-preservation / player takeover / unknown ref / ambiguous ref / empty name / multiple / single version bump / case-insensitive name; isMeaningful; system-prompt contract both modes; validateTakeovers; stub) + `takeovers: []` on every existing `TurnResult` literal
- Version bump 0.32.0 + changelog
Local gates: typecheck, lint, 322 unit tests (14 files), build all green.
Fixes #54
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Make the v0.30 stability/gathering mechanic a visible world change: a new
TurnResult.takeoversfield carries non-military regime changes (coups / revolutions) that automatically rename the target nation — no player confirm (that stays the domain ofnationOpsrename).shared/protocol.ts: newTakeover = { nationRef, newRegimeName };TurnResult.takeoversrequired (default[]), betweennationOpsandmarkersserver/engine.ts:validateTakeovers— defensive (non-array →[], non-empty trimmed ref + name, 200-char cap, never throws);nationRefresolved at apply time viaresolveNationRef(unknown/ambiguous → no-op)applyTurnResultapplies takeovers after the per-region recompute, before markers: onlyn.namechanges — stable id, territory, relations, stats, andplayerNationIdall preserved (the player keeps leading an overthrown nation under its new regime)isMeaningfulcounts a takeovers-only turn;buildSystemPromptdocuments the field (automatic, NOT player-confirmed) tied to the stability < 30 +gatheringmechanic; therunTurn"unclear" fallback carriestakeovers: []server/stub.ts: returnstakeovers: [](never performs a takeover) — one-conquest behavior and all e2e assertions untouchedtakeovers: []on every existingTurnResultliteralLocal gates: typecheck, lint, 322 unit tests (14 files), build all green.
Fixes #54