fix(wc2026): reconcile match identity and multi-source facts#12
fix(wc2026): reconcile match identity and multi-source facts#12huygdv wants to merge 13 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 967f165019
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const key = `${date}|${normalizeTeamPair(home, away)}`; | ||
| const event = (n != null ? byMatchNumber.get(n) : null) || byDatePair.get(key); |
There was a problem hiding this comment.
Allow recap dates to differ from feed dates
When a recap result does not include matchNumber, this exact ${date}|teamPair lookup misses real pack events whose recap/publication day differs from the feed kickoff date. In the committed data, wc2026/history/2026-06-23.json has Argentina vs Austria, while packs/worldcup-2026/events.json contains the same match as wc2026-argentina-austria-0622 on 2026-06-22, so node scripts/validate-worldcup-consistency.mjs exits with no pack event found and the new workflow gate is blocked. Please match by a stable match number where possible, or normalize/tolerate the date difference before failing.
Useful? React with 👍 / 👎.
Problem
The World Cup pack could publish two records for the same physical match and use the 90-minute score as the final knockout result:
W91 vs W92used a team/date-derived event id;score.ftwas always used even whenscore.etorscore.pexisted;wc2026/historyrecap surface were not cross-checked.This produced the observed
W91/W92ghost plusNorway 1–1 England, although match 99 finished 1–2 after extra time.Changes
matchNumber,matchKey, andsourceMatchIdidentity;whyItMatters, watchpoints and Vietnamese text;factCorrection.reasonfor reviewed manual overrides;wc2026/history/YYYY-MM-DD.jsonrecap;Multi-source policy
ChatGPT/scheduled-agent output remains an editorial and recap layer, not the sole authority for scores. Additional sources such as FIFA, open data, Reuters/AP or manual curation may enrich the same match. Their citations are retained. If independent sources disagree on participants, score or winner, publication fails instead of allowing the latest writer to silently overwrite the others.
Verification
Locally exercised:
W91/W92placeholder reconciliation;After merge, the push workflow runs reconciliation against the live source and commits the corrected generated pack only if all gates pass.