Previously LiveEventsParser returned 0 events from /su/live because two
real differences between the live page and the pre-match listing weren't
handled:
1. Live rows omit data-event-path entirely. They expose only
data-event-treeId, and the bookmaker routes live events under
/su/live/<treeId> rather than /su/betting/<...>.
2. The closest data-sport-treeId ancestor on the live page is a
category-tree wrapper (26418=Football-live, 45356=Basketball-live, …)
instead of the canonical breadcrumb sport ID (11/6/22723/43658) the
rest of the app uses. The pre-match listing carries the canonical
ID directly.
Changes:
* EventListingParserBase.ParseRow: data-event-path becomes optional. For
live rows we synthesize EventPath = "live/<treeId>" from
data-event-treeId (validated as digits-only). Pre-match validation is
unchanged.
* New ExtractSportCodeFromLive walks ancestors looking for a sport-tree
ID and maps it through a small live-id → canonical-id table covering
the four scoped sports. Out-of-scope sports (cybersport, volleyball,
table tennis) are intentionally left unmapped — they keep their raw
category ID and the UI renders them via SportLabels as "Sport <N>".
* MarathonbetScraper.ResolveEventDetailPath: dispatches between
/su/live/<treeId> and /su/betting/<...> based on the EventPath prefix.
Removes the duplicated path-building between ScrapeEventOddsAsync and
ScrapeEventResultAsync.
* New regression tests covering all three behaviors against a real
/su/live capture (16 events, 5 sport categories).
Also: rewrites the stale "Disabled until Phase 8" hint copy on the
Settings.Workers.ResultsPollerEnabled flag — Phase 8 shipped, so the
results poller is safe to enable.
Three minimal fixes to make Marathon.sln build with 0/0:
1. Marathon.Infrastructure.csproj — add InternalsVisibleTo for
Marathon.Infrastructure.Tests so test code can reference internal
repository and exporter classes (Phase 2 issue blocking Phase 3 tests).
2. EventOddsParserTests.cs — add 'using Marathon.Domain.ValueObjects' so
MatchScope/PeriodScope resolve.
3. RoundTripTests.cs — add 'using Microsoft.EntityFrameworkCore' so the
ExecuteSqlRawAsync extension method on DatabaseFacade resolves.
Phase 5's anticipated LocalizationOptions / Serilog issues were already
resolved by its agent before being killed — no changes needed there.
Build status: 0 warnings, 0 errors.
Test status: Domain 96/96, UI 11/11, Infrastructure 42/77 (35 failing —
parser fixture issues + a real DateTimeOffset bug; reviewer will assess).