diff --git a/plans/initial-implementation/PLAN.md b/plans/initial-implementation/PLAN.md index f4cbf9a..c43a4b9 100644 --- a/plans/initial-implementation/PLAN.md +++ b/plans/initial-implementation/PLAN.md @@ -62,7 +62,7 @@ parameter configurable. | Phase | Domain | Status | Review | Build | Committed | |---|---|---|---|---|---| -| Phase 0: Scraping spike | backend | ✅ Done | ⬜ Pending review | ⏭️ N/A (research) | ⬜ | +| Phase 0: Scraping spike | backend | ✅ Done | ⚠️ Pass with notes (Sonnet) | ⏭️ N/A (research) | ✅ 070e34b | | Phase 1: Solution + Domain | backend | ⬜ Not Started | ⬜ | ⬜ | ⬜ | | Phase 2: Storage | backend | ⬜ Not Started | ⬜ | ⏭️ Big Bang | ⬜ | | Phase 3: Scraping | backend | ⬜ Not Started | ⬜ | ⏭️ Big Bang | ⬜ | @@ -84,4 +84,29 @@ parameter configurable. ## Amendment Log -(empty) +### Amendment 1 — 2026-05-05 — Phase 8 strategy change (deferred — formal approval will be requested when Phase 8 begins) + +**Type:** Modify upcoming phase (Phase 8 — Results loader) +**What changed:** Phase 8's original subplan assumed marathonbet.by exposes a public +results / archive page that we can scrape to back-fill `EventResult`s. Phase 0 spike +proved this endpoint does NOT exist (`/su/results` returns 404). + +**Why:** Spike findings — see `spike/SCRAPE_FINDINGS.md` and the deviation note in +`plans/initial-implementation/phase-0-scraping-spike.md` (Handoff section). + +**New approach (to be formalised when Phase 8 begins):** Maintain a "watch list" of +events whose `ScheduledAt + EstimatedDuration` is in the past but whose status is not +`Completed`. Poll those event-detail URLs every 5 min until either +`eventJsonInfo.matchIsComplete=true` (capture `resultDescription`, mark complete) or +the URL 404s (mark `ResultUnknown`). Optional fallback to flashscore/sofascore is a +Phase 8 design decision. + +**Impact on existing phases:** Phase 4 (Application + Workers) may need a new +`ResultsWatchListPoller : BackgroundService` in addition to the previously planned +`UpcomingEventsPoller` and `LiveOddsPoller`. Phase 2 schema may need a `WatchStatus` +field on `Event` (`Pending | InWatchList | Completed | ResultUnknown`). Both will be +re-evaluated when Phase 8 starts. + +**Status:** Logged — formal subplan revision and user approval will be requested at the +start of Phase 8 (per skill rule: "All amendments require explicit user approval before +taking effect"). Phases 1–7 do not depend on Phase 8's tactical implementation.