Compare commits

...
Author SHA1 Message Date
beardthelion 6101d847bd fix(node): disposition #248's two peers-table test writers in the ledger
main is red at 225644a3. The #273 completeness ledger asserts that every
writer of the peers table is dispositioned, and #248 added two test
fixtures that write it directly:

  gossip_ping_round_requires_two_failures_before_persisting_unreachable
  manual_ping_uses_readiness_without_mutating_federation_gate

Neither PR could have caught this alone. The ledger landed in #290 after
#248 was last tested, and #248's writers did not exist when the ledger was
written, so both were green on their own and merged cleanly because they
touch different lines. The guard did exactly its job on first contact.

Both are test-only fixtures seeding a peer row that points at a mockito
server. They cannot go through upsert_peer: mockito binds 127.0.0.1 and
upsert_peer bails on !is_public_http_url, which rejects loopback. That is
the same disposition already recorded for seed_local_peer (file:// URLs)
and a_legacy_row_can_still_refresh_its_liveness (a pre-gate DID), so this
adds no new category, only two rows.

Verified: the guard is RED on this tree before the change and GREEN after,
and all three ledger mutations (drop either entry, or claim the wrong
statement count) go RED on the expected message, so the new rows are
load-bearing rather than decorative. Workspace suite 1345 passing, back
from 811 passed / 1 failed.
2026-08-10 00:24:56 -05:00
+10
View File
@@ -6945,6 +6945,8 @@ mod peer_authority_tests {
/// | `prune_non_public_peers` (db/mod.rs) | a delete keyed on a computed bad-DID array; cannot repoint; boot-only caller in main.rs |
/// | `seed_local_peer` (sync.rs) | excluded by test-module location: a deliberate `upsert_peer` bypass for `file://` fixtures, which the public-URL gate rejects |
/// | `a_legacy_row_can_still_refresh_its_liveness` (db/mod.rs) | test-only. Seeds a PRE-GATE row by raw SQL on purpose: `upsert_peer` cannot create one, since the gate it is testing refuses exactly that DID. The fixture models what a deployed table already holds |
/// | `gossip_ping_round_requires_two_failures_before_persisting_unreachable` (main.rs) | test-only (#248). Seeds a reachable row pointing at a mockito server so the ping round has a peer to probe. `upsert_peer` cannot create it: mockito binds 127.0.0.1, and the `is_public_http_url` gate refuses loopback |
/// | `manual_ping_uses_readiness_without_mutating_federation_gate` (api/peers.rs) | test-only (#248). Same fixture shape and the same reason: a loopback mockito URL that `upsert_peer` would refuse |
///
/// And the `upsert_peer` CALL-SITE authority table, which the ledger above
/// structurally cannot hold, because the bootstrap site issues no SQL of its own
@@ -7030,6 +7032,14 @@ mod peers_table_writer_guard {
/// listed function that no longer has one.
const LEDGER: &[(&str, usize)] = &[
("a_legacy_row_can_still_refresh_its_liveness", 1),
(
"gossip_ping_round_requires_two_failures_before_persisting_unreachable",
1,
),
(
"manual_ping_uses_readiness_without_mutating_federation_gate",
1,
),
("mark_peer_ping", 1),
("prune_non_public_peers", 1),
("prune_self_peers", 1),