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

archetech / archon / 34071591823
87%

Build:
DEFAULT BRANCH: main
Ran 07 Sep 2026 01:05AM UTC
Jobs 1
Files 93
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

07 Sep 2026 01:00AM UTC coverage: 92.497% (+0.008%) from 92.489%
34071591823

push

github

web-flow
fix(mediators): Bound the reorg rewind instead of restarting the scan (#1065)

* fix(mediators): Bound the reorg rewind instead of restarting the scan

A reorg near the tip discarded the whole scan window. The rewind followed the
orphaned chain by previousblockhash -- the blocks a node is least likely to
still hold -- and the first fetch that threw fell through to a reset back to
config.startBlock with blocksScanned zeroed. On a mainnet node that threw away
135,000 blocks and printed only "rewinding to a confirmed block", the same
line a two-block rewind prints.

Reaching that path did not even need a reorg. getBlockHeader throwing left the
header undefined, and the confirmations check read undefined as "not on the
chain", so a timeout or a busy node entered the same machinery.

Rewind a bounded depth instead, as the ethereum mediator already does, and
tell a node that cannot answer apart from one saying the block is gone: the
first holds the position for the next pass, only the second is a reorg. Commit
the rewind only once the target block reads back, since a position no later
pass can verify would rewind again from there. Say how far it went.

The decisions live in reorg.ts, copied into both chains and registered in
COPIED so duplicated-helpers keeps them identical, and are exercised against
both copies.

Closes #1063

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GYGMfX3foBcVqP7AQNXjWj

* fix(mediators): Hold the scan when the position cannot be verified

Five gaps from review.

A depth below one rewound to the reorged height itself, where the handler
stores the canonical hash and resumes above it -- so the block that replaced
ours was never read. parseInt also let a nonnumeric setting through as NaN.
Both now fall back to the default, in one predicate shared by the config and
the rewind.

Returning db.height + 1 after a header the node could not answer did not hold
the position as intended:... (continued)

3927 of 4515 branches covered (86.98%)

Branch coverage included in aggregate %.

8573 of 8999 relevant lines covered (95.27%)

721.29 hits per line

Jobs
ID Job ID Ran Files Coverage
1 34071591823.1 07 Sep 2026 01:05AM UTC 186
93.58
GitHub Action Run
Source Files on build 34071591823
  • Tree
  • List 93
  • Changed 79
  • Source Changed 0
  • Coverage Changed 79
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #34071591823
  • 6ed22998 on github
  • Prev Build on main (#34058238627)
  • Next Build on main (#34130524981)
  • Delete
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