Modern UI contract: postmatch read

The after-match steps of the last kickoff: every match of it, the matches of
human managers for the report, the Sportschau's eleven of the day as the
engine chooses it (captured during session.advance, only with its replay
option), and the current tables of the day's leagues.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Opus 5.5 committed 2026-10-27 13:08:08 +01:00
1 parent b845bbfcbc
commit 10a8f0b881
6 files changed
+80 -1

No files matched your search

+10
View File
@@ -448,6 +448,16 @@ int main(int argc, char** argv) {
at(fixture, "conference").array() ? at(fixture, "conference").array()->size() : 0, cli::dump_json(m).c_str());
}
check(s(at(session.read_live(O{{"kind", "frame"}, {"sequence", 99999}}), "error")) == "invalid_live_sequence", "bad sequence");
// the after-match steps of that kickoff
const J post = session.ui_read(O{{"kind", "postmatch"}}, rev);
const J& pd = at(post, "data");
const auto* steps = at(pd, "steps").array();
check(s(at(post, "messageType")) == "snapshot" && steps && steps->size() == 5 && truth(at((*steps)[0], "available")) &&
at(pd, "matches").array() && !at(pd, "matches").array()->empty() && at(pd, "reportMatchIds").array() &&
!at(pd, "reportMatchIds").array()->empty(), "postmatch with results and report");
std::printf("(postmatch: %zu matches, %zu tables, %zu elevens)\n", at(pd, "matches").array()->size(),
at(pd, "tables").array() ? at(pd, "tables").array()->size() : 0,
at(pd, "teamOfTheDay").array() ? at(pd, "teamOfTheDay").array()->size() : 0);
}
// almanac view after the kickoffs: index, calendar, day, match
{