Files
Niko1221 227d01b80a fix(tools): the Python .strata readers take the 16 KiB-aligned layout too, old files read as before
inkling_tokenizer.read_manifest, hy4_tokenizer.read_manifest and tools/squant/strata_format.parse_header_frame read
the section table at 0x10 only. On the re-adjusted Inkling SQ-20 and Vision (table at 0x20, a u16 tile_layout_id at
0x10) that is (offset 0, length 0): no manifest, so the model preview ("invalid .strata manifest"), adopt and the
server's tokenizer extraction failed on the new files.

The tokenizer readers find Section 0 through _section0(), the squant reader through detect_layout(), with the engine's
rule (strata_layout.hpp): the 16 KiB table is used only when it is valid (section_id equals the index, 16 KiB aligned,
inside the file, no overlap) and the 4 KiB one is not; a header valid as both is refused as ambiguous; anything else is
read as the 4 KiB layout exactly as before. build_header_frame can write the 16 KiB header (layout_16k=True, for tests);
verify_strata_file passes the file size.

Test: terminal/tools/test_strata_header_layouts.py, with the 448-byte header frames of the real old and new SQ-20 and
Vision in terminal/tests/data/strata_headers (14 tests; the 4 KiB ones pass on the old code too, the 16 KiB ones do not).
2026-11-26 10:41:39 +01:00
..