From f2de1c0d2e6ef07193d3860c0087bd2ebd421674 Mon Sep 17 00:00:00 2001 From: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> Date: Mon, 16 Nov 2026 07:43:09 -0300 Subject: [PATCH] fix(ci): run the Release-Green hosted suites in pr gate mode validate-release-green gives its own HARD gates OMNIROUTE_GATE_MODE=pr (plan "derived numbers and texts resolved only at release"), but the unit/integration/vitest results it reads through --suites-from come from the hosted `suites` and `main-suites` jobs, which set no mode. A scheduled run resolves to release mode there, so the locale-parity tests fail on every key a feature PR adds to en.json: on 2026-11-16 unit-1/unit-4 failed "should contain every key present in en.json" after #19538, and base-red #19329 stayed open. Set the same pr mode on both suite jobs. Release-mode assertions stay with the release cut. --- .github/workflows/nightly-release-green.yml | 8 ++++++++ .../build/release-green-hosted-suites.test.ts | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/.github/workflows/nightly-release-green.yml b/.github/workflows/nightly-release-green.yml index eaa2befdd12..2715998190b 100644 --- a/.github/workflows/nightly-release-green.yml +++ b/.github/workflows/nightly-release-green.yml @@ -134,6 +134,10 @@ jobs: JWT_SECRET: ci-nightly-secret-with-sufficient-length-for-validation API_KEY_SECRET: ci-nightly-api-key-secret-long DISABLE_SQLITE_AUTO_BACKUP: "true" + # Same gate mode as the observer's own HARD gates (withHardGateMode in + # validate-release-green.mjs): these results feed its verdict through --suites-from. + # Release-mode assertions (e.g. locale key parity) belong to the release cut. + OMNIROUTE_GATE_MODE: "pr" steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 with: @@ -473,6 +477,10 @@ jobs: JWT_SECRET: ci-nightly-secret-with-sufficient-length-for-validation API_KEY_SECRET: ci-nightly-api-key-secret-long DISABLE_SQLITE_AUTO_BACKUP: "true" + # Same gate mode as the observer's own HARD gates (withHardGateMode in + # validate-release-green.mjs): these results feed its verdict through --suites-from. + # Release-mode assertions (e.g. locale key parity) belong to the release cut. + OMNIROUTE_GATE_MODE: "pr" steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 with: diff --git a/tests/unit/build/release-green-hosted-suites.test.ts b/tests/unit/build/release-green-hosted-suites.test.ts index 1f1337d6aa5..69c92eb4848 100644 --- a/tests/unit/build/release-green-hosted-suites.test.ts +++ b/tests/unit/build/release-green-hosted-suites.test.ts @@ -10,6 +10,7 @@ const { shardCountFromCi } = await import("../../../scripts/quality/validate-rel const { suiteResult } = await import("../../../scripts/ci/release-green-suite.mjs"); type Job = { + env?: Record; needs?: string | string[]; if?: string; "runs-on"?: string; @@ -56,6 +57,23 @@ test("the hosted suite matrix has exactly ci.yml's unit and integration shards p } }); +test("hosted suites run in pr gate mode, like every HARD item of the observer", () => { + // Plan "derived numbers and texts resolved only at release" (2026-11-13): a HARD red answers + // "did the base break?", never "is a derived value behind?". validate-release-green gives its + // own HARD gates OMNIROUTE_GATE_MODE=pr (withHardGateMode); these hosted suites feed the same + // verdict through --suites-from, so they take the same mode. Without it a scheduled run + // resolves to release mode and the locale-parity tests (tests/_helpers/localeParityMode.ts) + // fail on every key a feature PR adds to en.json: unit-1/unit-4 on 2026-11-16. + // main-suites feeds main-green the same way. + for (const name of ["suites", "main-suites"]) { + const job = workflow.jobs[name]; + assert.equal(job.env?.OMNIROUTE_GATE_MODE, "pr", `${name} runs in pr mode`); + for (const step of job.steps ?? []) { + assert.equal(step.env?.OMNIROUTE_GATE_MODE, undefined, `${name}: no per-step override`); + } + } +}); + test("suites run hosted on the resolved commit and only outside push", () => { const suites = workflow.jobs.suites; assert.equal(suites["runs-on"], "ubuntu-latest");