test(export): require actual per-origin publication expiry

Closes the catch-up review finding that unwitnessed pending latches could be labeled expired using only submission-based run targets. Require accepted history to pass the latch deadline; equality remains live.
This commit is contained in:
Nicholas Dudfield
2026-09-23 17:08:20 +07:00
parent bef502f6df
commit 005a85a4d1
2 changed files with 16 additions and 1 deletions

View File

@@ -5134,7 +5134,9 @@ class SteppingExtensions_test : public beast::unit_test::suite
<< " witness only on node " << n << std::endl;
return false;
}
auto const ledger = net.ledger(0, net.validSeq(0));
// Classify against history accepted by every node, not a faster
// node's tip or the intent submission time. Admission can be late.
auto const ledger = net.ledger(0, net.minValidatedSeq());
if (!ledger)
return false;
auto const latch =
@@ -5147,6 +5149,15 @@ class SteppingExtensions_test : public beast::unit_test::suite
<< " neither witnessed nor retained" << std::endl;
return false;
}
if (!latch->isFieldPresent(sfLastLedgerSequence) ||
ledger->seq() <= latch->getFieldU32(sfLastLedgerSequence))
{
log << " seeded-mix red " << schedule << " " << tag
<< " unwitnessed origin has not passed its publication "
"window"
<< std::endl;
return false;
}
log << " seeded-mix " << schedule << " " << tag << "=expired"
<< std::endl;
return true;

View File

@@ -822,6 +822,10 @@ class ThreadedExtensions_test : public beast::unit_test::suite
<< " expired shape=" << shape << std::endl;
if (!latch)
return fail("latch missing");
if (!latch->isFieldPresent(sfLastLedgerSequence) ||
ledger->seq() <= latch->getFieldU32(sfLastLedgerSequence))
return fail(
"unwitnessed origin has not passed its publication window");
if (hasSig)
return fail("expired latch has a signature hash");
if (hasNode != inDir)