Allow group actions after settled Truthtrance
Verify and publish checkpoint container / container (push) Canceled after 0s

This commit is contained in:
Quintine committed 2026-10-29 00:12:09 +11:00
1 parent 9cc659602c
commit 420943b890
8 files changed
+135 -5

No files matched your search

+39
View File
@@ -65,6 +65,45 @@ void test('native pair expands only after three separate group approvals', () =>
assert.deepEqual(game.ready, []);
});
void test('fulfilled and released Truthtrance records do not prevent group Nexus negotiation', () => {
for (const history of ['settled', 'prior-turn'] as const) {
const game = originalPair();
// Stage only the public history; pair, proposal and answers are real actions.
game.bribePromises = [{event: `bribe-${history}`, player:'d', asker:'a',
turn:history === 'prior-turn' ? game.turn - 1 : game.turn,
recipient:'c', minimum:1, answer:true, progress:history === 'settled' ? 1 : 0,
...(history === 'settled' ? {fulfilled:true} : {released:true})}];
game.alliancePromises = [{event:`alliance-${history}`, source:'old-nexus',
player:'d', asker:'a', turn:game.turn - 1, partner:'c', answer:false, fulfilled:true}];
assert.ok(viewGame(game, 'a').coalitionNexus, 'Old answers do not hide the group controls.');
let formed = propose(game);
formed = answer(formed, 'b'); formed = answer(formed, 'c');
assert.deepEqual(coalitionOf(formed.players, formed.coalitionState, 'a')!.members, ['a','b','c']);
assert.deepEqual(formed.bribePromises, game.bribePromises);
assert.deepEqual(formed.alliancePromises, game.alliancePromises);
}
});
void test('an unresolved prior-turn Truthtrance record still blocks group Nexus', () => {
const game = originalPair();
game.bribePromises = [{event:'unreconciled-bribe', player:'d', asker:'a', turn:game.turn - 1,
recipient:'c', minimum:1, answer:true, progress:0}];
assert.equal(viewGame(game, 'a').coalitionNexus, null);
const pair = coalitionOf(game.players, game.coalitionState, 'a')!;
rejected(game, 'a', {type:'coalitionPropose', groupId:pair.id, entrant:'c',
expectedRevision:game.coalitionState!.revision});
});
void test('a current unanswered group-incompatible Truthtrance commitment still blocks group Nexus', () => {
const game = originalPair();
game.bribePromises = [{event:'live-bribe', player:'d', asker:'a', turn:game.turn,
recipient:'c', minimum:1, answer:true, progress:0}];
assert.equal(viewGame(game, 'a').coalitionNexus, null);
const pair = coalitionOf(game.players, game.coalitionState, 'a')!;
rejected(game, 'a', {type:'coalitionPropose', groupId:pair.id, entrant:'c',
expectedRevision:game.coalitionState!.revision});
});
void test('any participant may decline and the original pair remains unchanged', () => {
const original = originalPair();
const pending = propose(original);