Commit bf8bb14
authored
fix(miner): fail closed on an unparseable lease in portfolio-queue findStuckItems (#8033)
findStuckItems skipped any in_progress item whose leasedAt couldn't be parsed
(leaseAgeMs returns null -> the old 'if (ageMs === null) continue'), so a corrupted or
hand-edited lease timestamp stranded that item 'in_progress' forever, never reclaimed by
the stuck-item sweep. claim-ledger-expiry.ts's findExpiredClaims already fails closed on
the same shape post-#7732 (an unparseable claimedAt is treated as expired).
Match that posture: an item whose leasedAt is missing/unparseable is now returned as stuck
(swept back to queued) rather than silently skipped. Updated the doc comment and split the
existing test so unparseable/missing leases assert the fail-closed sweep instead of being
bundled into the 'ignored' case.
Closes #80071 parent 53ad637 commit bf8bb14
2 files changed
Lines changed: 14 additions & 6 deletions
File tree
- packages/loopover-miner/lib
- test/unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | | - | |
37 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
118 | 124 | | |
119 | 125 | | |
120 | | - | |
| 126 | + | |
121 | 127 | | |
122 | 128 | | |
123 | 129 | | |
| |||
0 commit comments