

























@@ -15,6 +15,10 @@ function readWorkflowSanityWorkflow() {
1515return parse(readFileSync(".github/workflows/workflow-sanity.yml", "utf8"));
1616}
171718+function readRealBehaviorProofWorkflow() {
19+return parse(readFileSync(".github/workflows/real-behavior-proof.yml", "utf8"));
20+}
21+1822function readCriticalQualityWorkflow() {
1923return readFileSync(".github/workflows/codeql-critical-quality.yml", "utf8");
2024}
@@ -84,6 +88,18 @@ describe("ci workflow guards", () => {
8488expect(findUnpinnedExternalActions()).toEqual([]);
8589});
869091+it("runs real behavior proof from the trusted workflow revision", () => {
92+const workflow = readRealBehaviorProofWorkflow();
93+const source = readFileSync(".github/workflows/real-behavior-proof.yml", "utf8");
94+const checkout = workflow.jobs["real-behavior-proof"].steps.find(
95+(step) => step.uses === CHECKOUT_V6,
96+);
97+98+expect(checkout.with.ref).toBe("${{ github.workflow_sha }}");
99+expect(checkout.with.ref).not.toBe("${{ github.event.pull_request.base.sha }}");
100+expect(source).toContain("Old PR events can carry a stale base SHA");
101+});
102+87103it("keeps docs-change detection fail-safe and fixture-aware", () => {
88104const action = readFileSync(".github/actions/detect-docs-changes/action.yml", "utf8");
89105@@ -467,7 +483,7 @@ describe("ci workflow guards", () => {
467483expect(runStep.env.OPENCLAW_TEST_PROJECTS_PARALLEL).toBe("2");
468484expect(runStep.env.OPENCLAW_NODE_TEST_ENV_JSON).toBe("${{ toJson(matrix.env) }}");
469485expect(runStep.run).toContain("env: JSON.parse(process.env.OPENCLAW_NODE_TEST_ENV_JSON");
470-expect(runStep.run).toContain("if (plan.env && typeof plan.env === \"object\"");
486+expect(runStep.run).toContain('if (plan.env && typeof plan.env === "object"');
471487expect(runStep.run).toContain("childEnv[key] = value");
472488});
473489此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。