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.
This commit is contained in:
diegosouzapw
2026-11-16 07:43:09 -03:00
parent 225bedf8b5
commit f2de1c0d2e
2 changed files with 26 additions and 0 deletions

View File

@@ -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:

View File

@@ -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<string, string>;
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");