Commit 1eae92f
fix: correct build summary counts for packages built after verification failure
Packages that failed SLSA verification and were rebuilt locally were
incorrectly counted as 'downloaded' instead of 'built_locally' in the
build summary.
Root cause: In rare edge cases, packages built locally after verification
failure are not tracked in newlyBuiltMap, causing them to fall through to
the wrong category in the else-if chain.
Fix: Add defensive check before the PackageDownloaded check to catch
packages that were supposed to be downloaded but weren't, yet are now in
cache. These must have been built locally.
Additionally, add comprehensive debug logging to help diagnose the root
cause and any future edge cases:
- Log all packages in newlyBuiltMap with their versions
- Log categorization decision for each package (inNewlyBuilt,
inPkgsToDownload, status)
- Log when defensive fix is applied
This defensive fix handles the edge case gracefully while the logging
will help identify the underlying cause in production.
Evidence: https://github.com/gitpod-io/gitpod-next/actions/runs/19638569673/job/56247504536
Co-authored-by: Ona <no-reply@ona.com>1 parent 73bc825 commit 1eae92f
1 file changed
+29
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
780 | 780 | | |
781 | 781 | | |
782 | 782 | | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
783 | 787 | | |
784 | 788 | | |
785 | 789 | | |
| |||
802 | 806 | | |
803 | 807 | | |
804 | 808 | | |
805 | | - | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
806 | 821 | | |
807 | 822 | | |
808 | 823 | | |
809 | 824 | | |
810 | 825 | | |
811 | | - | |
| 826 | + | |
812 | 827 | | |
813 | 828 | | |
814 | | - | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
815 | 840 | | |
816 | 841 | | |
817 | | - | |
| 842 | + | |
818 | 843 | | |
819 | 844 | | |
820 | 845 | | |
| |||
0 commit comments