Skip to content

build(workflows): tolerate metadata-action YAML parse failures in process_metadata.yml - #14907

Draft
Planeshifter wants to merge 1 commit into
developfrom
philipp/ci-fix-process-metadata-yaml-parse-2026-09-02
Draft

Planeshifter wants to merge 1 commit into
developfrom
philipp/ci-fix-process-metadata-yaml-parse-2026-09-02

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

This pull request:

  • fixes process_metadata.yml so a YAML parse failure in stdlib-js/metadata-action no longer fails the "Process Metadata" job
  • adds continue-on-error: true to the "Extract metadata" step, matching the existing pattern on the "Exit if user does not have write access" step in the same file
  • gates the two downstream steps ("Send tweets" and "Check metadata for workflow dispatch directives") on steps.extract-metadata.outcome == 'success', matching the continue-on-error + outcome gate pattern already used in publish_coverage_pr.yml, so they no-op instead of running on empty or garbage metadata

Related Issues

This pull request does not have any related issues.

Questions

No.

Other

Root cause: process_metadata.yml ran 4 times on 2026-09-02 (runs 33633418814, 33633419895, 33633423946, 33633428450), all within the same minute, all triggered by issue_comment events on 4 different PRs, and all failed at the "Extract metadata" step with:

YAMLException: end of the stream or a document separator is expected (2:1)

stdlib-js/metadata-action parses YAML front-matter out of raw commit-message/comment text. An AI-generated PR review comment containing a Markdown table with a bare | (empty cell) on its own line breaks the action's js-yaml parser. The action is pinned by commit SHA in a separate repository and cannot be patched here, so the fix is workflow-side: tolerate the failure and skip the steps that depend on its output.

Validation: no automated test suite covers GitHub Actions YAML. Ran python3 -c "import yaml; yaml.safe_load(open('.github/workflows/process_metadata.yml'))" to confirm the file is syntactically valid.

Three independent reviews were run against the diff:

  • Reviewer A (correctness): first revision (continue-on-error only, no outcome gates) got request_changes because the downstream steps could then run on empty metadata; the revision adding the two outcome gates got approve.
  • Reviewer B (regression scope): approve. Diff is 3 hunks in 1 file. Happy path is unchanged — the outcome gate is a no-op when extraction succeeds. Previously-unreachable-with-empty-metadata paths are now explicitly closed.
  • Reviewer C (style/conventions): approve. ${{ }}-wrapped multi-condition if: matches the file's existing convention (the "Dispatch workflow with inputs" step already uses this form). Comment style, indentation, and YAML re-checked.

One non-blocking style note: publish_coverage_pr.yml uses unwrapped if: for single-condition gates, this PR uses ${{ }}-wrapped multi-condition gates. Both are valid, this file already mixes both forms. No change made.

Branch: philipp/ci-fix-process-metadata-yaml-parse-2026-09-02, commit 67ee1d83f52f69d3eb8523498f2cab599826ca6b.

Checklist

AI Assistance

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

This PR was authored by Claude Code running as an unattended scheduled routine that investigates CI failures on develop.


@stdlib-js/reviewers

🤖 Generated with Claude Code

https://claude.ai/code/session_017gXw4miWt7onhg4K8YQEJL


Generated by Claude Code

…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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017gXw4miWt7onhg4K8YQEJL

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants