You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found while running the full suite locally with RVT_PROJECT_CORPUS_DIR set, as part of PR #205. Pre-existing, not introduced by that PR — it touches no src/ file and no line of this test.
---- project_2024_file_parses_all_declared_records stdout ----
thread ... panicked at tests/elem_table_corpus.rs:98:5:
assertion `left == right` failed: parse_records should return exactly header.record_count on 2024 project files
left: 26424
right: 26425
Reproduce:
RVT_PROJECT_CORPUS_DIR=<magnetar>/Revit cargo test --release --test elem_table_corpus
on 2024_Core_Interior.rvt (sha256 c805df445d613b408e37337765572021265e3f5dfdc7d1fa53b22ba1600b8014). The other three tests in the file pass, including the 2023 project equivalent, so this is specific to the 40-byte 2024 ElemTable layout — a single record short, likely a terminating-record or stride edge case at the tail rather than a wholesale framing error.
The reason nobody noticed: no CI job runs this test with a corpus.corpus-tier2 and writer-patch-corpus set RVT_PROJECT_CORPUS_DIR, but they name specific test targets (corpus_tier2_health, project_corpus_smoke, project_count_fixtures, cfb_roundtrip_delta). The matrix cargo test jobs run every target but without the env var, so elem_table_corpus takes its if !p.exists() { return; } skip path on every run. The test is effectively dead in CI.
Two things worth doing:
Fix the off-by-one (or, if 26424 is provably the honest count, correct the assertion and say why the header over-declares — but not without evidence).
Add elem_table_corpus to the corpus-tier2 job so the gap cannot reopen silently. Note that doing so will make CI red until (1) lands, which is the correct order.
Related: #153 (RE: Validate ElementHeader framing for ElementId and class-tag recovery) covers the framing this test guards.
Activity
fix(elem-table): recover the last declared record on the 40-byte proj…
ci: run every integration test in CI instead of a hand-kept list (#287)
ci: run only real-file, CLI and contract verification; unit tests are…