Skip to content

fix(ci): repair workflows made unparseable by a blind permissions ins… - #92

Merged
hyperpolymath merged 2 commits into
mainfrom
fix/unparseable-workflows
Aug 24, 2026
Merged

fix(ci): repair workflows made unparseable by a blind permissions ins…#92
hyperpolymath merged 2 commits into
mainfrom
fix/unparseable-workflows

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

…ertion

These workflow files are not valid YAML, so they have NEVER run. GitHub Actions rejects the file before creating any job: the run is recorded as failure with no jobs, no log and no check run, and gh pr checks shows no row at all. A red mark with nothing behind it to read.

The cause is a sweep that added permission declarations by LINE POSITION rather than by parsing the document. Two invalid shapes resulted.

permissions: read-all
actions: read <- a mapping indented under a SCALAR value

read-all is a scalar and cannot take children. It also already grants everything actions: read would, so the orphaned line is dropped and nothing is lost.

on:
permissions: contents: read <- two colons on one line, and
push: permissions is not a valid key here

Dropped entirely.

VERIFIED, not assumed. Every workflow in this repository parses after the change, and the repairer refuses to write any file that does not parse and still contain jobs afterwards. Where a job-level permissions line was removed, a top-level permissions: remains and is read-only, so nothing is widened — and if none remained the tool reports that rather than inventing one, because guessing a permission set is how you silently over-grant.

ESTATE CONTEXT: 67 repositories and 100 workflow files are in this state. The most frequently broken file is workflow-linter.yml, in 22 repositories — the workflow whose job is to lint workflows was itself unparseable, so it never ran and never caught this.

Detection is being added upstream so it cannot recur invisibly: a strict YAML loader in the governance reusable (hyperpolymath/standards#582). Ordinary validation cannot see this class of fault, because yaml.safe_load accepts duplicate keys and only a full parse catches the malformed indentation.

EXPECT THIS REPOSITORY TO GET LOUDER. Workflows that have been failing silently will now actually run, and some will find real problems.

Summary

Closes #

Type of change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (would change existing behaviour)
  • 🕳️ Soundness fix (fixes a checker/proof false-negative)
  • 📖 Documentation
  • 🧹 Refactor / tech debt (behaviour-preserving)
  • ⚡ Performance
  • 🔧 Build / CI / tooling

How has this been verified?

Checklist

  • My commits are signed (git commit -S).
  • I ran the project's own checks/tests locally and they pass.
  • New files carry the correct SPDX-License-Identifier (code/config MPL-2.0,
    prose CC-BY-SA-4.0); I did not relicense existing files.
  • Docs are updated, and no public claim now overstates what the code does.
  • I have not introduced a soundness hole (or I have flagged where I might have).

Notes for reviewers

…ertion

These workflow files are not valid YAML, so they have NEVER run. GitHub
Actions rejects the file before creating any job: the run is recorded as
`failure` with no jobs, no log and no check run, and `gh pr checks` shows no
row at all. A red mark with nothing behind it to read.

The cause is a sweep that added permission declarations by LINE POSITION
rather than by parsing the document. Two invalid shapes resulted.

  permissions: read-all
    actions: read            <- a mapping indented under a SCALAR value

`read-all` is a scalar and cannot take children. It also already grants
everything `actions: read` would, so the orphaned line is dropped and nothing
is lost.

  on:
    permissions: contents: read     <- two colons on one line, and
    push:                              `permissions` is not a valid key here

Dropped entirely.

VERIFIED, not assumed. Every workflow in this repository parses after the
change, and the repairer refuses to write any file that does not parse and
still contain jobs afterwards. Where a job-level permissions line was removed,
a top-level `permissions:` remains and is read-only, so nothing is widened —
and if none remained the tool reports that rather than inventing one, because
guessing a permission set is how you silently over-grant.

ESTATE CONTEXT: 67 repositories and 100 workflow files are in this state.
The most frequently broken file is workflow-linter.yml, in 22 repositories —
the workflow whose job is to lint workflows was itself unparseable, so it
never ran and never caught this.

Detection is being added upstream so it cannot recur invisibly: a strict YAML
loader in the governance reusable (hyperpolymath/standards#582). Ordinary
validation cannot see this class of fault, because yaml.safe_load accepts
duplicate keys and only a full parse catches the malformed indentation.

EXPECT THIS REPOSITORY TO GET LOUDER. Workflows that have been failing
silently will now actually run, and some will find real problems.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
@gitar-bot

gitar-bot Bot commented Aug 24, 2026

Copy link
Copy Markdown

Important

You are using the Gitar free plan. Upgrade to unlock code review, CI analysis, auto-apply, custom automations, and more.

Gitar

@hyperpolymath
hyperpolymath merged commit c2e6e90 into main Aug 24, 2026
5 checks passed
@hyperpolymath
hyperpolymath deleted the fix/unparseable-workflows branch August 24, 2026 05:26
@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant