Skip to content

fix(governance): reject invalid reusable timeouts - #691

Merged
hyperpolymath merged 2 commits into
mainfrom
fix/reusable-caller-semantic-gate
Aug 29, 2026
Merged

fix(governance): reject invalid reusable timeouts#691
hyperpolymath merged 2 commits into
mainfrom
fix/reusable-caller-semantic-gate

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

  • extend the workflow loadability gate beyond YAML syntax to reject reusable-workflow call jobs that declare timeout-minutes
  • support the existing yq, Python/PyYAML, and Ruby parser paths
  • add a passing reusable-caller fixture and a planted failing fixture

Why

GitHub accepts these files as YAML but rejects them as Actions workflows before creating a job. Six Burble callers therefore produced zero-job startup failures while ordinary PR checks did not appear. GitHub permits timeout configuration inside the called workflow, not on the caller job whose top-level key is uses.

Verification

  • bash -n passes
  • scripts/tests/policy-gates-test.sh passes including the new positive/negative controls
  • tools/policy/check-workflows-parse.sh passes all 157 Standards workflows
  • git diff --check

@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Important

Approval pending

CodeRabbit has no unresolved comments, but it has not reviewed the latest commit.

Use the checkbox below to review the latest commit. CodeRabbit will approve the changes if it finds no blocking issues.

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gitar-bot

gitar-bot Bot commented Aug 29, 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

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

The pull request successfully implements the logic to reject invalid reusable workflow timeouts across multiple parsers (yq, Python, Ruby). Codacy analysis indicates the code is up to standards with no new quality issues detected. However, there are critical implementation errors in the shell test script (scripts/tests/policy-gates-test.sh) regarding directory creation and hardcoded paths that will cause the automated tests to fail or error out during the fixture setup. Additionally, while the core requirements are met, there is no test scenario ensuring that standard jobs (those not using a reusable workflow) still allow the timeout-minutes key, which is a necessary regression check.

About this PR

  • The current test suite lacks a scenario to verify that standard jobs (non-reusable workflow calls) containing 'timeout-minutes' are still correctly accepted. This is necessary to ensure no regression in standard workflow support.

Test suggestions

  • Found recommended test scenario: A reusable workflow call job WITHOUT 'timeout-minutes' passes the gate
  • Found recommended test scenario: A reusable workflow call job WITH 'timeout-minutes' is rejected with a specific error message
  • Found recommended test scenario: The check correctly identifies the invalid pattern using the 'yq' parser path
  • Found recommended test scenario: The check correctly identifies the invalid pattern using the 'python' parser path
  • Found recommended test scenario: The check correctly identifies the invalid pattern using the 'ruby' parser path
  • Missing recommended test scenario: Standard jobs (not using 'uses') with 'timeout-minutes' continue to pass the gate
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Missing recommended test scenario: Standard jobs (not using 'uses') with 'timeout-minutes' continue to pass the gate

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

Comment thread scripts/tests/policy-gates-test.sh
Comment thread scripts/tests/policy-gates-test.sh
@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath merged commit b1048c6 into main Aug 29, 2026
47 checks passed
@hyperpolymath
hyperpolymath deleted the fix/reusable-caller-semantic-gate branch August 29, 2026 12:26
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