• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

cameri / nostream / 47647546548
81%

Build:
DEFAULT BRANCH: main
Ran 06 Dec 2026 12:12PM UTC
Jobs 2
Files 355
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

06 Dec 2026 12:08PM UTC coverage: 81.162% (+0.02%) from 81.143%
47647546548

push

github

web-flow
fix(peering): resume the lifecycle sweep after the last row read (#1399)



<!--- Provide a general summary of your changes in the Title above -->

## Description
<!--- Describe your changes in detail -->
The peering lifecycle sweep now resumes **after the last row it read**
instead of after the rows it could not handle.

`sweep()` used the number of skipped rows as the SQL `OFFSET`:

```ts
let skipped = this.cursors[name]
const payments = await find(SWEEP_PAGE_SIZE, skipped)
...
if (handled) changed++
else skipped++          // only skipped rows advanced the offset
```

A renewal does not remove its row from `findDueForRenewal`:
`ensureInvoice({ renewal: true })` only sets `status = RENEWAL_PENDING`
and `renewal_invoice_id`, while `period_end` stays where it was. So a
**handled** row stayed in the result set and `skipped` never advanced.
Every page re-read the same first ten rows, and every peer behind them
was never sent a renewal — then `processLapses` dropped them to `LAPSED`
at period end.

Simulating the loop with 25 due peers:

```
processed slots: 100   unique peers: 10   starved: 15
```

## Related Issue
<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an
issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps
to reproduce -->
<!--- Please link to the issue here: -->
Closes - #1396 

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

## Screenshots (if appropriate):

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [ ] Non-functional change (docs, style, minor refactor)
-... (continued)

6562 of 8714 branches covered (75.3%)

Branch coverage included in aggregate %.

22 of 22 new or added lines in 2 files covered. (100.0%)

13287 of 15742 relevant lines covered (84.4%)

705.01 hits per line

Jobs
ID Job ID Ran Files Coverage
1 Integration - 47647546548.1 06 Dec 2026 12:12PM UTC 355
36.69
GitHub Action Run
2 Unit - 47647546548.2 06 Dec 2026 12:12PM UTC 355
79.31
GitHub Action Run
Source Files on build 47647546548
  • Tree
  • List 355
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #47647546548
  • 1cc68764 on github
  • Prev Build on main (#47431991937)
  • Next Build on main (#47654230917)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc