From ec8582032e387daf2bc443436a9649933ec99dc9 Mon Sep 17 00:00:00 2001 From: Duncan Tourolle Date: Sun, 23 Aug 2026 10:44:09 +0200 Subject: [PATCH] Fetch the model CI has been building without MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both failing jobs failed for the same reason, and it was not the reason either of them appeared to fail. Desktop reported a Clippy failure and Android reported the API-level check; both were `dr-segment`'s build script panicking because `models/yolo26n-seg.onnx` was a 133-byte LFS pointer rather than the 11 MB model. No checkout step asked for LFS objects. `.gitattributes` predicted this exactly — "a clone without git-lfs gets a ~130-byte pointer file where the model should be" — and the build script fails loudly by design rather than embedding a pointer and failing at inference. That design worked; nothing was reading the message. It stayed hidden because the Android job built `-p dr-gpu`, which never reaches dr-segment. Building the app crate does, which is how one fix surfaced another. Only the two jobs that compile get `lfs: true`. `layering` runs `cargo tree` and builds nothing, so it has no reason to fetch 11 MB. Co-Authored-By: Claude Opus 5 (1M context) --- .gitea/workflows/build-and-test.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.gitea/workflows/build-and-test.yml b/.gitea/workflows/build-and-test.yml index e1dd17d..7d583df 100644 --- a/.gitea/workflows/build-and-test.yml +++ b/.gitea/workflows/build-and-test.yml @@ -29,7 +29,18 @@ jobs: steps: - name: Checkout + # `lfs: true` is load-bearing, not hygiene. `core/dr-segment/models/*.onnx` + # is tracked in LFS (see .gitattributes), and a checkout without it writes + # a ~130-byte pointer where the 11 MB model should be. `dr-segment`'s build + # script detects that and panics by design, so every job that compiles it + # fails at the build script with a message about git-lfs — which reads like + # a broken build rather than a missing fetch. + # + # It stayed hidden while the Android job built `-p dr-gpu`, which does not + # reach dr-segment. Building the app crate does. uses: actions/checkout@v4 + with: + lfs: true - name: Cache cargo uses: actions/cache@v4 @@ -84,7 +95,18 @@ jobs: steps: - name: Checkout + # `lfs: true` is load-bearing, not hygiene. `core/dr-segment/models/*.onnx` + # is tracked in LFS (see .gitattributes), and a checkout without it writes + # a ~130-byte pointer where the 11 MB model should be. `dr-segment`'s build + # script detects that and panics by design, so every job that compiles it + # fails at the build script with a message about git-lfs — which reads like + # a broken build rather than a missing fetch. + # + # It stayed hidden while the Android job built `-p dr-gpu`, which does not + # reach dr-segment. Building the app crate does. uses: actions/checkout@v4 + with: + lfs: true - name: Cache cargo uses: actions/cache@v4