Merge phase 27 save format and dump.
ci / server (push) Failing after 3m34s
ci / client (push) Successful in 13s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Leonid Pershin
2026-08-20 00:34:54 +03:00
co-authored by Cursor
14 changed files with 480 additions and 12 deletions
+51
View File
@@ -454,6 +454,57 @@ rebuilds the rest around it. Same success payload as GET timetable.
Query: `classId`, `subject`, `day`, `period`. Drops that lock and rebuilds. Unknown lock is
`404` `unknown-lesson`.
## Dev endpoints
These exist only when `HSchool:AllowSaveReload` is true (headless AppHost tests). They are never
mapped in production by default. Same switch as `POST /api/dev/reload-schools`.
### `GET /api/dev/schools/{id}/dump`
Roster, live presence, live needs and the timetable as one JSON. The roster and lesson table come
from the published snapshots; nodes and needs go through that school's mailbox — HTTP does not
read the `World`. Unknown `{id}` is `404` `unknown-school`.
```json
{
"id": 1,
"name": "Гимназия №14",
"gameTime": "2012-04-03T10:20:00Z",
"running": true,
"people": [
{
"id": "f3.p1",
"fullName": "Иванова Ольга Михайловна",
"nodeId": "classroom-101",
"needs": { "Hunger": 0.92, "Toilet": 1, "Social": 0.8, "Sleep": 1 }
}
],
"now": [
{
"classId": "c5A",
"subject": "Mathematics",
"teacherId": "f3.p1",
"roomId": "classroom-101",
"day": 1,
"period": 3
}
],
"lessons": [
{
"classId": "c5A",
"subject": "Mathematics",
"teacherId": "f3.p1",
"roomId": "classroom-101",
"day": 1,
"period": 3
}
]
}
```
`nodeId` is null when the person is off campus. `now` is the lessons occurring at `gameTime`
(empty on a break, night, weekend or holiday). `lessons` is the published table.
## WebSocket message ids
Client-to-server ids live in `0x000x7F`, server-to-client ids in `0x800xFF`, so a misrouted