reporting-governance: document single-notice settlement guardrail

This commit is contained in:
Eve
2026-05-08 12:16:15 +08:00
parent a188b0390a
commit 36bc00cc3f
3 changed files with 70 additions and 0 deletions

View File

@@ -282,6 +282,52 @@ test('truth-state promotion guardrail: mixed terminal outcomes must not promote
}), false);
});
test('runtime-integrated mixed outcome: acked + pending keeps overall truth state non-acked', () => {
const governance = executeRuntimeIntegratedGovernance(createBaseArgs());
const promoted = runtimeIntegratedTestables.promoteTruthStateFromRuntime(governance, {
attempted: true,
runtimeExecution: {
result: {
supervisor: {
ackedCount: 1,
pendingCount: 1,
blockedCount: 0,
},
},
},
});
assert.equal(promoted.contract.delivery_state, 'pending_external_send');
assert.equal(promoted.contract.receipt_status, 'planned');
assert.equal(promoted.planning.receipt.delivery_state, 'pending_external_send');
assert.equal(promoted.planning.receipt.status, 'planned');
assertNoAckedOrFinalDeliveredClaim(promoted);
});
test('runtime-integrated mixed outcome: acked + blocked keeps overall truth state non-acked', () => {
const governance = executeRuntimeIntegratedGovernance(createBaseArgs());
const promoted = runtimeIntegratedTestables.promoteTruthStateFromRuntime(governance, {
attempted: true,
runtimeExecution: {
result: {
supervisor: {
ackedCount: 1,
pendingCount: 0,
blockedCount: 1,
},
},
},
});
assert.equal(promoted.contract.delivery_state, 'pending_external_send');
assert.equal(promoted.contract.receipt_status, 'planned');
assert.equal(promoted.planning.receipt.delivery_state, 'pending_external_send');
assert.equal(promoted.planning.receipt.status, 'planned');
assertNoAckedOrFinalDeliveredClaim(promoted);
});
test('truth-state promotion guardrail: only fully acked observed terminal set may promote to acked', () => {
assert.equal(runtimeIntegratedTestables.canPromoteAckedFromSupervisor({
ackedCount: 0,