Whether a settlement is too old to deliver as if it had just happened.
A graph stranded by a crash and found days later should still settle its run and stop showing as
Paused — but re-invoking the submitting agent on stale context, or messaging a conversation
about work that finished last week, is worse than not delivering. So an expired settlement takes
the same once-only claim and records itself as expired, which keeps the distinction visible
afterwards instead of erasing it.
A graph with no CompletedAt has not settled at all, so there is nothing to have expired.
Parameters
completedAt: Date
now: Date
windowHours: number = UNSETTLED_SWEEP_WINDOW_HOURS
Whether a settlement is too old to deliver as if it had just happened.
A graph stranded by a crash and found days later should still settle its run and stop showing as
Paused— but re-invoking the submitting agent on stale context, or messaging a conversation about work that finished last week, is worse than not delivering. So an expired settlement takes the same once-only claim and records itself asexpired, which keeps the distinction visible afterwards instead of erasing it.A graph with no
CompletedAthas not settled at all, so there is nothing to have expired.