Repository navigation
ci(corpus): the tier-two job reads the BIM4LCA models CI's targets need (#766) - #789
Merged
Merged
Conversation
…ed (#766) Four targets measure fixes on VTT's BIM4LCA models (CC BY-SA 4.0) and skipped in CI, where RVT_NORDIC_LCA_DIR was never set. ARCH.zip is 1.58 GB, so tools/ci/fetch-bim4lca.py reads the archive's central directory and then only the five entries the targets open, by range request: four Revit 2024 models and Revit's IFC export of one, each written flat and checked against research/bim4lca-models.tsv. It requires 206 answers and the pinned archive size, inflates each entry as it arrives, and exits 1 when a pin no longer matches and 2 when the host cannot be reached. The tier-two job restores the files from main's cache, fetches them on a miss, sets RVT_NORDIC_LCA_DIR only when all five verified, reports NOT MEASURED when the host is down and fails on a stale pin; only main saves the cache. The five hashes, extracted by range, equal the ones measured on a full download of the archive.
3 tasks done
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit a115654. Configure here.
13 tasks done
Owner
Author
|
Confirmed after merge. |
DrunkOnJava
added a commit
that referenced
this pull request
Oct 18, 2026
…e host (#766) (#791) ## Summary `tools/ci/fetch-bim4lca.py` checks the files already in its target directory before asking VTT's host for anything, so a cache-restored run never contacts the host (#766, follow-up to #789). ## Motivation The fetcher read the archive's central directory first, so every tier-two run asked VTT's host, even when the cache had restored all five files. - **Host down:** the four BIM4LCA targets skipped, though their files were in place. - **Archive replaced on the host:** every pull request would fail `CI passed` on a stale pin, with good files in hand. ## Changes - Files in place are checked against their pins first. The host is asked only for those missing or wrong; when none are, the fetcher exits 0 without a request. - `--pin` mode is unchanged. - A stale pin's message names the pins file it was given, not always `research/bim4lca-models.tsv` (Measure passes `research/bim4lca-measure.tsv`). ## Testing - **Locally:** a pins file whose archive URL cannot resolve, with one entry present and matching. The fetcher printed `[ok]` and exited 0 without a request. With the entry deleted, it went to the host and was still retrying when stopped. - **This pull request's tier-two run** (job 117746631014) restored `main`'s cache and printed five `[ok]` lines and no `[fetch]`, so it made no request to the host. The four targets ran and passed: `column_node_z`, `column_cut_body`, `level_shared_elevation` and `level_parameters`. ## Breaking changes None.
DrunkOnJava
added a commit
that referenced
this pull request
Oct 18, 2026
… shorter archive as stale (#766) (#794) ## Summary `tools/ci/fetch-bim4lca.py` retries a connection dropped in the middle of a body, and fails a shorter replacement archive as a stale pin instead of reporting the host unreachable. These are the two findings Bugbot posted on #789 after it merged. ## Motivation The fetcher's exit status decides what tier two does: 0 runs the BIM4LCA targets, 1 fails the job (re-pin), and 2 warns NOT MEASURED and skips them. Two errors landed on the wrong side: - **A dropped connection.** `response.read()` raises `http.client.IncompleteRead`, which is not an `OSError`. Nothing caught it, so the run ended in a traceback with exit 1 and failed the job as a stale pin, for a network blip. - **A shorter archive.** When the host's archive is replaced by a smaller one, the range past its end is answered 416. That was retried five times and reported unreachable (exit 2), so the targets skipped instead of the stale pin failing. ## Changes - `http.client.HTTPException`, which includes `IncompleteRead`, is retried with the URL and OS errors, and ends in `Unreachable` (exit 2) if it persists. - HTTP 416 raises `Stale` (exit 1) at once, naming the bytes asked for and the pinned size. ## Testing End to end, the real script against a local stub host, with a pins file whose one entry is not on disk, so it has to ask the host. Each mode was run with this branch's script and `main`'s: | Host answers | `main` | This branch | |---|---|---| | 416 to every range | retried 151 s, exit 2, `unreachable: ... HTTP Error 416` | exit 1 at once, `error: the host has no bytes 3951424-4999999: the archive is shorter than the pinned 5000000; re-pin pins-416.tsv` | | 206 with `Content-Length: 100`, then closes after 10 bytes | traceback (`IncompleteRead`), exit 1 | retried 150 s, exit 2, `unreachable: ... IncompleteRead(10 bytes read, 90 more expected)` | This pull request's tier-two run restored the cache, so it did not reach the host, and showed the healthy path unchanged: five `[ok]` lines, no `[fetch]`, and the four targets ran and passed. ## Breaking changes None. Refs #766, #789
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
CI's tier-two job reads the BIM4LCA models its targets need, by byte range from VTT's
ARCH.zip, so four targets that skipped in CI now run on every pull request (#766, second item).Motivation
Several of this month's fixes were measured on VTT's BIM4LCA example buildings (CC BY-SA 4.0). Their targets skip without
RVT_NORDIC_LCA_DIR, which CI never set. A regression on those files would therefore pass CI, as #736 did on Snowdon. The targets arelevel_parameters(#751),level_shared_elevation(#752),column_node_z(#753) andcolumn_cut_body(#757).Changes
tools/ci/fetch-bim4lca.py(stdlib Python):--pinprints pin rows.research/bim4lca-models.tsv: the archive and five entries, 286 MB: four Revit 2024 models and Revit's IFC export of Housing_Terrain-Concrete..github/workflows/ci.yml, tier-two job:_bim4lcafrom a cache keyed on the pins file and fetches on a miss;RVT_NORDIC_LCA_DIRonly when all five verified;mainonly, so pull requests restoremain's copy rather than each storing 286 MB.corpus/tier2/README.md, a BIM4LCA section indocs/reference-models.md, and a Research entry inCHANGELOG.md.Testing
corpus/tier2/README.md:3df759b8…,c6b53726…,74712000…,23675d6c…and the IFC'sc3946ee4….mainhas saved one. The fetcher read the five files by range in about 8 seconds,[verified]each, and setRVT_NORDIC_LCA_DIR.column_cut_body::nordic_office_concrete_columns_stop_at_the_slab(11.0 s)column_node_z::nordic_housing_concrete_column_z_is_revits(8.5 s)level_shared_elevation::nordic_housing_timber_keeps_its_storeys(1.2 s)level_parameters::nordic_housing_terrain_levels_are_revits_storeys(2.5 s)main's run should save the cache and later runs restore it. Checked and noted here then.Out of scope
Breaking changes
None.