diff --git a/backend/app/services/subscribestar_client.py b/backend/app/services/subscribestar_client.py index 0a1751b..e51e026 100644 --- a/backend/app/services/subscribestar_client.py +++ b/backend/app/services/subscribestar_client.py @@ -396,6 +396,16 @@ def _roster_rows(table: str, identifier: str, base: str) -> list[Membership]: name = _ROSTER_NAME_RE.search(row) slug = unescape(href.group(1)) cells = _ROSTER_CELL_RE.findall(row) + if len(cells) != len(labels): + # Canary, not a refusal. Identity above does not depend on columns, + # so a shifted column must not fail the whole roster — but it would + # silently mislabel `details` (a price filed under "discord"), so + # say so in the worker log where it is diagnosable. + log.warning( + "SubscribeStar roster %r: %d cells against %d headers — column " + "details may be mislabelled; markup likely changed (note #3989)", + identifier, len(cells), len(labels), + ) rows.append(Membership( campaign_id=user_id.group(1), display_name=(_cell_text(name.group(1)) if name else "") or None, @@ -420,7 +430,7 @@ def _roster_rows(table: str, identifier: str, base: str) -> list[Membership]: # its 's class at all. "columns": { label: _cell_text(cell) - for label, cell in zip(labels, cells) + for label, cell in zip(labels, cells, strict=False) if label not in _ROSTER_SKIP_COLUMNS }, },