Skip to content

feat: add daily-yamllint-fixer agentic workflow#41574

Merged
pelikhan merged 4 commits into
mainfrom
copilot/reduce-yamllint-noise
Jun 26, 2026
Merged

feat: add daily-yamllint-fixer agentic workflow#41574
pelikhan merged 4 commits into
mainfrom
copilot/reduce-yamllint-noise

Conversation

Copilot AI commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Generated *.lock.yml files produce significant yamllint noise (trailing spaces, indentation errors, empty-line violations) when linted with {extends: default, rules: {line-length: disable, document-start: disable, truthy: {check-keys: false}, comments: {require-starting-space: true, min-spaces-from-content: 1}}}.

New workflow: daily-yamllint-fixer.md

Runs daily (weekdays) via Claude. Skips if an open [yamllint-fixer] PR already exists.

Pre-steps (deterministic):

  • Builds gh-aw from source
  • Installs yamllint 1.38.0 and captures a baseline warning report across all *.lock.yml files

Agent phase:

  • Categorizes warnings by type (trailing-spaces, indentation, comments-indentation, empty-lines) and traces each to its generator root cause:
    • pkg/workflow/header.go — logo lines emitted with trailing spaces; fix is strings.TrimRight(line, " \t") in the write loop, followed by go test ./pkg/workflow/ -run TestLogo to guard regressions
    • pkg/workflow/frontmatter_extraction_yaml.goindentYAMLLines() passes all-whitespace blank lines through verbatim; fix is emitting a bare "\n" instead
    • Schedule indentation — sequence items under schedule: at incorrect indent; traces to YAML marshaling options
  • Applies edits with go build verification after each change, then rebuilds and recompiles all workflows
  • Compares before/after warning counts; only opens a PR if the count decreases
  • PR contains only Go source changes (pkg/workflow/**/*.go, pkg/workflow/assets/**) — lock files are intentionally excluded and regenerated post-merge

Copilot AI and others added 2 commits June 26, 2026 02:08
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Reduce yamllint noise in generated *.lock.yml feat: add daily-yamllint-fixer agentic workflow Jun 26, 2026
Copilot AI requested a review from pelikhan June 26, 2026 02:10
@pelikhan pelikhan marked this pull request as ready for review June 26, 2026 02:12
Copilot AI review requested due to automatic review settings June 26, 2026 02:12

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

Adds a new private, scheduled agentic workflow that runs yamllint against generated *.lock.yml files, guides a Claude-based agent to trace lint noise back to generator root causes in pkg/workflow/, and (when improvements are found) opens a draft PR containing only generator source changes.

Changes:

  • Introduces the daily-yamllint-fixer workflow definition with deterministic pre-steps (build + yamllint baseline) and a structured investigation/fix plan.
  • Checks in the compiled .lock.yml output for the new workflow.
Show a summary per file
File Description
.github/workflows/daily-yamllint-fixer.md New agentic workflow definition and agent instructions for reducing yamllint noise at the generator level.
.github/workflows/daily-yamllint-fixer.lock.yml Generated lock workflow for GitHub Actions execution of the new agentic workflow.

Review details

Tip

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

  • Files reviewed: 1/2 changed files
  • Comments generated: 1
  • Review effort level: Low

Comment on lines +234 to +237
**yamllint config used**:
```yaml
{extends: default, rules: {line-length: disable, document-start: disable, truthy: {check-keys: false}, comments: {require-starting-space: true, min-spaces-from-content: 1}}}
```
@github-actions

Copy link
Copy Markdown
Contributor

@copilot review all comments and address unresolved review feedback.

Generated by 👨‍🍳 PR Sous Chef · 28.1 AIC · ⌖ 1.07 AIC · ⊞ 17.1K ·

@github-actions

Copy link
Copy Markdown
Contributor

@copilot please summarize the remaining blockers and next steps for merge readiness.

Generated by 👨‍🍳 PR Sous Chef · 28.1 AIC · ⌖ 1.07 AIC · ⊞ 17.1K ·

@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot We factor the YAML steps into a dedicated job that gates the agent-job, ensuring the agent is not used if there are no warnings.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

@copilot We factor the YAML steps into a dedicated job that gates the agent-job, ensuring the agent is not used if there are no warnings.

Done in commit refactor: factor yamllint steps into dedicated gate job. The build/install/yamllint steps are now in a dedicated yamllint_check job (needs: [activation]) that exposes has_warnings and warning_count outputs. The top-level if: needs.yamllint_check.outputs.has_warnings == 'true' gates the agent job so it only runs when there are actual warnings to fix. The baseline artifact is uploaded from the gate job and downloaded in the agent job's steps: (along with a yamllint install for Phase 5 verification).

@pelikhan pelikhan merged commit cfb0b88 into main Jun 26, 2026
@pelikhan pelikhan deleted the copilot/reduce-yamllint-noise branch June 26, 2026 02:53
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.

3 participants