Skip to content

Fix duplicate run: key that broke pr.yaml parsing#81

Merged
Chris-Wolfgang merged 2 commits into
mainfrom
fix/pr-yaml-duplicate-run-key
Apr 19, 2026
Merged

Fix duplicate run: key that broke pr.yaml parsing#81
Chris-Wolfgang merged 2 commits into
mainfrom
fix/pr-yaml-duplicate-run-key

Conversation

@Chris-Wolfgang
Copy link
Copy Markdown
Owner

Root cause

The test-linux-core job in `pr.yaml` has an orphan `run:` block at line 244 — the "Install OpenSSL 1.1 for .NET 5.0" step lost its `- name:` header during a prior cleanup. YAML parsers see two `run:` keys under one step, which is invalid.

GitHub Actions silently fails to parse the workflow on duplicate mapping keys. That's why no `pull_request_target` event has ever fired since PR #72 merged — the workflow file was never actually loaded by GitHub Actions. Only the implicit `push` events registered (and failed, since there's no `push:` trigger defined).

Verification

Before fix (parsing the file from main):
```
PARSE ERROR: duplicated mapping key (244:9)
```

After fix:
```
PARSED OK
name: PR Checks v3 (Gated)
on keys: [ 'pull_request_target' ]
jobs: secrets-scan,detect-projects,test-linux-core,test-windows,test-macos-core,security-scan
```

Evidence

  • Sister repo (IAsyncEnumerable-Extensions) has the same workflow and reports `name: "PR Checks v3 (Gated)"` via the API
  • Try-Pattern reports `name: ".github/workflows/pr.yaml"` (the file path — what GitHub uses when parsing fails)
  • Run list shows only `push` events for the last 20 runs, zero `pull_request_target`

Impact

Once merged, Dependabot PRs (#77, #78, #79) and future PRs should have their required checks run normally. This keeps the `pull_request_target` trust model (workflow YAML sourced from main) that was intended.

Merging

This PR is itself subject to the broken required checks. To merge, admin override or temporarily disable the ruleset.

🤖 Generated with Claude Code

The test-linux-core job had an orphan 'run:' block on line 244 — the
'Install OpenSSL 1.1 for .NET 5.0' step lost its '- name:' line during
a prior cleanup, so YAML saw two 'run:' keys under the same step.

GitHub's YAML parser silently fails on duplicate mapping keys, which is
why pull_request_target never fired since PR #72 merged. All open PRs
(including Dependabot updates #77, #78, #79) have been blocked because
no required check ever ran.

Restoring the missing step header fixes the parse error and brings the
workflow back online. Verified with js-yaml: file now parses cleanly
and all 6 jobs are present.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 19, 2026 23:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a YAML structure error in the gated PR workflow so GitHub Actions can successfully parse and run the intended pull_request_target checks.

Changes:

  • Restores the missing - name: header for the “Install OpenSSL 1.1 for .NET 5.0” step to eliminate the duplicate/orphan run: mapping.
  • Adds clarifying comments explaining why libssl1.1 is installed from focal-security.

@Chris-Wolfgang Chris-Wolfgang merged commit 76a3e93 into main Apr 19, 2026
@Chris-Wolfgang Chris-Wolfgang deleted the fix/pr-yaml-duplicate-run-key branch April 19, 2026 23:47
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