mirror of
https://github.com/ever-co/ever-gauzy.git
synced 2026-10-02 01:54:50 +08:00
Two correctness bugs from the AI review of #10010, both confirmed against the merged code on develop. 1. build.yml - every warm run would fail. `Restore node_modules archive` used `lookup-only: true`, so on a cache HIT the archive is never written to disk. `Install`, `Run postinstall`, `Archive` and `Save` are all gated on `cache-hit != 'true'` and correctly skip - but `Upload node_modules archive` carries NO `if:` guard and sets `if-no-files-found: error`. On a hit it therefore uploads nothing and fails the job, and because the other four jobs `needs:` this one, it takes the whole gate with it. The cold run that first writes the key passes, so this is invisible until the SECOND run - the one the cache exists for. Dropping `lookup-only` makes the producer always materialise the archive: a ~2.9 GB download costs a few minutes against the ~90-minute install it replaces, and it is what guarantees the run-scoped artifact handoff actually has a file to hand off. 2. archive-node-modules.sh - a failed tar could publish a corrupt archive. The script set only `-o pipefail`, never `-e`, and tolerated tar exit 1 with `|| [ $? -eq 1 ]`. A tar exit status of 2 - a real error - left the `||` compound false and execution simply continued to the size check. A ~2.9 GB tree truncated early still clears the 100 MB floor, so the partial archive would be published and unpacked by four consumer jobs. Now `set -e`, with the tar status captured explicitly so exit 1 stays tolerated and anything else aborts before the archive can be published. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>