Skip to content

ci: held-out fetches, the export hash and the witness verdict pass when what they check did not happen #1882

Closed

Description

@DrunkOnJava

Batch 5's audit of the CI scripts and gates (main at e57db42) found checks that pass when the thing they check did not happen. Each was confirmed by a second reader; items 1 to 3 were re-read by the maintainer session.

Measure scripts

  1. A missing or unreadable pins file makes the held-out fetch exit 0 having fetched nothing. fetch-holdout-archives.sh:59, fetch-holdout-models.sh:35 and fetch-bimcollab.sh:49 read the pins with done < <(grep -v '^#' "$PINS"). A failing grep inside a process substitution does not fail the script, so the loop never runs and the workflow reads status 0 as "fetched and verified" (measure.yml:1051-1057, :1020-1024). Fix: [ -r "$PINS" ] || exit 66 first, or read the file into an array and check the count.
  2. An export that crashed or wrote nothing gets the empty-input hash. measure-reference-models.sh:456 pipes grep ... "$dir/model.ifc" | sha256sum with no existence or size guard, so an absent model.ifc hashes as e3b0c442…. A crash on both sides then compares as an unchanged export. Fix: [ -s "$dir/model.ifc" ] or write a missing marker the comparison treats as different.
  3. A scorer step that crashed or timed out leaves no trace in schema.txt. cached() (:335-340) returns the status but the call at :356-357 ends in || true and no exit N line is written, so the "results are whole" check cannot see it. Fix: write the step's exit status into the file it fills.
  4. fetch-bim4lca.py trusts the downloaded archive's own sizes (:160, :163-174) before the pinned hash is checked, so a hostile host can make it read and write up to the archive size first. Fix: refuse a member whose usize exceeds the pinned size.

Witness and workflow checkers

  1. A type neither witness reports compares as 0 against 0 and passes. witness-verdict.py:169 (also :208, :254) adds every claimed type to the surface and reads a missing count as 0. A witness that silently stops emitting a type agrees with any other that also lacks it. Fix: a claimed type absent from a witness is "not observed", not 0.
  2. witness-verdict.py:130: lineage defaults to the witness id, so two builds of one implementation count as two independent lineages unless the registry says otherwise. Fix: require lineage.
  3. check-workflows.py: the page job's own if: is never read (:539-543); release constants are read only from step-level env (:511-516); only "no matrix arrays" fails, not "one of the two missing" (:162-164).
  4. measured_numbers.py:380-384: no floor on how many numbers it checked, and an unclosed code fence silently disables the rule for the rest of the page.
  5. check_same_project_projects.py:10-11: the docstring names a year-keyed PROPERTIES comparison the script does not make.

No export moves for any of these. A fix lands with CI only, plus one Measure run showing the same verdicts and hashes as main for items 1 to 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cipriority:P1type:bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions