mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-09-19 13:23:50 +03:00
Adds a shadow release-acceptance report alongside release-green: an inventory/reduce/oracle pipeline under `scripts/quality/release-acceptance/` with a JSON schema, fixtures and a workflow that uploads the report as an artifact. Contained by design, which is why it merges as-is: it runs only on push to `release/v*` and on manual dispatch (never on pull requests), the step is `continue-on-error`, `permissions: contents: read`, `persist-credentials: false`, and it consumes no secrets. Nothing in the product changes; the report is advisory until we decide to promote it. Validated as a combined board first (this PR merged with the 11 siblings of the same batch on the release tip): eslint on every changed file with the suppressions file, typecheck:core, check:open-sse-typecheck, complexity, cognitive-complexity, changelog-integrity, i18n new-key coverage, docs-sync, migration-numbering, provider-consistency and a duplicate-identifier audit all green, plus 275 passing / 0 failing focused node:test cases across the 28 test files the batch touches. Then re-validated alone on the fresh tip before this merge: conflicts re-resolved, file sizes rebaselined for this PR's own growth, eslint and this PR's focused tests re-run. Thanks @HouMinXi! Co-authored-by: Diego Rodrigues de Sa e Souza <diegosouza.pw@gmail.com>
41 lines
1.7 KiB
TypeScript
41 lines
1.7 KiB
TypeScript
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
import { readFileSync } from "node:fs";
|
|
import { COLLECTORS } from "../../scripts/check/check-test-discovery.mjs";
|
|
import {
|
|
knownUnexecuted,
|
|
inventoryErrors,
|
|
} from "../../scripts/quality/release-acceptance/inventory.mjs";
|
|
|
|
const RELEASE_SUITES = ["test:unit:ci", "test:vitest", "test:integration"];
|
|
const baseline = JSON.parse(
|
|
readFileSync(new URL("../../config/quality/test-discovery-baseline.json", import.meta.url), "utf8")
|
|
);
|
|
|
|
test("tsx files under tests/unit are known_unexecuted for release scope, not inventory errors", () => {
|
|
const ku = knownUnexecuted(RELEASE_SUITES, COLLECTORS, baseline);
|
|
const tsx = ku.collectors.find((c) => c.glob === "tests/unit/**/*.test.tsx");
|
|
assert.ok(tsx, "tsx collector must be listed as known_unexecuted");
|
|
assert.equal(typeof tsx.count, "number");
|
|
assert.ok(tsx.count > 0);
|
|
});
|
|
|
|
test("omitting a collector without listing it is an inventory error", () => {
|
|
const collectors = COLLECTORS.filter((c) => c.glob !== "tests/unit/**/*.test.tsx");
|
|
const discoveredFiles = ["tests/unit/AutoComboCatalog.test.tsx"];
|
|
const errors = inventoryErrors(RELEASE_SUITES, collectors, baseline, discoveredFiles);
|
|
assert.ok(errors.some((e) => e.code === "collector_omitted"));
|
|
});
|
|
|
|
test("combo-matrix glob is in release integration scope, not known_unexecuted", () => {
|
|
const ku = knownUnexecuted(RELEASE_SUITES, COLLECTORS, baseline);
|
|
assert.equal(
|
|
ku.collectors.some((c) => c.glob === "tests/integration/combo-matrix/*.test.ts"),
|
|
false
|
|
);
|
|
const combo = COLLECTORS.find(
|
|
(c) => c.glob === "tests/integration/combo-matrix/*.test.ts"
|
|
);
|
|
assert.ok(combo);
|
|
});
|