From 4ff9885c983619d68f2667d71b0d184d2a844670 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Tue, 6 Oct 2026 10:49:07 -0700 Subject: [PATCH 1/7] Automatically generate MD files for PRs For PRs that use branches in the upstream repo, we can automatically generate the markdown files and add a commit to the PR with the change, so that users can just directly edit the json file in the github UI. For forked PRs we can't do that, and for PRs that already update the markdown files, we don't clobber their changes; instead just validate. --- .github/workflows/ci.yml | 29 ++++++++++++++++++++++++++--- howto.md | 2 ++ 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 53c95f2..abb9fc5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,11 +11,16 @@ jobs: name: Check proposals.json and generated Markdown runs-on: ubuntu-latest permissions: - contents: read + contents: write steps: - name: Checkout uses: actions/checkout@v7 + with: + # For same-repo PRs, check out the actual PR branch (head_ref) so CI + # can push commits to it; for fork PRs and pushes, use github.ref. + ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.head_ref || github.ref }} + fetch-depth: 0 - name: Set up Python uses: actions/setup-python@v7 @@ -25,5 +30,23 @@ jobs: - name: Install jsonschema run: pip install jsonschema - - name: Validate proposals.json and check that Markdown files are up to date - run: python generate_markdown.py --check + - name: Validate proposals.json and check or update Markdown files + env: + IS_SAME_REPO_PR: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }} + BASE_REF: ${{ github.base_ref }} + run: | + # For same-repo PRs that don't modify any of the Markdown files, + # regenerate the Markdown files and commit any updates to the PR branch. + # Otherwise, run --check so we don't clobber manual Markdown edits. + if [ "$IS_SAME_REPO_PR" = "true" ] && git diff --quiet "origin/${BASE_REF}...HEAD" -- README.md finished-proposals.md inactive-proposals.md; then + python generate_markdown.py + if ! git diff --quiet -- README.md finished-proposals.md inactive-proposals.md; then + git config user.name 'github-actions[bot]' + git config user.email '41898282+github-actions[bot]@users.noreply.github.com' + git add README.md finished-proposals.md inactive-proposals.md + git commit -m 'Regenerate Markdown files from proposals.json' + git push + fi + else + python generate_markdown.py --check + fi diff --git a/howto.md b/howto.md index a9062e9..282a527 100644 --- a/howto.md +++ b/howto.md @@ -168,6 +168,8 @@ Add the proposal to the list of active proposals by creating a respective PR. 4. Commit `proposals.json` and `README.md` and create a PR. +**Note:** If you have write access to `WebAssembly/proposals` and create the PR on a branch in the repo (for example, by editing `proposals.json` directly in the GitHub web UI), you can skip running `./generate_markdown.py` locally and CI will commit the regenerated Markdown files to your PR automatically. + ## Setting up CI and GitHub Pages From cd4c4525e7c6541c15e8ef710e912de00bb1131d Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Tue, 6 Oct 2026 10:57:29 -0700 Subject: [PATCH 2/7] try updating extended-name-section --- proposals.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proposals.json b/proposals.json index 2cc5baa..80bec0d 100644 --- a/proposals.json +++ b/proposals.json @@ -97,7 +97,7 @@ "extended-name-section": { "name": "Extended Name Section", "url": "https://github.com/WebAssembly/extended-name-section", - "phase": 2, + "phase": 3, "champions": [ "Ben Visness" ] From 5eba918cb54a0cd901a627790df422b84d467f17 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 6 Oct 2026 17:57:47 +0000 Subject: [PATCH 3/7] Regenerate Markdown files from proposals.json --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 86884b6..60daaf1 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ _These proposals have not yet been merged to the spec. Merged proposals are list | [Stack Switching][stack-switching] | Francis McCabe and Sam Lindley | | [Custom Page Sizes][custom-page-sizes] | Nick Fitzgerald | | [Custom Descriptors and JS Interop][custom-descs] | Thomas Lively | +| [Extended Name Section][extended-name-section] | Ben Visness | ### Phase 2 - Proposed Spec Text Available (CG + WG) @@ -45,7 +46,6 @@ _These proposals have not yet been merged to the spec. Merged proposals are list | ------------------------------------------------------------ | -------------------------------------- | | [Relaxed dead code validation][relaxed-dead-code-validation] | Conrad Watt and Ross Tate | | [Numeric Values in WAT Data Segments][numeric-values-in-wat] | Ezzat Chamudi | -| [Extended Name Section][extended-name-section] | Ben Visness | | [Rounding Variants][rounding-mode-control] | Kloud Koder | | [Compilation Hints][compilation-hints] | Emanuel Ziegler | | [JS Primitive Builtins][js-primitive-builtins] | Sébastien Doeraene | @@ -95,9 +95,9 @@ Please see [Contributing to WebAssembly](https://github.com/WebAssembly/design/b [stack-switching]: https://github.com/WebAssembly/stack-switching [custom-page-sizes]: https://github.com/WebAssembly/custom-page-sizes [custom-descs]: https://github.com/WebAssembly/custom-descriptors +[extended-name-section]: https://github.com/WebAssembly/extended-name-section [relaxed-dead-code-validation]: https://github.com/WebAssembly/relaxed-dead-code-validation [numeric-values-in-wat]: https://github.com/WebAssembly/wat-numeric-values -[extended-name-section]: https://github.com/WebAssembly/extended-name-section [rounding-mode-control]: https://github.com/WebAssembly/rounding-mode-control [compilation-hints]: https://github.com/WebAssembly/compilation-hints [js-primitive-builtins]: https://github.com/WebAssembly/js-primitive-builtins From 1f66996156731c91b7480f58a807345df8e6d4ed Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Tue, 6 Oct 2026 10:59:24 -0700 Subject: [PATCH 4/7] Revert "Regenerate Markdown files from proposals.json" This reverts commit 5eba918cb54a0cd901a627790df422b84d467f17. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 60daaf1..86884b6 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,6 @@ _These proposals have not yet been merged to the spec. Merged proposals are list | [Stack Switching][stack-switching] | Francis McCabe and Sam Lindley | | [Custom Page Sizes][custom-page-sizes] | Nick Fitzgerald | | [Custom Descriptors and JS Interop][custom-descs] | Thomas Lively | -| [Extended Name Section][extended-name-section] | Ben Visness | ### Phase 2 - Proposed Spec Text Available (CG + WG) @@ -46,6 +45,7 @@ _These proposals have not yet been merged to the spec. Merged proposals are list | ------------------------------------------------------------ | -------------------------------------- | | [Relaxed dead code validation][relaxed-dead-code-validation] | Conrad Watt and Ross Tate | | [Numeric Values in WAT Data Segments][numeric-values-in-wat] | Ezzat Chamudi | +| [Extended Name Section][extended-name-section] | Ben Visness | | [Rounding Variants][rounding-mode-control] | Kloud Koder | | [Compilation Hints][compilation-hints] | Emanuel Ziegler | | [JS Primitive Builtins][js-primitive-builtins] | Sébastien Doeraene | @@ -95,9 +95,9 @@ Please see [Contributing to WebAssembly](https://github.com/WebAssembly/design/b [stack-switching]: https://github.com/WebAssembly/stack-switching [custom-page-sizes]: https://github.com/WebAssembly/custom-page-sizes [custom-descs]: https://github.com/WebAssembly/custom-descriptors -[extended-name-section]: https://github.com/WebAssembly/extended-name-section [relaxed-dead-code-validation]: https://github.com/WebAssembly/relaxed-dead-code-validation [numeric-values-in-wat]: https://github.com/WebAssembly/wat-numeric-values +[extended-name-section]: https://github.com/WebAssembly/extended-name-section [rounding-mode-control]: https://github.com/WebAssembly/rounding-mode-control [compilation-hints]: https://github.com/WebAssembly/compilation-hints [js-primitive-builtins]: https://github.com/WebAssembly/js-primitive-builtins From 672d0cf5604db553131721f03cec845a58f8d3c9 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Tue, 6 Oct 2026 10:59:46 -0700 Subject: [PATCH 5/7] Revert "try updating extended-name-section" This reverts commit cd4c4525e7c6541c15e8ef710e912de00bb1131d. --- proposals.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proposals.json b/proposals.json index 80bec0d..2cc5baa 100644 --- a/proposals.json +++ b/proposals.json @@ -97,7 +97,7 @@ "extended-name-section": { "name": "Extended Name Section", "url": "https://github.com/WebAssembly/extended-name-section", - "phase": 3, + "phase": 2, "champions": [ "Ben Visness" ] From 4661cf42aac826df5b420067bb1ab5c8772e38a1 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Tue, 6 Oct 2026 13:17:48 -0700 Subject: [PATCH 6/7] glob for all the md files --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index abb9fc5..f673ea3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,12 +38,12 @@ jobs: # For same-repo PRs that don't modify any of the Markdown files, # regenerate the Markdown files and commit any updates to the PR branch. # Otherwise, run --check so we don't clobber manual Markdown edits. - if [ "$IS_SAME_REPO_PR" = "true" ] && git diff --quiet "origin/${BASE_REF}...HEAD" -- README.md finished-proposals.md inactive-proposals.md; then + if [ "$IS_SAME_REPO_PR" = "true" ] && git diff --quiet "origin/${BASE_REF}...HEAD" -- '*.md'; then python generate_markdown.py - if ! git diff --quiet -- README.md finished-proposals.md inactive-proposals.md; then + if ! git diff --quiet -- '*.md'; then git config user.name 'github-actions[bot]' git config user.email '41898282+github-actions[bot]@users.noreply.github.com' - git add README.md finished-proposals.md inactive-proposals.md + git add '*.md' git commit -m 'Regenerate Markdown files from proposals.json' git push fi From 2ad5218b292306668a673e17dbcf2683431d5eeb Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Tue, 6 Oct 2026 16:36:24 -0700 Subject: [PATCH 7/7] Reapply "try updating extended-name-section" This reverts commit 672d0cf5604db553131721f03cec845a58f8d3c9. --- proposals.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proposals.json b/proposals.json index 2cc5baa..80bec0d 100644 --- a/proposals.json +++ b/proposals.json @@ -97,7 +97,7 @@ "extended-name-section": { "name": "Extended Name Section", "url": "https://github.com/WebAssembly/extended-name-section", - "phase": 2, + "phase": 3, "champions": [ "Ben Visness" ]