diff --git a/.github/workflows/pr-test.yml b/.github/workflows/pr-test.yml index d6d663965..d7261d566 100644 --- a/.github/workflows/pr-test.yml +++ b/.github/workflows/pr-test.yml @@ -99,6 +99,7 @@ jobs: if: | always() && !cancelled() && + needs.check-changes.result == 'success' && github.event_name == 'pull_request' && inputs.test_parallel_dispatch != true && (needs.check-changes.outputs.main_package == 'true' || needs.check-changes.outputs.sgl_kernel == 'true') && @@ -127,6 +128,7 @@ jobs: if: | always() && !cancelled() && + needs.check-changes.result == 'success' && github.event_name == 'pull_request' && inputs.test_parallel_dispatch != true && (needs.check-changes.outputs.main_package == 'true' || needs.check-changes.outputs.sgl_kernel == 'true') && @@ -266,6 +268,7 @@ jobs: needs: [check-changes, call-gate] if: | always() && + needs.check-changes.result == 'success' && ((github.event_name == 'schedule' || inputs.test_parallel_dispatch == true) || (!failure() && !cancelled())) && (needs.check-changes.outputs.main_package == 'true') runs-on: ubuntu-latest diff --git a/scripts/ci/utils/compute_partitions.py b/scripts/ci/utils/compute_partitions.py index 6b3c44c58..a601c2de3 100644 --- a/scripts/ci/utils/compute_partitions.py +++ b/scripts/ci/utils/compute_partitions.py @@ -148,6 +148,11 @@ def compute_partitions( fit = fit_table.get(suite) or {} coeff = fit.get("coeff", 1.0) bias = fit.get("bias", 0.0) + # Defense in depth: a non-positive slope is regression noise (more + # work cannot reduce wall time), and its runaway intercept can push + # every shard budget negative. Fall back to the static estimate. + if coeff <= 0: + coeff, bias = 1.0, 0.0 # Each shard pays `bias` once, so size >= coeff*total / (target-bias). if suite in _BASE_A_OVERRIDES: