mirror of
https://github.com/tiennm99/thptqg2017.git
synced 2026-08-30 02:23:26 +00:00
Three reversals had landed without the documentation following them, so the docs described a pipeline that compresses its output, a schema with three secondary indexes, and a browser that re-downloads the file on every visit. None of those are true any more. - Compression: the assembler stopped producing .gz when the databases began shipping as .sqlite3. The deployment guide's "why no uncompressed database can ship" section explained a guard that now exists for the opposite reason — to keep .db, .gz and journals out, so .sqlite3 stays the only name. - Indexes: the architecture printed a DDL with three CREATE INDEX statements and a paragraph on the partial one. schema.go carries none. - Persistence: "the download is repeated every visit ... has not been done" was listed as an open risk after db-cache.js closed it. Replaced with the ETag flow, the offline fallback, and the risks that did replace it. Measured both transfers rather than scaling one from the other, which would have been wrong: 2016 is 142 MB stored and 31 MB delivered, 2017 is 119 MB and 36 MB. The smaller database is the larger download, so neither figure follows from the stored size. Also corrects a CHUNK_BYTES reference to a module that no longer exists, the 238-289 MB per-dataset figure, two paths to web/src/lib/datasets.js, and the CI step list, which omitted npm test and the post-deploy header check. The two code comments that said the same outdated things go with them.
32 lines
1.2 KiB
JSON
32 lines
1.2 KiB
JSON
{
|
|
"_comment": [
|
|
"The dataset registry: the one place every pipeline stage agrees on what",
|
|
"exists. JSON because the Go stages and the Vite app both read it.",
|
|
"",
|
|
" id the identifier used end to end, from data/<id>/ to /thptqg/<id>/",
|
|
" expectedRows exact row count of the built database, not an estimate. The",
|
|
" inputs are frozen exam results, so a deviation of even one row",
|
|
" means something changed unintentionally and the assembler",
|
|
" refuses to publish.",
|
|
" dbSizeMb usual size of the published database. Required and non-zero:",
|
|
" the assembler rejects a build that comes out far smaller. It",
|
|
" is also the memory figure the download gate shows, since the",
|
|
" browser holds the whole file while the tab is open.",
|
|
"",
|
|
"Presentation (titles, labels, SQL presets) lives in web/src/lib/datasets.js",
|
|
"keyed by id; that file throws at load if the two lists disagree."
|
|
],
|
|
"datasets": [
|
|
{
|
|
"id": "2016",
|
|
"expectedRows": 877460,
|
|
"dbSizeMb": 142
|
|
},
|
|
{
|
|
"id": "2017",
|
|
"expectedRows": 861068,
|
|
"dbSizeMb": 119
|
|
}
|
|
]
|
|
}
|