@@ -688,7 +688,10 @@ jobs:
688688 #
689689 # So is this file, since 2026-09-24 and the owner's decision. A change
690690 # to the race job itself used to leave it skipped, so the first run of
691- # a new definition was the weekly sweep, days after it merged.
691+ # a new definition was the weekly sweep, days after it merged. And so
692+ # is .github/build-tags, which every command of the job reads and which
693+ # decides the files it compiles - the same reason as go.mod, named by
694+ # an outside review of the pull request that split the job.
692695 #
693696 # Anything unclear counts as touched. A first push, a branch with no
694697 # comparable parent, a pull request event with no before - all answer
@@ -697,7 +700,7 @@ jobs:
697700 # in somebody else's file.
698701 run : |
699702 set -euo pipefail
700- watched='internal/format/registry.go internal/damage/damage.go cmd/tfg/main.go internal/gui/window/run.go internal/gui/run_cgo.go internal/gui/window/tidy.go internal/audit/parallel.go internal/engine/parallel.go go.mod .github/workflows/ci.yml'
703+ watched='internal/format/registry.go internal/damage/damage.go cmd/tfg/main.go internal/gui/window/run.go internal/gui/run_cgo.go internal/gui/window/tidy.go internal/audit/parallel.go internal/engine/parallel.go go.mod .github/workflows/ci.yml .github/build-tags '
701704 # On a pull request there is no "before" - the field belongs to a push
702705 # - so this asked for something empty and every pull request answered
703706 # "touched". That quietly undid the decision of 2026-08-20, because
@@ -765,11 +768,18 @@ jobs:
765768 #
766769 # Every part reports. One red part does not cancel the others, whose tests
767770 # would then go unrun.
771+ #
772+ # The ceiling is the sum of the limits inside it, with room left over, so
773+ # that each of them fires first and names what was slow: about four minutes
774+ # to set up and compile (the compile alone took 3m03s on the first run),
775+ # twenty for the guards, five for the other packages. Measured on the first
776+ # run: 677, 635, 164 and 154 s of guards in the four parts, 14m55s for the
777+ # longest part.
768778 strategy :
769779 fail-fast : false
770780 matrix :
771781 part : [0, 1, 2, 3]
772- timeout-minutes : 30
782+ timeout-minutes : 35
773783 env :
774784 # The one thing in this project that needs a C toolchain. Linux runners
775785 # ship one, so this job carries the cost and the matrix above stays on
@@ -823,13 +833,11 @@ jobs:
823833 # job-index counts from nought, so this asks), a part given no test,
824834 # and a part that ran fewer tests than it was given.
825835 #
826- # Every other package runs in part 0. None holds a test today, and one
827- # written there has to reach the detector as well.
828- #
829836 # The timeout is stated rather than left to Go's ten minutes a package,
830837 # and stays below the job's ceiling, so a slow part fails as a test with
831838 # a name rather than as a killed job with no output. Go's ten minutes
832839 # killed this job on 2026-08-25, before a timeout was stated here.
840+ # Twenty minutes is 1.8 times the slowest part measured.
833841 env :
834842 PART : ${{ strategy.job-index }}
835843 PARTS : ${{ strategy.job-total }}
@@ -848,17 +856,32 @@ jobs:
848856 echo "part $PART was given no test"
849857 exit 1
850858 fi
851- go test -tags "$(cat .github/build-tags)" ./internal/guard/ -count=1 -race -timeout 25m -v -run "^($(paste -sd'|' mine.txt))\$" 2>&1 | tee part.log
859+ go test -tags "$(cat .github/build-tags)" ./internal/guard/ -count=1 -race -timeout 20m -v -run "^($(paste -sd'|' mine.txt))\$" 2>&1 | tee part.log
852860 ran=$(grep -cE '^=== RUN [^/]+$' part.log || true)
853861 if [ "$ran" -ne "$planned" ]; then
854862 echo "part $PART was given $planned tests and ran $ran"
855863 exit 1
856864 fi
857- if [ "$PART" -eq 0 ]; then
858- go list -tags "$(cat .github/build-tags)" ./... | grep -v '/internal/guard$' > others.txt
859- mapfile -t others < others.txt
860- go test -tags "$(cat .github/build-tags)" -count=1 -race -timeout 25m "${others[@]}"
861- fi
865+ shell : bash
866+
867+ - name : the other packages under the race detector
868+ # Every package outside internal/guard, in part 0 alone. None holds a
869+ # test today - the first run took one second for all of them - and one
870+ # written there has to reach the detector as well.
871+ #
872+ # A step of its own with a ceiling of its own, rather than a second
873+ # command after the guards. Go's -timeout holds one test binary, so two
874+ # commands in one step add up under nothing but the job's ceiling, and
875+ # the job would be killed past it with no name in the log - an outside
876+ # review of the pull request that split the job. Runs after red guards
877+ # as well, so its answer is not lost with theirs.
878+ if : ${{ !cancelled() && matrix.part == 0 }}
879+ timeout-minutes : 5
880+ run : |
881+ set -euo pipefail
882+ go list -tags "$(cat .github/build-tags)" ./... | grep -v '/internal/guard$' > others.txt
883+ mapfile -t others < others.txt
884+ go test -tags "$(cat .github/build-tags)" -count=1 -race -timeout 4m "${others[@]}"
862885 shell : bash
863886
864887 coverage :
0 commit comments