Repository navigation
Description
Problem
rvt::formats::parse_schema (src/formats.rs, ~line 544) scans at most the first 64 KiB of the decompressed Formats/Latest stream:
const SCHEMA_SCAN_LIMIT: usize = 64 * 1024;
let data = if decompressed.len() > SCHEMA_SCAN_LIMIT { &decompressed[..SCHEMA_SCAN_LIMIT] } else { decompressed };That cap is deliberate (the tail is binary object data that trips the class-name heuristic), but nothing records that it was hit. On real project files the stream is far larger than 64 KiB, and the Discussion #112 investigation (docs/disc-112-coordination.md) found this silent cap is the dominant boundary on how much of the schema we ever look at. Callers — rvt-schema, rvt-inspect, the formats_latest_integrity diagnostic added in #168 — cannot tell "the schema fit" from "we stopped looking".
What to do
- Add a field to
SchemaTable(e.g.scan_truncated: bool, orscanned_bytes+total_bytes) set byparse_schemawhen the cap applies. Parsing results must not change. - Surface it in at least one user-visible place: the
Formats integrityrow ofrvt-inspect/export_diagnostics.formats_latest_integrityis the natural home (seesrc/compression.rsFormatsLatestIntegrityand how feat(diagnostics): Formats/Latest multipage integrity (A2/PARSE-001) #168 wired it through), or thervt-schemasummary line. - Unit test: a synthetic buffer of >64 KiB (a tiny valid schema prefix followed by zeros) sets the flag; a small buffer does not.
Acceptance
tools/check-local.shgreen; existing schema-classification tests unchanged.- No claim that the tail is parseable — this is a "we stopped here" signal, not a fix for multi-page Formats/Latest (that stays tracked under RE: Reproduce checksum-paged stream decompression and silent corruption #151 / RE: Reproduce complete Formats/Latest parsing and serialization-tag assignment #154).
Scope notes
Small Rust change + test; runs on the checked-in tier-1 fixtures (they are under 64 KiB, so the flag is false for them — the >64 KiB case is the synthetic buffer in the unit test). Ask on the issue if the diagnostic plumbing is unclear.
Activity
docs: clone-to-first-PR quickstart, contributor section, honest help-…
docs: clone-to-first-PR quickstart, contributor section, honest help-…