Skip to content
This repository was archived by the owner on Jun 16, 2026. It is now read-only.

fix: remove null include key causing _reusable-test.yml to fail - #298

Merged
Adam Poulemanos (bashandbone) merged 1 commit into
mainfrom
copilot/fix-reusable-workflow-syntax-errors
Apr 6, 2026
Merged

fix: remove null include key causing _reusable-test.yml to fail#298
Adam Poulemanos (bashandbone) merged 1 commit into
mainfrom
copilot/fix-reusable-workflow-syntax-errors

Conversation

Copilot AI commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

Summary

The _reusable-test.yml reusable workflow was failing with 0 jobs on every push to main. The root cause was a GitHub Actions schema validation error, not a YAML syntax error.

Root Cause

In the strategy.matrix block, the include: key was present but had only commented-out entries:

include:
  # Free-threaded Python versions (no-GIL) are temporarily disabled...
  #
  #   - python-version: 3.13t
  #     experimental: true

YAML parses include: with no non-comment children as null. GitHub Actions schema validation rejects null for the include field — it must be a list or absent entirely. This caused the workflow to fail immediately with 0 jobs before any steps ran.

Fix

Commented out the include: key itself, preserving the note about re-enabling free-threaded Python versions once upstream compatibility issues are resolved.

Also

  • Added pkl = "0.31.1" to mise.toml — required by the hk pre-push hook runner to parse hk.pkl config (was missing, causing all pushes to fail locally).

Validation

check-jsonschema --builtin-schema github-workflows now passes on _reusable-test.yml and all other workflow files.

Summary by Sourcery

Fix reusable test workflow validation and ensure local hook tooling dependencies are declared.

Bug Fixes:

  • Prevent the reusable test GitHub Actions workflow from failing schema validation due to a null strategy.matrix.include key.

Build:

  • Declare the pkl tool version in mise.toml so local hk pre-push hooks can run successfully.

…dd pkl to mise.toml

Agent-Logs-Url: https://github.com/knitli/codeweaver/sessions/a7b5318c-15d0-477f-86af-9ebf2d4a699c

Co-authored-by: bashandbone <89049923+bashandbone@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot April 6, 2026 14:45
@sourcery-ai

sourcery-ai Bot commented Apr 6, 2026

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Fixes a GitHub Actions reusable workflow matrix configuration that was failing schema validation by commenting out an empty include key and updates mise.toml to declare the pkl tool version required by the local hk pre-push hook runner.

Sequence diagram for GitHub Actions reusable test workflow validation behavior

sequenceDiagram
    actor Developer
    participant GitHub as GitHub
    participant GHActions as GitHubActions
    participant ReusableWorkflow as ReusableTestWorkflow
    participant Validator as SchemaValidator

    Developer->>GitHub: Push to main
    GitHub->>GHActions: Trigger workflow dispatch
    GHActions->>ReusableWorkflow: Load _reusable-test.yml
    ReusableWorkflow->>Validator: Validate workflow schema

    alt Before_fix
        Validator-->>ReusableWorkflow: include field is null
        Validator-->>GHActions: Validation error (invalid matrix.include)
        GHActions-->>Developer: Workflow fails with 0 jobs
    else After_fix
        Validator-->>ReusableWorkflow: include field absent (valid)
        Validator-->>GHActions: Validation passes
        GHActions->>ReusableWorkflow: Evaluate matrix and create jobs
        ReusableWorkflow-->>Developer: Tests run successfully
    end
Loading

File-Level Changes

Change Details Files
Fix GitHub Actions reusable test workflow matrix so schema validation passes and jobs run.
  • Change the strategy.matrix configuration by commenting out the include: key so it is no longer emitted as null in YAML.
  • Preserve and clarify comments about temporarily disabling free-threaded (no-GIL) Python versions and how to re-enable them, including example include entries for future use.
.github/workflows/_reusable-test.yml
Declare the pkl CLI tool version for local development tooling.
  • Add pkl = "0.31.1" to the mise tool configuration so that hk pre-push hooks can parse hk.pkl configuration without failing locally.
mise.toml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@bashandbone
Adam Poulemanos (bashandbone) marked this pull request as ready for review April 6, 2026 16:01
Copilot AI review requested due to automatic review settings April 6, 2026 16:01
@bashandbone
Adam Poulemanos (bashandbone) merged commit 109a052 into main Apr 6, 2026
18 checks passed
@bashandbone
Adam Poulemanos (bashandbone) deleted the copilot/fix-reusable-workflow-syntax-errors branch April 6, 2026 16:02

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The commented-out include example in _reusable-test.yml is a bit confusing and currently shows include: twice with mismatched indentation; consider rewriting it as a single commented snippet that can be safely copy-pasted/uncommented into a valid strategy.matrix.include block to reduce future mistakes when re-enabling free-threaded Pythons.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The commented-out `include` example in `_reusable-test.yml` is a bit confusing and currently shows `include:` twice with mismatched indentation; consider rewriting it as a single commented snippet that can be safely copy-pasted/uncommented into a valid `strategy.matrix.include` block to reduce future mistakes when re-enabling free-threaded Pythons.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 GitHub Actions reusable workflow validation failure (0 jobs) by ensuring the matrix include key is not present as null, and updates the dev toolchain to include the Pkl tool required by local hook tooling (hk).

Changes:

  • Comment out the empty strategy.matrix.include key in _reusable-test.yml to avoid schema-invalid null.
  • Add pkl = "0.31.1" to mise.toml so hk can parse hk.pkl during local hook runs.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
mise.toml Declares Pkl in the global mise tool list to support hk/Pkl-based hook config.
.github/workflows/_reusable-test.yml Removes the schema-invalid empty matrix.include by commenting out the key.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread mise.toml
uv = "latest"
"pipx:exportify" = "latest"
hk = "1.38.0"
pkl = "0.31.1"

Copilot AI Apr 6, 2026

Copy link

Choose a reason for hiding this comment

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

pkl is pinned to 0.31.1 in the global [tools] section, but this file also requests tools.pkl = "latest" in task-level tool definitions (e.g., tasks.check / tasks.format). That can lead to different Pkl versions being used in different contexts (hooks vs tasks vs CI), making failures harder to reproduce. Consider aligning these to a single version (either pin everywhere or rely on latest everywhere) so the toolchain is consistent.

Suggested change
pkl = "0.31.1"
pkl = "latest"

Copilot uses AI. Check for mistakes.
Comment on lines +81 to +90
# include:
# Free-threaded Python versions (no-GIL) are temporarily disabled because upstream
# package compatibility issues prevent them from building successfully. Re-enable
# once the blocking dependencies add free-threaded Python support:
#
# include:
# - python-version: 3.13t
# experimental: true
# - python-version: 3.14t
# experimental: true

Copilot AI Apr 6, 2026

Copy link

Choose a reason for hiding this comment

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

The commented re-enable snippet duplicates include: (once at the correct indentation, then again as # include:). This is easy to misread and could lead to uncommenting the wrong lines later. Prefer a single commented include: block with the list items directly under it (and keep the explanatory note above) so re-enabling is a simple uncomment without having to restructure indentation.

Suggested change
# include:
# Free-threaded Python versions (no-GIL) are temporarily disabled because upstream
# package compatibility issues prevent them from building successfully. Re-enable
# once the blocking dependencies add free-threaded Python support:
#
# include:
# - python-version: 3.13t
# experimental: true
# - python-version: 3.14t
# experimental: true
# Free-threaded Python versions (no-GIL) are temporarily disabled because upstream
# package compatibility issues prevent them from building successfully. Re-enable
# once the blocking dependencies add free-threaded Python support:
#
# include:
# - python-version: 3.13t
# experimental: true
# - python-version: 3.14t
# experimental: true

Copilot uses AI. Check for mistakes.
@github-actions

github-actions Bot commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

I've reviewed PR #298 and the changes look good. This PR successfully addresses a critical GitHub Actions workflow validation issue.

What Changed

1. (lines 81-90)

  • Fixed a schema validation error where the strategy.matrix.include key was present but evaluating to null
  • GitHub Actions schema validation rejects null for the include field - it must be a list or absent entirely
  • The fix correctly comments out the include: key while preserving documentation about free-threaded Python versions

2. mise.toml (line 64)

  • Added pkl = "0.31.1" to the tools section
  • This was a missing dependency required by the hk pre-push hook runner to parse hk.pkl config

Technical Analysis

The root cause was subtle but important: YAML parses an include: key with only commented-out children as null. While this is valid YAML syntax, GitHub Actions workflow schema validation requires the include field to be either:

  • A non-empty array
  • Completely absent from the YAML

The fix properly addresses this by commenting out the key itself (not just its children), which ensures the field is absent rather than null.

Quality Assessment

Correctness: The fix properly resolves the schema validation issue
Code Quality: Changes are minimal and focused on the specific problem
Documentation: Comments clearly explain why free-threaded Python is disabled and how to re-enable it
CI/Checks: All checks are passing (Lint, CodeQL, Socket Security, etc.)
Best Practices: Follows GitHub Actions schema requirements correctly

Minor Suggestion (Non-blocking)

I agree with Sourcery's feedback that the commented-out example in .github/workflows/_reusable-test.yml (lines 81-90) shows include: twice with slightly different formatting. This could be clarified to make it easier to uncomment when free-threaded Python support is ready. However, since the PR is already merged and this is cosmetic, it can be addressed in a future cleanup if desired.

Recommendation

APPROVED

This fix is correct and resolves a blocking issue that was preventing the workflow from running any jobs. The addition of pkl to mise.toml also fixes local development tooling. Great work diagnosing the schema validation issue!

Note: I see this PR is already merged, which makes sense given it was blocking CI. This review is for documentation purposes.

@github-actions

github-actions Bot commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

I've reviewed PR #298 and the changes look good. This PR successfully addresses a critical GitHub Actions workflow validation issue.

What Changed

1. .github/workflows/_reusable-test.yml (lines 81-90)

  • Fixed a schema validation error where the strategy.matrix.include key was present but evaluating to null
  • GitHub Actions schema validation rejects null for the include field - it must be a list or absent entirely
  • The fix correctly comments out the include: key while preserving documentation about free-threaded Python versions

2. mise.toml (line 64)

  • Added pkl = "0.31.1" to the tools section
  • This was a missing dependency required by the hk pre-push hook runner to parse hk.pkl config

Technical Analysis

The root cause was subtle but important: YAML parses an include: key with only commented-out children as null. While this is valid YAML syntax, GitHub Actions workflow schema validation requires the include field to be either:

  • A non-empty array
  • Completely absent from the YAML

The fix properly addresses this by commenting out the key itself (not just its children), which ensures the field is absent rather than null.

Quality Assessment

Correctness: The fix properly resolves the schema validation issue
Code Quality: Changes are minimal and focused on the specific problem
Documentation: Comments clearly explain why free-threaded Python is disabled and how to re-enable it
CI/Checks: All checks are passing (Lint, CodeQL, Socket Security, etc.)
Best Practices: Follows GitHub Actions schema requirements correctly

Minor Suggestion (Non-blocking)

I agree with Sourcery's feedback that the commented-out example in .github/workflows/_reusable-test.yml (lines 81-90) shows include: twice with slightly different formatting. This could be clarified to make it easier to uncomment when free-threaded Python support is ready. However, since the PR is already merged and this is cosmetic, it can be addressed in a future cleanup if desired.

Recommendation

APPROVED

This fix is correct and resolves a blocking issue that was preventing the workflow from running any jobs. The addition of pkl to mise.toml also fixes local development tooling. Great work diagnosing the schema validation issue!

Note: I see this PR is already merged, which makes sense given it was blocking CI. This review is for documentation purposes.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review Summary

This PR correctly fixes the GitHub Actions schema validation error that was causing the reusable test workflow to fail with 0 jobs.

Changes Reviewed

1. Workflow Fix ()

  • ✅ Correctly comments out the include: key that was causing schema validation failures
  • ✅ YAML was parsing include: with only commented children as null, which GitHub Actions schema validation rejects
  • ✅ Preserves documentation about why free-threaded Python versions are temporarily disabled
  • ✅ Maintains proper indentation and formatting

2. Tool Addition (mise.toml:64)

  • ✅ Adds pkl = "0.31.1" to the tools section
  • ✅ Required by the hk pre-push hook runner to parse hk.pkl config
  • ✅ Ensures consistency between CI and local development environments

Technical Assessment

  • Root Cause Analysis: Accurate and thorough
  • Solution: Minimal, non-invasive, and technically correct
  • Documentation: Well-explained in the PR description
  • Alternative Considered: Could have removed the entire commented block, but preserving it as commented documentation is better for future reference
  • CI Status: Lint/Format checks passing, CodeQL passing

Security & Performance

  • No security concerns identified
  • No performance impact
  • Workflow will now properly execute with the expected Python version matrix

Recommendation

APPROVED

This PR should be merged. The fix is straightforward, well-documented, and solves the immediate problem of workflows failing with 0 jobs. The addition of the pkl tool ensures local development environments match the CI requirements.

Great work identifying and fixing this issue!

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review Summary

This PR correctly fixes the GitHub Actions schema validation error that was causing the reusable test workflow to fail with 0 jobs.

Changes Reviewed

1. Workflow Fix (.github/workflows/_reusable-test.yml:81-90)

  • Correctly comments out the include: key that was causing schema validation failures
  • YAML was parsing include: with only commented children as null, which GitHub Actions schema validation rejects
  • Preserves documentation about why free-threaded Python versions are temporarily disabled
  • Maintains proper indentation and formatting

2. Tool Addition (mise.toml:64)

  • Adds pkl = "0.31.1" to the tools section
  • Required by the hk pre-push hook runner to parse hk.pkl config
  • Ensures consistency between CI and local development environments

Technical Assessment

  • Root Cause Analysis: Accurate and thorough
  • Solution: Minimal, non-invasive, and technically correct
  • Documentation: Well-explained in the PR description
  • Alternative Considered: Could have removed the entire commented block, but preserving it as commented documentation is better for future reference
  • CI Status: Lint/Format checks passing, CodeQL passing

Security & Performance

  • No security concerns identified
  • No performance impact
  • Workflow will now properly execute with the expected Python version matrix

Recommendation

APPROVED

This PR should be merged. The fix is straightforward, well-documented, and solves the immediate problem of workflows failing with 0 jobs. The addition of the pkl tool ensures local development environments match the CI requirements.

Great work identifying and fixing this issue!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants