fix: remove invalid permissions block from workflow calling reusable workflow#603
fix: remove invalid permissions block from workflow calling reusable workflow#603
Conversation
* fix: correct YAML syntax in agents-issue-intake.yml template The 'if' condition in the check_labels job was improperly formatted, causing the line to wrap incorrectly with 'runs-on' ending up on the same line. This resulted in startup_failure errors when the workflow was deployed to consumer repos. Changes: - Use multiline scalar (|) for complex if condition - Properly indent continuation lines - Ensure runs-on is on its own line Fixes workflow failures in stranske/Travel-Plan-Permission and other consumer repositories using this template. * fix: add validation safeguards for template changes Problem: Template changes sync to 4+ consumer repos. A syntax error in agents-issue-intake.yml caused startup_failure in all consumer repos because there was no validation preventing bad templates. Changes: 1. Fix YAML syntax error in check_labels job (multiline if condition) 2. Add validate_workflow_yaml.py script to catch YAML/style issues 3. Add pre-commit hook to validate templates before commit 4. Add CRITICAL section to CLAUDE.md about template changes Safeguards added: - Pre-commit hook blocks template commits with validation errors - Script checks: YAML syntax, line length (100), runs-on placement - Clear warning in CLAUDE.md with validation commands - Enforces repo standards before sync Related: Travel-Plan-Permission#253, Workflows#602
|
Status | ✅ no new diagnostics |
Automated Status SummaryHead SHA: 893e7fd
Coverage Overview
Coverage Trend
Top Coverage Hotspots (lowest coverage)
Updated automatically; will refresh on subsequent CI/Docker completions. Keepalive checklistScopeAddress unmet acceptance criteria from PR #252. Original scope:
Context for AgentRelated Issues/PRsReferences
Tasks
Acceptance criteria
|
🤖 Keepalive Loop StatusPR #603 | Agent: Codex | Iteration 0/5 Current State
🔍 Failure Classification| Error type | infrastructure | |
* fix: correct YAML syntax in agents-issue-intake.yml template The 'if' condition in the check_labels job was improperly formatted, causing the line to wrap incorrectly with 'runs-on' ending up on the same line. This resulted in startup_failure errors when the workflow was deployed to consumer repos. Changes: - Use multiline scalar (|) for complex if condition - Properly indent continuation lines - Ensure runs-on is on its own line Fixes workflow failures in stranske/Travel-Plan-Permission and other consumer repositories using this template. * fix: add validation safeguards for template changes Problem: Template changes sync to 4+ consumer repos. A syntax error in agents-issue-intake.yml caused startup_failure in all consumer repos because there was no validation preventing bad templates. Changes: 1. Fix YAML syntax error in check_labels job (multiline if condition) 2. Add validate_workflow_yaml.py script to catch YAML/style issues 3. Add pre-commit hook to validate templates before commit 4. Add CRITICAL section to CLAUDE.md about template changes Safeguards added: - Pre-commit hook blocks template commits with validation errors - Script checks: YAML syntax, line length (100), runs-on placement - Clear warning in CLAUDE.md with validation commands - Enforces repo standards before sync Related: Travel-Plan-Permission#253, Workflows#602
There was a problem hiding this comment.
Pull request overview
This PR fixes a critical GitHub Actions workflow failure by removing an invalid permissions block from a job that calls a reusable workflow, and implements YAML validation tooling to prevent similar issues in the future.
- Removes invalid
permissionsblock from thesyncjob that was preventing the workflow from starting (jobs calling reusable workflows viauses:cannot override permissions) - Formats long
ifconditions to multiline format to comply with the 100-character line length standard - Adds a new Python validation script and pre-commit hook to catch workflow YAML issues before they reach CI
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| templates/consumer-repo/.github/workflows/agents-issue-intake.yml | Removes invalid permissions block from sync job and reformats two long if conditions to multiline format for 100-char compliance |
| scripts/validate_workflow_yaml.py | New validation script that checks workflow YAML files for syntax errors, line length, runs-on placement, and multiline condition formatting |
| CLAUDE.md | Adds critical warning section documenting template change procedures, validation requirements, and the 100-character line length standard |
| .pre-commit-config.yaml | Adds pre-commit hook to automatically validate workflow template files before commit |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The workflow now uses the CODESPACES_WORKFLOWS secret which has merge permissions, falling back to GITHUB_TOKEN if not available. Successfully merged sync PRs in Manager-Database, Template, and trip-planner using this token.
- Parse multiline REGISTERED_CONSUMER_REPOS env var instead of hardcoded list - Add stale PR cleanup: close and delete branches for older sync PRs - Process repos in order from REGISTERED_CONSUMER_REPOS (7 repos total) - Increase per_page to 20 to catch multiple stale PRs - Add stale_closed status tracking in summary
- Extract consumer repo list from maint-68-sync-consumer-repos.yml at runtime - Use yq to parse the authoritative REGISTERED_CONSUMER_REPOS env var - Remove duplicated hardcoded list to maintain single source of truth
- Change default max_length from 150 to 100 to match repo standards (black, ruff, isort) - Add explicit encoding='utf-8' to all file operations for cross-platform compatibility - Remove redundant condition check (already verified by elif condition)
- Add critical section to CLAUDE.md about checking new workflows for file artifacts - Create comprehensive WORKFLOW_ARTIFACT_CHECKLIST.md with decision trees and examples - Document common artifact patterns that cause merge conflicts in consumer repos - Provide recovery procedures for artifact pollution - Emphasize template workflows sync to 7+ repos (one mistake = 7+ conflicts)
- Require addressing ALL bot comments before merging PRs - Document that bot comments are mandatory fixes, not suggestions - Provide process for evaluating and resolving bot feedback - Emphasize impact: ignored comments → bugs in 7+ consumer repos - Add examples of critical issues bots catch (encoding, defaults, logic)
- Add workflow to EXPECTED_NAMES test mapping - Document in docs/ci/WORKFLOWS.md with description - Add to docs/ci/WORKFLOW_SYSTEM.md workflow table - Fixes test failures: test_canonical_workflow_names_match_expected_mapping, test_workflow_names_match_filename_convention, test_inventory_docs_list_all_workflows
- Quote $repos variable in yq pipeline to prevent word splitting (SC2086) - Quote $GITHUB_OUTPUT and $GITHUB_STEP_SUMMARY variables - Fixes shellcheck warnings in actionlint
Automated Status Summary
Scope
Address unmet acceptance criteria from PR #252.
Original scope:
Context for Agent
Related Issues/PRs
References
Tasks
Acceptance criteria
Head SHA: 4f61f04
Latest Runs: ✅ success — Gate
Required: gate: ✅ success