diff --git a/.github/workflows/local-ci.yml b/.github/workflows/local-ci.yml index 43769763f4..9acd7ba41e 100644 --- a/.github/workflows/local-ci.yml +++ b/.github/workflows/local-ci.yml @@ -16,15 +16,16 @@ # success — which RE-RUNS the stale lane instead of merely reporting it stale. # That needs `actions: read` below to see its own history. # -# The ts and java ports are each split into parallel jobs — a FAST lane (the -# quick pure-code correctness signal: ts-fast = build+typecheck/conformance/ -# completeness, java-fast = java+kotlin conformance), a UNIT lane for ts (ts-unit = -# the full per-package suites — metadata/render/runtime-ts + client/web — that -# ts-fast's named-file conformance gate leaves ungated), and a SLOW lane (docker -# integration + heavy build: ts-slow, java-slow = reactor + integration). The -# split surfaces the verdict fast and means a cancel/OOM/flake mid-integration no -# longer kills the fast signal. `detect` emits the umbrella token (`ts` / `java`); -# all of that port's jobs gate on it. +# The ts port is split into parallel jobs — a FAST lane (the quick pure-code +# correctness signal: ts-fast = build+typecheck/conformance/completeness), a UNIT +# lane (ts-unit = the full per-package suites — metadata/render/runtime-ts + +# client/web — that ts-fast's named-file conformance gate leaves ungated), and a +# SLOW lane (docker integration: ts-slow). The split surfaces the verdict fast and +# means a cancel/OOM/flake mid-integration no longer kills the fast signal. The java +# port is ONE job, java-slow = the full reactor with tests on (which already runs +# every java and kotlin conformance class) + docker integration: a separate +# conformance-only job would run those same classes a second time. `detect` emits +# the umbrella token (`ts` / `java`); all of that port's jobs gate on it. # # Integration-running jobs (ts-slow, python, csharp, java-slow) share a Postgres # SIDECAR instead of each test booting its own Testcontainers Postgres per @@ -190,21 +191,9 @@ jobs: RUNTIME_TS_PG_EXPECT: '1' run: scripts/ci-local.sh --only ts-slow --strict-toolchains - # Java FAST lane — java + kotlin conformance only (the quick correctness signal). - # No docker/integration, so no sidecar. - java-fast: - needs: detect - if: contains(needs.detect.outputs.ports, 'java') - runs-on: [self-hosted, linux] - timeout-minutes: 25 - steps: - - uses: actions/checkout@v4 - with: - persist-credentials: false - - run: scripts/ci-local.sh --only java-fast --strict-toolchains - - # Java SLOW lane — full reactor + docker integration (java + kotlin). Uses the - # shared Postgres sidecar so integration stops booting per-scenario containers. + # Java lane — full reactor with tests on (every java and kotlin conformance class + # lives in a reactor module, so it runs here) + docker integration (java + kotlin). + # Uses the shared Postgres sidecar so integration stops booting per-scenario containers. java-slow: needs: detect if: contains(needs.detect.outputs.ports, 'java') @@ -326,7 +315,7 @@ jobs: run: scripts/ci-local.sh --only csharp --strict-toolchains notify: - needs: [detect, gates, ts-fast, ts-unit, ts-slow, java-fast, java-slow, python, csharp] + needs: [detect, gates, ts-fast, ts-unit, ts-slow, java-slow, python, csharp] if: always() && contains(needs.*.result, 'failure') runs-on: [self-hosted, linux] steps: diff --git a/.github/workflows/pr-ci.yml b/.github/workflows/pr-ci.yml index 85e21d5f9c..08dda900dc 100644 --- a/.github/workflows/pr-ci.yml +++ b/.github/workflows/pr-ci.yml @@ -97,6 +97,7 @@ jobs: steps: - uses: actions/checkout@v4 with: + fetch-depth: 0 # the mutation gate needs a merge base with origin/$GITHUB_BASE_REF to diff-scope persist-credentials: false - uses: oven-sh/setup-bun@v2 with: diff --git a/scripts/ci-lane-map.txt b/scripts/ci-lane-map.txt index 387908d8ba..675f3e5676 100644 --- a/scripts/ci-lane-map.txt +++ b/scripts/ci-lane-map.txt @@ -11,8 +11,8 @@ # ALL every lane below # NONE no test lane (the `gates` lane still runs; see below) # Lanes: ts-fast ts-unit java-slow python csharp. These are the ci-local sections a -# change can select. ts-slow, java-fast, cube and mutation are not selectable here: -# the first three need docker or duplicate a lane below, and mutation is diff-scoped +# change can select. ts-slow, cube and mutation are not selectable here: +# the first two need docker, and mutation is diff-scoped # inside ts-fast already (gate_completeness_diff in ci-local.sh), which this map neither # widens nor narrows. # diff --git a/scripts/ci-local.sh b/scripts/ci-local.sh index 6926575841..c78b0c4e39 100755 --- a/scripts/ci-local.sh +++ b/scripts/ci-local.sh @@ -59,10 +59,13 @@ # # java → java+kotlin conformance, reactor, # # integration-tests java+kotlin # # java-fast → java+kotlin conformance only -# # (the quick correctness signal) -# # java-slow → reactor + integration-tests -# # (java+kotlin); CI runs the two -# # lanes as separate parallel jobs +# # (the quick correctness signal; a local +# # selector and conformance.yml's lane, no +# # local-ci job: java-slow's reactor already +# # runs these classes) +# # java-slow → reactor (which runs every java and +# # kotlin conformance class) + integration- +# # tests (java+kotlin); local-ci's one java job # # python → full python test suite + integration-tests # # csharp → full csharp codegen suite + conformance # # + integration-tests @@ -1325,8 +1328,8 @@ lane_python() { } # NOT run here: `conformance: java` and `conformance: kotlin`. Every test class those two # name lives in a reactor module, and java-reactor runs every test in every reactor module, -# so in the full run they ran each of those tests a second time. They stay the java-fast -# lane's quick signal, where the reactor is a separate job. +# so in the full run they ran each of those tests a second time. `--only java-fast` keeps +# them as a quick local signal and as conformance.yml's lane; local-ci has no java-fast job. lane_java() { if want java; then echo " (conformance: java / kotlin run inside java-reactor — every class they name is in a reactor module)" @@ -1525,12 +1528,11 @@ elif [ "$PARALLEL" -eq 0 ]; then else # Heavy tier for --only — other-language ports + full reactor + docker integration. # - # The Java port is split into two lanes so CI can run them as separate jobs - # (see .github/workflows/local-ci.yml): a FAST lane (java+kotlin conformance, - # ~2-3m — the correctness signal) and a SLOW lane (full reactor + docker - # integration). Running them as parallel jobs surfaces the conformance verdict - # quickly and means a cancel/OOM mid-integration no longer kills the fast - # signal. `--only java` still runs BOTH lanes, in order. + # The Java port has two selectors: java-fast (java+kotlin conformance, ~2-3m, a quick + # local signal and conformance.yml's lane) and java-slow (full reactor + docker + # integration). The reactor runs every java-fast class, so local-ci runs java-slow + # alone (.github/workflows/local-ci.yml). `--only java` runs the conformance steps + # and the reactor, in order. run_csharp_steps if want_any java java-fast; then step_if mvn "conformance: java" gate_conf_java; fi run_python_steps diff --git a/scripts/ci-ports-to-run.sh b/scripts/ci-ports-to-run.sh index 615b83d56c..338002c527 100755 --- a/scripts/ci-ports-to-run.sh +++ b/scripts/ci-ports-to-run.sh @@ -46,14 +46,14 @@ RUN_WINDOW="${MO_PORTS_RUN_WINDOW:-20}" lane_port() { case "$1" in ts-fast|ts-unit|ts-slow) echo ts ;; - java-fast|java-slow) echo java ;; + java-slow) echo java ;; python) echo python ;; csharp) echo csharp ;; *) echo "" ;; esac } -all_lanes() { echo "ts-fast ts-unit ts-slow java-fast java-slow python csharp"; } +all_lanes() { echo "ts-fast ts-unit ts-slow java-slow python csharp"; } # Canonical order, deduplicated, unknown tokens dropped. The order is FIXED rather than # sorted because the workflow tests the result with `contains(..., 'ts')` — a substring diff --git a/scripts/test-ci-ports-to-run.sh b/scripts/test-ci-ports-to-run.sh index 48046bc054..06b7e0568c 100755 --- a/scripts/test-ci-ports-to-run.sh +++ b/scripts/test-ci-ports-to-run.sh @@ -25,36 +25,36 @@ check "ts" "$(union_ports ts bogus)" "union dro # ── not_green_ports: newest verdict per lane wins ───────────────────────────── all_green() { - printf '%s\tsuccess\n' ts-fast ts-unit ts-slow java-fast java-slow python csharp + printf '%s\tsuccess\n' ts-fast ts-unit ts-slow java-slow python csharp } check "" "$(all_green | not_green_ports)" "every lane green -> nothing to re-run" # The defect this file exists for: a docs-only run SKIPS the code lanes, so the # newest run says nothing about them and the verdict must come from the run before. -check "java" "$( { printf '%s\tskipped\n' ts-fast ts-unit ts-slow java-fast java-slow python csharp +check "java" "$( { printf '%s\tskipped\n' ts-fast ts-unit ts-slow java-slow python csharp printf '%s\tsuccess\n' ts-fast ts-unit ts-slow python csharp - printf '%s\tfailure\n' java-fast java-slow; } | not_green_ports )" \ + printf '%s\tfailure\n' java-slow; } | not_green_ports )" \ "docs-only run skips a red java -> java still not green" -check "ts" "$( { printf '%s\tsuccess\n' ts-fast ts-unit java-fast java-slow python csharp +check "ts" "$( { printf '%s\tsuccess\n' ts-fast ts-unit java-slow python csharp printf 'ts-slow\tfailure\n'; } | not_green_ports )" \ "one red ts lane selects the whole ts port" # `skipped` is walked past, never counted as a verdict — it describes the # selection, not the code. check "" "$( { printf 'ts-fast\tskipped\n' - printf '%s\tsuccess\n' ts-fast ts-unit ts-slow java-fast java-slow python csharp; } | not_green_ports )" \ + printf '%s\tsuccess\n' ts-fast ts-unit ts-slow java-slow python csharp; } | not_green_ports )" \ "skipped is walked past to the real verdict" # A lane that was cancelled was never verified. cancel-in-progress makes this # common, so counting it as green would reopen the hole from the other side. -check "csharp" "$( { printf '%s\tsuccess\n' ts-fast ts-unit ts-slow java-fast java-slow python +check "csharp" "$( { printf '%s\tsuccess\n' ts-fast ts-unit ts-slow java-slow python printf 'csharp\tcancelled\n'; } | not_green_ports )" \ "cancelled is not green" # No verdict at all in the window is UNKNOWN, and unknown must widen. -check "python" "$(printf '%s\tsuccess\n' ts-fast ts-unit ts-slow java-fast java-slow csharp | not_green_ports)" \ +check "python" "$(printf '%s\tsuccess\n' ts-fast ts-unit ts-slow java-slow csharp | not_green_ports)" \ "a lane with no verdict in the window is not green" check "ts java python csharp" "$(printf '' | not_green_ports)" "no history at all -> everything"