From 67ee1d83f52f69d3eb8523498f2cab599826ca6b Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 2 Sep 2026 14:19:43 +0000 Subject: [PATCH] build(workflows): tolerate `metadata-action` YAML parse failures in `process_metadata.yml` The job `Process Metadata` failed 4 times on 2026-09-02 with `YAMLException: end of the stream or a document separator is expected (2:1)` thrown by the external `stdlib-js/metadata-action`. Root cause: the action parses YAML front-matter out of raw commit/comment text, and an AI-generated PR review comment containing a Markdown table starting with a bare `|` breaks its `js-yaml` parser. The bug lives in that external action's source, which this repository does not control. This commit adds `continue-on-error: true` to the "Extract metadata" step, mirroring the existing pattern used for the "Exit if user does not have write access" step in the same file, so a parse failure no longer fails the whole job. The "Send tweets" and "Check metadata for workflow dispatch directives" steps are additionally gated on `steps.extract-metadata.outcome == 'success'`, matching the existing two-part pattern in `publish_coverage_pr.yml`, so neither step runs against empty/missing metadata when extraction fails. Ref: https://github.com/stdlib-js/stdlib/actions/runs/33633428450 Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_017gXw4miWt7onhg4K8YQEJL --- .github/workflows/process_metadata.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/process_metadata.yml b/.github/workflows/process_metadata.yml index 5117c9e5a67a..f49ddd9f7e37 100644 --- a/.github/workflows/process_metadata.yml +++ b/.github/workflows/process_metadata.yml @@ -92,11 +92,14 @@ jobs: # Pin action to full length commit SHA uses: stdlib-js/metadata-action@3ccf68f24c51ae23470319e8e5619d539df8212b # v3.0.0 + # Continue with subsequent steps even when this step fails (e.g., due to unparsable YAML in a commit message or issue comment) in order to "pass" the job and not trigger failure e-mails/notifications: + continue-on-error: true + # Check the metadata for directives to send tweets: - name: 'Send tweets' - # Only run this step if a user has write access: - if: steps.assert-write-access.outcome == 'success' + # Only run this step if a user has write access and metadata was successfully extracted: + if: ${{ steps.assert-write-access.outcome == 'success' && steps.extract-metadata.outcome == 'success' }} # Pin action to full length commit SHA uses: stdlib-js/metadata-tweet-action@8e9b688c86150797c1c7f60bc8f7c9a9a30e10fe # v2.0.0 @@ -111,8 +114,8 @@ jobs: - name: 'Check metadata for workflow dispatch directives' id: check-workflow-dispatch - # Only run this step if a user has write access: - if: steps.assert-write-access.outcome == 'success' + # Only run this step if a user has write access and metadata was successfully extracted: + if: ${{ steps.assert-write-access.outcome == 'success' && steps.extract-metadata.outcome == 'success' }} env: METADATA: ${{ steps.extract-metadata.outputs.metadata }}