Skip to content

e2e: retransmit-only settlement coverage is gated on the program-config flag, not on metro configuration #4157

Description

@elitegreg

After #4156, TestQA_MulticastSettlement decides its entire shape from one boolean read at startup:

retransmitOnboardingEnforced, err := client.IsRetransmitOnlyOnboardingEnforced(ctx)

That reads bit 7 of the shred-subscription ProgramConfig flags. Three separate assertions hang off it:

Assertion Location What it actually depends on
Settle on a device in a retransmit-only metro e2e/qa_multicast_settlement_test.go:325 a metro flagged retransmit-only in MetroHistory
Seat is charged --retransmit-price e2e/qa_multicast_settlement_test.go:373 a metro flagged retransmit-only in MetroHistory
Seat subscribes to --retransmit-group-codes and nothing else e2e/qa_multicast_settlement_test.go:595 a metro flagged retransmit-only in MetroHistory
New seat outside a retransmit-only metro is rejected e2e/qa_multicast_settlement_test.go:484 onboarding enforcement being on

Only the last one genuinely needs the ProgramConfig flag. The first three need a flagged metro, which is MetroHistory state and independent of enforcement.

Why this matters

Any environment that has retransmit-only metros configured but onboarding enforcement off gets zero coverage of the feature. The test picks the closest device, skips the price check and the group check, and passes green having exercised nothing new. Concretely:

  • Mainnet-beta today, if retransmit-only metros land there before enforcement is turned on.
  • Testnet, if enforcement is toggled off during an incident or a migration — the hourly job keeps passing and stops watching the feature.

The predecessor test (TestQA_RetransmitOnlySettlement, deleted in #4156) did not have this problem: it ran off its own enable flag and asserted the retransmit-only path regardless of what ProgramConfig said.

Suggested fix

Split the gate:

  • Gate device selection, the price assertion, and the group assertion on len(retransmitOnlyMetros) > 0 — i.e. what Client.RetransmitOnlyExchangeKeys already returns and what ClosestRetransmitOnlyDevice already reports back to distinguish "not configured here" from "configured but unreachable."
  • Gate only reject_new_seat_outside_retransmit_only_metro on IsRetransmitOnlyOnboardingEnforced.

That keeps every combination covered: metros flagged + enforcement off exercises pricing and group membership; metros flagged + enforcement on adds the rejection; no metros flagged skips as it does now.

Raised during review of #4156; not a blocker for that PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions