Compose the deferred Terror arrival and green the mixed E3 programmes

Queue a committed Terror entry whose arrival also opened its own
interaction — Guild income, a Bene Gesserit fighter Intrusion or advisor
choice, or Fremen storm protection — in the additive
Game.pendingArrivalReaction list, and open the oldest queued entry from
settleAutomaticContinuations once nothing is pending. Payment, force
transfer and the original movement never replay; a Terror entry already in
flight and every Ambassador combination still reject.

Both withdrawn mixed E3 programme pairs are green: Moritani 9/9 and Ecaz
14/14, stable across 20 consecutive full-file runs. Their recorded resume
constraints became real fixture repairs, and the two restored consumer
omissions were corrected against the engine rather than re-pinned.

Repair pre-existing failures inherited at 45e6084 against current engine
behavior: stale Discovery and module gates in the native skills, Ix and
expansion-faction prototypes, the advanced Moritani skill boundary, the
Richese Nexus betrayal sale-credit expectation, one incidental gate
message and one flaky Collection-readiness assertion that reproduced at
HEAD.

Offline suite 7,793/7,793 with typecheck and lint clean. No game, seat,
saved-state, deployment, public-start or played-save conversion changes.
This commit is contained in:
Quintine committed 2026-10-07 17:24:23 +11:00
1 parent 45e6084424
commit e05a205a47
30 files changed
+2467 -117

No files matched your search

+17 -4
View File
@@ -83,7 +83,7 @@ void test('Homeworld-sourced AI shipments avoid unsupported paired entry reactio
assert.equal(botArrivalBlock(ownView(game), action), null);
});
void test('Guild cross-planet transport avoids a Terror arrival blocked by its Guild income response', () => {
void test('Guild cross-planet transport ships into a Terror arrival from its committed income response', () => {
const game = shipmentArrivalGame();
const bg = arrivalPlayer(game, 'bg');
const guild = arrivalPlayer(game, 'guild');
@@ -97,11 +97,22 @@ void test('Guild cross-planet transport avoids a Terror arrival blocked by its G
game.moritaniTerror = placeTerror(terror, terror.tokens[0].id, 'carthag', 2);
const action: Action = { type: 'guildShip', from: 'sietch_tabr:14', amount: 2,
territory: 'carthag', sector: 11 };
assert.throws(() => applyAction(game, bg.id, action), overlap);
const before = JSON.stringify(game);
// Guild income from the ally went to the bank with nothing left pending, so the
// supported Terror entry opens in the same commit as the shipped forces.
const shipped = applyAction(game, bg.id, action);
const arrived = arrivalPlayer(shipped, 'bg');
assert.deepEqual(arrived.forces, { 'carthag:11': 2 });
assert.equal(arrived.shipped, true);
assert.equal(shipped.decision?.kind, 'moritaniTerror');
assert.equal(shipped.pendingTerrorEntry?.cause, 'guildTransport');
assert.equal(shipped.pendingArrivalReaction ?? null, null);
assert.equal(shipped.response ?? null, null);
assert.match(shipped.log.at(-1)!.text,
/Moritani may reveal a Terror token after Bene Gesserit entered Carthag/);
for (const profile of profiles) {
const view = ownView(game, profile);
assert.match(botArrivalBlock(view, action) ?? '', overlap);
assert.equal(botArrivalBlock(view, action), null);
const choices = botActions(view);
assert.ok(choices.length, profile);
assert.equal(choices.some(candidate => candidate.type === 'guildShip' &&
@@ -113,7 +124,9 @@ void test('Guild cross-planet transport avoids a Terror arrival blocked by its G
funded.aid[guild.id] = { recipient: bg.id, amount: 1 };
const guildPaid = { ...action, allyPayment: 1 };
assert.equal(botArrivalBlock(ownView(funded), guildPaid), null);
assert.ok(applyAction(funded, bg.id, guildPaid));
const paid = applyAction(funded, bg.id, guildPaid);
assert.equal(paid.decision?.kind, 'moritaniTerror');
assert.equal(paid.pendingTerrorEntry?.cause, 'guildTransport');
});
void test('single reactions and matching-faction Ambassador immunity remain playable', () => {