Accelerate rules-first feedback and integrate native Strongholds

Apply user priority: save/recovery/privacy/custody assurance after all rules. Add quick types/lint, concise failure-preserving reporter, verbose mode, actual empty-execution guard, signal handling and focused verify name selection; compact canonical context/handoffs without mass moves. Tooling15, six negative CLI, named/empty source-bound smokes,206 doc links; same15-case278B vs2455B,2.35s vs2.36s no compute speedclaim. Native Advanced Ix/CHOAM47-card Stronghold profile: actual firstMentat/HMS/sixeffects,18native/four legalpolicies,five genuine2..6games3129actions/no rejection, human390px LAUDR2WNv14 bank2/personal1 plan and real battle. Earlier162/6513 checks before assurance amendment; finalquick25/build/guide pass. No new preservation/privacy audit or public/deployed/full-mode claim.
This commit is contained in:
Quintine committed 2026-10-02 09:30:52 +10:00
1 parent af6d27095c
commit e9830b6ced
27 files changed
+2339 -194

No files matched your search

+43
View File
@@ -19,6 +19,7 @@ import {
resolveAssassinationBattle,
stageAssassinationBattle,
} from './moritani-assassinate-fixture';
import { createStrongholdFactionsFixture } from './fixture-stronghold-factions';
void test('Moritani Skills sample custody checks the physical skill and Traitor inventories after genuine setup', () => {
const game = completedMoritaniSkillsGame();
@@ -52,6 +53,48 @@ void test('Moritani assassination samples conserve retired Traitors after real b
duplicated.traitorReserve!.push('guild-1');
assert.throws(() => verifySampleCustody(duplicated, inventory), /physical traitor custody/);
});
void test('native Stronghold sample custody survives real end-Mentat acquisition and retained next-turn ownership', () => {
const fixture = createStrongholdFactionsFixture();
const inventory = sampleInventory(fixture.initial);
assert.equal(inventory.cards.length, 47);
assert.equal(inventory.strongholds?.length, 6);
verifySampleCustody(fixture.beforeFirstMentat, inventory);
verifySampleCustody(fixture.afterFirstMentat, inventory, fixture.beforeFirstMentat);
assert.equal(fixture.afterFirstMentat.strongholdCards!.claimedTurn, 1);
const owner = fixture.afterFirstMentat.strongholdCards!.owners.hidden_mobile_stronghold;
assert.ok(owner, 'actual end-Mentat claims the mobile card');
verifySampleCustody(fixture.beforeBattle, inventory, fixture.afterFirstMentat);
const saved = JSON.parse(JSON.stringify(fixture.game));
verifySampleCustody(saved, inventory, fixture.beforeBattle);
const missing = structuredClone(fixture.game);
delete missing.strongholdCards;
assert.throws(() => verifySampleCustody(missing, inventory), /Stronghold Cards module custody/);
const missingCard = structuredClone(fixture.game);
Reflect.deleteProperty(missingCard.strongholdCards!.owners, 'arrakeen');
assert.throws(() => verifySampleCustody(missingCard, inventory), /Each Stronghold Card/);
const foreign = structuredClone(fixture.game);
foreign.strongholdCards!.owners.arrakeen = 'not-a-seat';
assert.throws(() => verifySampleCustody(foreign, inventory), /current seat/);
const future = structuredClone(fixture.game);
future.strongholdCards!.claimedTurn = future.turn + 1;
assert.throws(() => verifySampleCustody(future, inventory), /future/);
const transferred = structuredClone(fixture.game);
const other = transferred.players.find(player => player.id !== owner)!;
transferred.strongholdCards!.owners.hidden_mobile_stronghold = other.id;
assert.throws(() => verifySampleCustody(transferred, inventory, fixture.game),
/holders must persist/);
const missingCyborg = structuredClone(fixture.game);
const ixians = missingCyborg.players.find(player => player.faction === 'ixians')!;
assert.ok(ixians.elites);
if (ixians.elites.reserves > 0) ixians.elites.reserves--;
else if (ixians.elites.tanks > 0) ixians.elites.tanks--;
else {
const location = Object.keys(ixians.elites.forces).find(key => ixians.elites!.forces[key] > 0);
assert.ok(location);
ixians.elites.forces[location]--;
}
assert.throws(() => verifySampleCustody(missingCyborg, inventory), /elite custody ixians/);
});
function fixture(advanced = false) {
let game = createGame(