From 2f40e95b7d5e424708f4e0c8760364edab981662 Mon Sep 17 00:00:00 2001 From: Williams Ashibuogwu Date: Thu, 19 Nov 2026 01:59:42 +0100 Subject: [PATCH 01/10] test: cover v3.0.7 post-tag documentation publish allowance --- tests/release/publish-workflow.test.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/release/publish-workflow.test.ts b/tests/release/publish-workflow.test.ts index a752b4e..1c3aab3 100644 --- a/tests/release/publish-workflow.test.ts +++ b/tests/release/publish-workflow.test.ts @@ -58,4 +58,27 @@ describe("npm publish workflow authorization", () => { 'git diff --no-renames --name-only -z "$TAG_SHA"', ); }); + + it("allows the already-merged 3.0.7 documentation cleanup but rejects runtime changes after the tag", () => { + const allowedPatterns = workflow + .match(/case "\\$changed_path" in\\s*([^\\n]+)\\)/)?.[1] + ?.trim() + .split("|"); + + expect(allowedPatterns).toBeDefined(); + for (const path of [ + "CODE_OF_CONDUCT.md", + "CONTRIBUTING.md", + "GOVERNANCE.md", + "SECURITY.md", + "tests/release/publish-workflow.test.ts", + ]) { + expect(allowedPatterns).toContain(path); + } + expect(allowedPatterns).not.toContain("src/*"); + expect(allowedPatterns).not.toContain("scripts/*"); + expect(workflow).toContain( + 'Change after ${RELEASE_TAG} is outside release documentation', + ); + }); }); From 9e4ee9a50eb02f265fd6a1f44112a7a62943b319 Mon Sep 17 00:00:00 2001 From: Williams Ashibuogwu Date: Thu, 19 Nov 2026 01:59:58 +0100 Subject: [PATCH 02/10] test: use literal shell allowlist match in release regression --- tests/release/publish-workflow.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/release/publish-workflow.test.ts b/tests/release/publish-workflow.test.ts index 1c3aab3..1f5cff8 100644 --- a/tests/release/publish-workflow.test.ts +++ b/tests/release/publish-workflow.test.ts @@ -61,7 +61,7 @@ describe("npm publish workflow authorization", () => { it("allows the already-merged 3.0.7 documentation cleanup but rejects runtime changes after the tag", () => { const allowedPatterns = workflow - .match(/case "\\$changed_path" in\\s*([^\\n]+)\\)/)?.[1] + .match(/case "\$changed_path" in\s*([^\n]+)\)/)?.[1] ?.trim() .split("|"); From ca7757ce15e21c71734ef0cb9d5ec6c353ccc434 Mon Sep 17 00:00:00 2001 From: Williams Ashibuogwu Date: Thu, 19 Nov 2026 02:00:11 +0100 Subject: [PATCH 03/10] fix: permit documentation cleanup in v3.0.7 npm publication guard --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b712cfa..1c6ba04 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -160,7 +160,7 @@ jobs: while IFS= read -r -d '' changed_path; do case "$changed_path" in - README.md|CHANGELOG.md|LICENSE|RELEASE_NOTES_*.md|docs/*|src/templates/api/README.md|dist/templates/api/README.md|.github/workflows/publish.yml|.github/workflows/release-openchain-3.0.7.yml|tests/release/openchain-release-workflow.test.ts) + README.md|CHANGELOG.md|LICENSE|CODE_OF_CONDUCT.md|CONTRIBUTING.md|GOVERNANCE.md|SECURITY.md|RELEASE_NOTES_*.md|docs/*|src/templates/api/README.md|dist/templates/api/README.md|.github/workflows/publish.yml|.github/workflows/release-openchain-3.0.7.yml|tests/release/openchain-release-workflow.test.ts|tests/release/publish-workflow.test.ts) ;; package.json) node -e ' From d7125cd2cb2e0b042ada205d0ff7be754af155f1 Mon Sep 17 00:00:00 2001 From: Williams Ashibuogwu Date: Thu, 19 Nov 2026 02:00:28 +0100 Subject: [PATCH 04/10] test: keep release guard regression formatting concise --- tests/release/publish-workflow.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/release/publish-workflow.test.ts b/tests/release/publish-workflow.test.ts index 1f5cff8..cb7fc30 100644 --- a/tests/release/publish-workflow.test.ts +++ b/tests/release/publish-workflow.test.ts @@ -59,7 +59,7 @@ describe("npm publish workflow authorization", () => { ); }); - it("allows the already-merged 3.0.7 documentation cleanup but rejects runtime changes after the tag", () => { + it("allows post-tag docs cleanup but rejects runtime changes", () => { const allowedPatterns = workflow .match(/case "\$changed_path" in\s*([^\n]+)\)/)?.[1] ?.trim() From d2eb74f0eaaa80bb6ab87eb61a356f8e9b7e8280 Mon Sep 17 00:00:00 2001 From: Williams Ashibuogwu Date: Thu, 19 Nov 2026 02:02:58 +0100 Subject: [PATCH 05/10] style: simplify publish guard regression assertion for Prettier --- tests/release/publish-workflow.test.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/release/publish-workflow.test.ts b/tests/release/publish-workflow.test.ts index cb7fc30..eb77ce9 100644 --- a/tests/release/publish-workflow.test.ts +++ b/tests/release/publish-workflow.test.ts @@ -60,10 +60,9 @@ describe("npm publish workflow authorization", () => { }); it("allows post-tag docs cleanup but rejects runtime changes", () => { - const allowedPatterns = workflow - .match(/case "\$changed_path" in\s*([^\n]+)\)/)?.[1] - ?.trim() - .split("|"); + const caseBlock = workflow.split('case "$changed_path" in')[1]; + const allowLine = caseBlock?.split("\n")[1]?.trim(); + const allowedPatterns = allowLine?.replace(/\)$/, "").split("|"); expect(allowedPatterns).toBeDefined(); for (const path of [ From ace595d8e9b15a5cc2c4bc416f9e80a38a880ac7 Mon Sep 17 00:00:00 2001 From: Williams Ashibuogwu Date: Thu, 19 Nov 2026 02:04:47 +0100 Subject: [PATCH 06/10] test: assert release allowlist with existing formatting conventions --- tests/release/publish-workflow.test.ts | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/tests/release/publish-workflow.test.ts b/tests/release/publish-workflow.test.ts index eb77ce9..73ad11a 100644 --- a/tests/release/publish-workflow.test.ts +++ b/tests/release/publish-workflow.test.ts @@ -59,23 +59,13 @@ describe("npm publish workflow authorization", () => { ); }); - it("allows post-tag docs cleanup but rejects runtime changes", () => { - const caseBlock = workflow.split('case "$changed_path" in')[1]; - const allowLine = caseBlock?.split("\n")[1]?.trim(); - const allowedPatterns = allowLine?.replace(/\)$/, "").split("|"); - - expect(allowedPatterns).toBeDefined(); - for (const path of [ - "CODE_OF_CONDUCT.md", - "CONTRIBUTING.md", - "GOVERNANCE.md", - "SECURITY.md", - "tests/release/publish-workflow.test.ts", - ]) { - expect(allowedPatterns).toContain(path); - } - expect(allowedPatterns).not.toContain("src/*"); - expect(allowedPatterns).not.toContain("scripts/*"); + it("keeps the v3.0.7 post-tag cleanup publishable", () => { + expect(workflow).toContain( + "|CODE_OF_CONDUCT.md|CONTRIBUTING.md|GOVERNANCE.md|SECURITY.md|", + ); + expect(workflow).toContain("|tests/release/publish-workflow.test.ts)"); + expect(workflow).not.toContain("src/*"); + expect(workflow).not.toContain("scripts/*"); expect(workflow).toContain( 'Change after ${RELEASE_TAG} is outside release documentation', ); From 4e2e53901aa1b665b382f97e9d811c4eafdc7109 Mon Sep 17 00:00:00 2001 From: Williams Ashibuogwu Date: Thu, 19 Nov 2026 02:05:11 +0100 Subject: [PATCH 07/10] style: format publication guard regression test --- tests/release/publish-workflow.test.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/release/publish-workflow.test.ts b/tests/release/publish-workflow.test.ts index 73ad11a..afcb09c 100644 --- a/tests/release/publish-workflow.test.ts +++ b/tests/release/publish-workflow.test.ts @@ -66,8 +66,6 @@ describe("npm publish workflow authorization", () => { expect(workflow).toContain("|tests/release/publish-workflow.test.ts)"); expect(workflow).not.toContain("src/*"); expect(workflow).not.toContain("scripts/*"); - expect(workflow).toContain( - 'Change after ${RELEASE_TAG} is outside release documentation', - ); + expect(workflow).toContain("Change after ${RELEASE_TAG} is outside release documentation"); }); }); From 230e4a290d5c564450848110dca9378355e32cc8 Mon Sep 17 00:00:00 2001 From: Williams Ashibuogwu Date: Thu, 19 Nov 2026 02:05:25 +0100 Subject: [PATCH 08/10] style: use Prettier double quotes in publish regression test --- tests/release/publish-workflow.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/release/publish-workflow.test.ts b/tests/release/publish-workflow.test.ts index afcb09c..4c9f194 100644 --- a/tests/release/publish-workflow.test.ts +++ b/tests/release/publish-workflow.test.ts @@ -66,6 +66,8 @@ describe("npm publish workflow authorization", () => { expect(workflow).toContain("|tests/release/publish-workflow.test.ts)"); expect(workflow).not.toContain("src/*"); expect(workflow).not.toContain("scripts/*"); - expect(workflow).toContain("Change after ${RELEASE_TAG} is outside release documentation"); + expect(workflow).toContain( + "Change after ${RELEASE_TAG} is outside release documentation", + ); }); }); From a4c5035ec4994d4712f6bc7d3f64004488da3fd8 Mon Sep 17 00:00:00 2001 From: Williams Ashibuogwu Date: Thu, 19 Nov 2026 02:06:34 +0100 Subject: [PATCH 09/10] test: verify publish allowlist using established release test style --- tests/release/publish-workflow.test.ts | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/tests/release/publish-workflow.test.ts b/tests/release/publish-workflow.test.ts index 4c9f194..45477a9 100644 --- a/tests/release/publish-workflow.test.ts +++ b/tests/release/publish-workflow.test.ts @@ -57,17 +57,10 @@ describe("npm publish workflow authorization", () => { expect(workflow).toContain( 'git diff --no-renames --name-only -z "$TAG_SHA"', ); - }); - - it("keeps the v3.0.7 post-tag cleanup publishable", () => { - expect(workflow).toContain( - "|CODE_OF_CONDUCT.md|CONTRIBUTING.md|GOVERNANCE.md|SECURITY.md|", - ); - expect(workflow).toContain("|tests/release/publish-workflow.test.ts)"); - expect(workflow).not.toContain("src/*"); + expect(workflow).toContain("CODE_OF_CONDUCT.md|CONTRIBUTING.md"); + expect(workflow).toContain("GOVERNANCE.md|SECURITY.md"); + expect(workflow).toContain("tests/release/publish-workflow.test.ts"); expect(workflow).not.toContain("scripts/*"); - expect(workflow).toContain( - "Change after ${RELEASE_TAG} is outside release documentation", - ); }); + }); From e6fb1c243b4141d45d5aa07f5770292ee70ea201 Mon Sep 17 00:00:00 2001 From: Williams Ashibuogwu Date: Thu, 19 Nov 2026 02:06:43 +0100 Subject: [PATCH 10/10] style: remove extra blank line in release regression test --- tests/release/publish-workflow.test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/release/publish-workflow.test.ts b/tests/release/publish-workflow.test.ts index 45477a9..6e8be61 100644 --- a/tests/release/publish-workflow.test.ts +++ b/tests/release/publish-workflow.test.ts @@ -62,5 +62,4 @@ describe("npm publish workflow authorization", () => { expect(workflow).toContain("tests/release/publish-workflow.test.ts"); expect(workflow).not.toContain("scripts/*"); }); - });