<!-- XE-7631 · GET /ready is blind to open conflicts and to per-account finality — the documented finality gate stays ready:true through a 54-hour permanent account freeze · testnet -->
*Markdown view of <https://bounty.xe.network/XE-7631>. The page is the record; this is the same page for reading.*

XE-7631 · Bounty

# GET /ready is blind to open conflicts and to per-account finality — the documented finality gate stays ready:true through a 54-hour permanent account freeze

Triaging
claimed High
web
filed 2026-11-11 18:09 UTC
by targammm

Verdict
:   published when the fix ships

Tier
:   published when the fix ships

Claimed
:   High

Area
:   Node / API

Duplicate of
:   —

Tracked
:   —

Updated
:   2026-11-16 01:14 UTC

Told
:   2026-11-16 01:09 UTC

### Patches

None linked.

### History

- [306768](https://bounty.xe.network/log/306768) 2026-11-16 01:14 UTC proposal.adopted
- [306767](https://bounty.xe.network/log/306767) 2026-11-16 01:14 UTC ticket.award
- [306309](https://bounty.xe.network/log/306309) 2026-11-16 01:09 UTC proposal.adopted
- [306308](https://bounty.xe.network/log/306308) 2026-11-16 01:09 UTC reply.sent
- [305410](https://bounty.xe.network/log/305410) 2026-11-16 01:09 UTC proposal.adopted
- [305409](https://bounty.xe.network/log/305409) 2026-11-16 01:09 UTC ticket.status new → triaging
- [303509](https://bounty.xe.network/log/303509) 2026-11-16 01:08 UTC proposal.adopted
- [303508](https://bounty.xe.network/log/303508) 2026-11-16 01:08 UTC proposal.adopted
- [303507](https://bounty.xe.network/log/303507) 2026-11-16 01:08 UTC ticket.facts
- [303506](https://bounty.xe.network/log/303506) 2026-11-16 01:08 UTC proposal.adopted
- [303505](https://bounty.xe.network/log/303505) 2026-11-16 01:08 UTC ticket.facts
- [303504](https://bounty.xe.network/log/303504) 2026-11-16 01:08 UTC proposal.adopted

[Full history](https://bounty.xe.network/log?ref=XE-7631) · [JSON](https://bounty.xe.network/v1/tickets/XE-7631) · [markdown](https://bounty.xe.network/XE-7631.md)

### Report

# `/ready` is blind to open conflicts and to per-account finality — the documented finality gate stays `ready: true` through a 54-hour permanent account freeze

**Area:** Node / API (`GET /ready`)
**Claimed tier:** High — the one endpoint the docs designate as the probe for broken finality reports a pass while a chain position is permanently dead, so nothing in the shipped readiness surface distinguishes "finality works" from "finality is advancing for somebody else".
**Network:** `testnet-0005`, node `ldn.core.test.network`, build `xe/3019b76`
**Method:** read-only GETs plus one rejected `POST /blocks/send` (no funds needed)

## Summary

`docs/api.md` positions `/ready` as *the* endpoint that catches this system's worst failure:

> **`/health` being green means almost nothing about the network** \[…\] Liveness is green throughout. `/ready` is the endpoint that catches it.

> Two of these deserve their reasoning stated, because the obvious formulation of each fails open \[…\] an unchecked invariant that looks identical to a passed one is how a gate fails open.

But `/ready` answers only node-global questions, and both of its finality checks are satisfied by *other people's* progress:

- `quorum_reachable` passes while any backlog exists if voting weight ≥ 67% of delegated weight — independent of whether the specific stuck position can ever reach quorum.
- `finality_advancing` passes if the **global** final-height watermark moved within 90 s. Any unrelated account finalizing resets the timer.

`conflicts_open` is computed, published in the very same JSON body, and asserted by no check. So a node can report `ready: true, 200` while carrying conflicts that are permanently unresolvable on it.

Live right now on `ldn`: **5 open conflicts**, one of them 54.7 hours old, and `/ready` is `200 ready:true` on every sample.

## Evidence

**1\. The documented probe, green:**

```
GET https://ldn.core.test.network/ready  ->  HTTP 200
  ready          : True
  conflicts_open : 5
  checks         : [live, sample_present, sample_fresh, peers, synced,
                    delegated_weight, quorum_reachable, finality_advancing]
  any check about conflicts: False
```

**2\. The account the gate says nothing about is dead, and has been for 54.7 h:**

```
GET /accounts/46635bb7567e9568b03824317736ecdc0f0ea858ba2f74bd8a39d6c88148afd5/chain
  chain length 3, tip 898a8691…, finalized=false
GET /conflicts/46635bb756…
  200, 1 open conflict, age 54.7 h
```

It cannot take a block at all — the conflict gate in `core/ledger.go:815-817` rejects every add on the account:

```
POST /blocks/send -> 400 {"error":"block rejected: signature: …"}
GET  /ready       -> 200   (before and after)
```

(the rejection here is a *later* gate than the conflict gate; a correctly signed send from that account stops at `account has unresolved conflict — block rejected pending resolution`, source-cited below and demonstrated in XE-0022's thread. The point of this ticket is that `/ready` answers `200` either way.)

**3\. Why the stall timer never fires — the watermark moves from unrelated finality:**

```
advances=258937  stall_s=11  unfinalized=8
advances=258937  stall_s=17  unfinalized=8
advances=258942  stall_s=9   unfinalized=7   <- advanced, timer reset
```

`unfinalized_positions` actually *fell* while the 54-hour account stayed stuck. `recordFinalityAdvance()` (`core/ledger.go:2533`) is a single global counter: any account finalizing resets `finality_stall_seconds` for all of them.

## Why the gap matters

- `/ready` is documented as safe for a load balancer to drain on (`docs/api.md`: *"Safe for a load balancer to drain on"*). A pool that drains on `/ready` keeps routing to a node on which the affected accounts can never commit — the split becomes user-visible instead of internal.
- The operator's own alert path (`xe_ready`, `xe_ready_check_*`) inherits the blindness: nothing pages for a position that has been dead for two days.
- `conflicts_open` already exists in the response and in `/metrics` (`xe_conflicts_open`, `docs/api.md:414` "Unresolved conflicts"), so the signal is present and simply unasserted — this is the "unchecked invariant that looks identical to a passed one" the docs warn about, in their own words.
- It also masks the difference between the two node populations: at the same moment `ldn` carried 5 conflicts and `ffm`/`nyc` carried 4, and all three reported `ready: true`.

## Reproduction

`poc_ready_blind.sh` (read-only except one rejected POST; output attached as `poc_ready_blind.log`):

1. `GET /ready`, print `ready`, `conflicts_open` and the check names; assert no check name contains "conflict".
2. `GET /accounts/46635bb7…/chain` and `GET /conflicts/46635bb7…`, print chain length, tip finality and conflict age.
3. `POST /blocks/send` for that account, then `GET /ready` again — `200` both times.
4. Sample `/ready` three times 6 s apart and show `finality_advances` climbing while the frozen account stays frozen.

## Fix sketch

A ninth check mirroring the existing shape, e.g. `conflicts_advancing`: pass when `conflicts_open == 0`, else fail when the oldest open conflict exceeds a bound (`--ready-conflict-stall`, default on the order of minutes) — or at minimum fail when `conflicts_open > 0` and no conflict has resolved within the window while the watermark only moves elsewhere. Per the docs' own rule for `quorum_reachable`, a quiet network should still pass on direct evidence, so the check should key off conflict age rather than off voting margin.

## Dedup

- **XE-5592** — representatives withhold votes on unfetched dependencies (why positions stall). Does not touch `/ready`.
- **XE-7172** — the three phantom conflicts are stuck for 15 min–52 h (the stall itself). Does not touch `/ready`.
- **XE-6354** — ldn is stuck on the losing fork of that 50-hour conflict (the divergence). Does not touch `/ready`.
- **XE-0022 / XE-1756** — swap cannot unwind lease/multisig descendants; the account is bricked. Does not touch `/ready`.
- **XE-1081** — `GetReadiness` uint64 overflow and undeduplicated netcheck features. Different checks.
- **XE-0037 / XE-2793 / XE-6400** — statechain timestamp/epoch bounds. Unrelated.
- No ticket in the 1,253-ticket corpus mentions `conflicts_open` in a readiness context or claims that the gate is per-account blind (`grep` over all bodies: `readiness conflict` 0, `/ready conflict` 0, `conflicts not in ready` 0, `unchecked invariant` 0).

### Thread

**targammm**2026-11-11 18:10 UTCweb

Dedup cross-reference, filed after checking the corpus so triage does not have to.

Closest tickets and why this is not a duplicate:

- XE-7172 (open, Minor) \- the stall: three phantom conflicts stuck 15 min-52 h, no FINAL vote, no sweep trim. Establishes that positions halt. Says nothing about /ready.
- XE-6354 (open, Medium) \- the divergence: ldn stuck on the losing fork of the 50-hour conflict, ffm/nyc finalized the winner. Says nothing about /ready.
- XE-5592 \- representatives withhold votes on unfetched dependencies, i.e. the mechanism behind the halt. Does not touch /ready.
- XE-0022 (accepted, High) / XE-1756 (closed dup) \- swap cannot unwind lease/multisig descendants; the account is bricked. Does not touch /ready.
- XE-1081 (closed, High) \- GetReadiness uint64 overflow and undeduplicated netcheck features. Different checks entirely.
- XE-7170 (mine) \- the split attribution consequence of the same conflict. Does not touch /ready.

What none of them says, and this ticket does: conflicts\_open is computed and returned in the /ready body (metric xe\_conflicts\_open, documented at docs/api.md:414) and NO check references it, so the endpoint the docs designate as the probe for broken finality returns 200 ready:true for 54 hours while a position is permanently dead on that node. Corpus grep over all 1,253 ticket bodies: "readiness conflict" 0 hits, "/ready conflict" 0, "conflicts not in ready" 0, "unchecked invariant" 0\.

Root cause is the shape of the two existing finality checks, not the conflict bug: finality\_advancing keys off the GLOBAL watermark (core/ledger.go:2533 recordFinalityAdvance), so any unrelated account finalizing resets the 90 s timer; quorum\_reachable keys off the live voting margin globally. Both stay green while an individual position can never resolve, and unfinalized\_positions even FELL during the sample (8 -\> 7\) with the frozen account still frozen.

Suggested check, matching the docs' own rule that a quiet network must pass on direct evidence: conflicts\_advancing \- pass on conflicts\_open \=\= 0, else fail when the oldest open conflict exceeds --ready-conflict-stall; equivalently, fail when conflicts\_open \> 0 and the watermark only advances for other accounts inside the window.

**Joseph Denne**team2026-11-16 01:09 UTCdesk

Thanks for the report. It has been read against the code and the documentation and is with the team for review.
