mirror of
https://github.com/morluto/rea.git
synced 2026-12-06 15:33:56 +08:00
fix(ci): track configuration inputs across cached checks (#14015)
This commit is contained in:
@@ -77,6 +77,8 @@ const STATIC_CODE_ONLY_INPUTS = [
|
|||||||
// and portable tests without changing packaged host behavior.
|
// and portable tests without changing packaged host behavior.
|
||||||
const DOCS_AND_CODE_INPUTS = [
|
const DOCS_AND_CODE_INPUTS = [
|
||||||
"scripts/check-doc-facts.mjs",
|
"scripts/check-doc-facts.mjs",
|
||||||
|
"scripts/generate-completion-ledger.mjs",
|
||||||
|
"scripts/lib/completion-ledger-generation.mts",
|
||||||
"scripts/generate-error-schema.mjs",
|
"scripts/generate-error-schema.mjs",
|
||||||
"scripts/generate-third-party-inventory.mjs",
|
"scripts/generate-third-party-inventory.mjs",
|
||||||
"scripts/lib/product-catalog.*",
|
"scripts/lib/product-catalog.*",
|
||||||
@@ -226,7 +228,11 @@ export function planChanges(request, repository) {
|
|||||||
if (matchesAny(file, earlyAll ? paths : earlyInputs))
|
if (matchesAny(file, earlyAll ? paths : earlyInputs))
|
||||||
selected[owner] = true;
|
selected[owner] = true;
|
||||||
// The documentation check validates living prose and the lockfile inventory.
|
// The documentation check validates living prose and the lockfile inventory.
|
||||||
if (isLivingProsePath(file) || file === "package-lock.json")
|
if (
|
||||||
|
isLivingProsePath(file) ||
|
||||||
|
file === "package-lock.json" ||
|
||||||
|
file === "website/locales/languages.json"
|
||||||
|
)
|
||||||
selected.docs = true;
|
selected.docs = true;
|
||||||
if (file === ".git-blame-ignore-revs") return;
|
if (file === ".git-blame-ignore-revs") return;
|
||||||
if (
|
if (
|
||||||
|
|||||||
@@ -596,6 +596,8 @@ it("routes license inventories to docs checks and keeps blame-ignore edits forma
|
|||||||
for (const docsAndCode of [
|
for (const docsAndCode of [
|
||||||
"scripts/check-doc-facts.mjs",
|
"scripts/check-doc-facts.mjs",
|
||||||
"scripts/lib/product-catalog.mjs",
|
"scripts/lib/product-catalog.mjs",
|
||||||
|
"scripts/generate-completion-ledger.mjs",
|
||||||
|
"scripts/lib/completion-ledger-generation.mts",
|
||||||
]) {
|
]) {
|
||||||
expect(await classifyPaths([docsAndCode]), docsAndCode).toMatchObject({
|
expect(await classifyPaths([docsAndCode]), docsAndCode).toMatchObject({
|
||||||
code: true,
|
code: true,
|
||||||
@@ -615,6 +617,17 @@ it("routes license inventories to docs checks and keeps blame-ignore edits forma
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("checks README locale links when the website language inventory changes", async () => {
|
||||||
|
expect(await classifyPaths(["website/locales/languages.json"])).toMatchObject(
|
||||||
|
{
|
||||||
|
docs: true,
|
||||||
|
website: true,
|
||||||
|
runtime: false,
|
||||||
|
package: false,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
it("passes the workflow environment through the entrypoint unchanged", async () => {
|
it("passes the workflow environment through the entrypoint unchanged", async () => {
|
||||||
const { directory, base } = await fixture();
|
const { directory, base } = await fixture();
|
||||||
const head = await change(directory, ["src/evm/Example.ts"]);
|
const head = await change(directory, ["src/evm/Example.ts"]);
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ describe("literal tool counts", () => {
|
|||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("invalidates the cached documentation check for every scanned root", async () => {
|
it("invalidates the cached documentation check for prose and directly inspected files", async () => {
|
||||||
const turbo = JSON.parse(
|
const turbo = JSON.parse(
|
||||||
await readFile(join(root, "turbo.json"), "utf8"),
|
await readFile(join(root, "turbo.json"), "utf8"),
|
||||||
) as {
|
) as {
|
||||||
@@ -74,7 +74,14 @@ describe("literal tool counts", () => {
|
|||||||
: [`${start}/nested/page.md`, `${start}/nested/page.html`],
|
: [`${start}/nested/page.md`, `${start}/nested/page.html`],
|
||||||
);
|
);
|
||||||
expect(samples.every(isLivingProsePath)).toBe(true);
|
expect(samples.every(isLivingProsePath)).toBe(true);
|
||||||
expect(samples.filter((path) => !cached(path))).toEqual([]);
|
const directlyInspected = [
|
||||||
|
".cursor-plugin/skills/reverse-engineer-anything/SKILL.md",
|
||||||
|
".github/pull_request_template.md",
|
||||||
|
"website/locales/languages.json",
|
||||||
|
];
|
||||||
|
expect(
|
||||||
|
[...samples, ...directlyInspected].filter((path) => !cached(path)),
|
||||||
|
).toEqual([]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -27,7 +27,7 @@
|
|||||||
"include": [
|
"include": [
|
||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
"tests/**/*.ts",
|
"tests/**/*.ts",
|
||||||
"vitest.config.ts",
|
"vitest*.config.ts",
|
||||||
"docs/.vitepress/config.ts"
|
"docs/.vitepress/config.ts"
|
||||||
],
|
],
|
||||||
"exclude": ["dist", "node_modules"]
|
"exclude": ["dist", "node_modules"]
|
||||||
|
|||||||
+19
-1
@@ -47,7 +47,7 @@
|
|||||||
"tsconfig.json",
|
"tsconfig.json",
|
||||||
"tsconfig.build.json",
|
"tsconfig.build.json",
|
||||||
"tsconfig.scripts.json",
|
"tsconfig.scripts.json",
|
||||||
"vitest.config.ts",
|
"vitest*.config.ts",
|
||||||
"scripts/**/*.d.{cts,mts,ts}",
|
"scripts/**/*.d.{cts,mts,ts}",
|
||||||
"scripts/**/*.mjs",
|
"scripts/**/*.mjs",
|
||||||
"scripts/**/package.json",
|
"scripts/**/package.json",
|
||||||
@@ -161,6 +161,7 @@
|
|||||||
"scripts/generate-*.mjs",
|
"scripts/generate-*.mjs",
|
||||||
"scripts/check-doc-facts.mjs",
|
"scripts/check-doc-facts.mjs",
|
||||||
"scripts/lib/*.mjs",
|
"scripts/lib/*.mjs",
|
||||||
|
"scripts/lib/completion-ledger-generation.mts",
|
||||||
"scripts/verify/managed/*.mjs",
|
"scripts/verify/managed/*.mjs",
|
||||||
"scripts/fixtures/managed/*.mjs",
|
"scripts/fixtures/managed/*.mjs",
|
||||||
"scripts/verify/apple/*.mjs",
|
"scripts/verify/apple/*.mjs",
|
||||||
@@ -172,9 +173,12 @@
|
|||||||
"!docs/public/product-catalog.json",
|
"!docs/public/product-catalog.json",
|
||||||
"!docs/verification/managed-conformance-*.json",
|
"!docs/verification/managed-conformance-*.json",
|
||||||
".agents/skills/**",
|
".agents/skills/**",
|
||||||
|
".cursor-plugin/skills/**",
|
||||||
|
".github/pull_request_template.md",
|
||||||
"README*.md",
|
"README*.md",
|
||||||
"AGENTS.md",
|
"AGENTS.md",
|
||||||
"CONTRIBUTING.md",
|
"CONTRIBUTING.md",
|
||||||
|
"website/locales/languages.json",
|
||||||
"website/public/**/*.{md,html}",
|
"website/public/**/*.{md,html}",
|
||||||
{
|
{
|
||||||
"mode": "dependencyOutputs",
|
"mode": "dependencyOutputs",
|
||||||
@@ -216,7 +220,14 @@
|
|||||||
"package.json",
|
"package.json",
|
||||||
"package-lock.json",
|
"package-lock.json",
|
||||||
"scripts/generate-completion-ledger.mjs",
|
"scripts/generate-completion-ledger.mjs",
|
||||||
|
"scripts/lib/canonical-temporary-directory.mjs",
|
||||||
|
"scripts/lib/completion-ledger-generation.mts",
|
||||||
"scripts/lib/generated-file.mjs",
|
"scripts/lib/generated-file.mjs",
|
||||||
|
"scripts/lib/verifier-artifact-scope.mjs",
|
||||||
|
"scripts/lib/verifier-cleanup.mjs",
|
||||||
|
"scripts/lib/verifier-fixture.mjs",
|
||||||
|
"scripts/lib/verifier-run.mjs",
|
||||||
|
"scripts/lib/verifier-source-loader.mjs",
|
||||||
"scripts/verify/managed/**",
|
"scripts/verify/managed/**",
|
||||||
"scripts/fixtures/managed/**"
|
"scripts/fixtures/managed/**"
|
||||||
],
|
],
|
||||||
@@ -246,7 +257,14 @@
|
|||||||
"package.json",
|
"package.json",
|
||||||
"package-lock.json",
|
"package-lock.json",
|
||||||
"scripts/generate-completion-ledger.mjs",
|
"scripts/generate-completion-ledger.mjs",
|
||||||
|
"scripts/lib/canonical-temporary-directory.mjs",
|
||||||
|
"scripts/lib/completion-ledger-generation.mts",
|
||||||
"scripts/lib/generated-file.mjs",
|
"scripts/lib/generated-file.mjs",
|
||||||
|
"scripts/lib/verifier-artifact-scope.mjs",
|
||||||
|
"scripts/lib/verifier-cleanup.mjs",
|
||||||
|
"scripts/lib/verifier-fixture.mjs",
|
||||||
|
"scripts/lib/verifier-run.mjs",
|
||||||
|
"scripts/lib/verifier-source-loader.mjs",
|
||||||
"scripts/verify/managed/**",
|
"scripts/verify/managed/**",
|
||||||
"scripts/fixtures/managed/**",
|
"scripts/fixtures/managed/**",
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user