feat: add daily-yamllint-fixer agentic workflow#41574
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
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-fixerworkflow definition with deterministic pre-steps (build + yamllint baseline) and a structured investigation/fix plan. - Checks in the compiled
.lock.ymloutput 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
| **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}}} | ||
| ``` |
|
@copilot review all comments and address unresolved review feedback.
|
|
@copilot please summarize the remaining blockers and next steps for merge readiness.
|
|
@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>
Done in commit |
Generated
*.lock.ymlfiles 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.mdRuns daily (weekdays) via Claude. Skips if an open
[yamllint-fixer]PR already exists.Pre-steps (deterministic):
gh-awfrom source*.lock.ymlfilesAgent phase:
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 isstrings.TrimRight(line, " \t")in the write loop, followed bygo test ./pkg/workflow/ -run TestLogoto guard regressionspkg/workflow/frontmatter_extraction_yaml.go—indentYAMLLines()passes all-whitespace blank lines through verbatim; fix is emitting a bare"\n"insteadschedule:at incorrect indent; traces to YAML marshaling optionsgo buildverification after each change, then rebuilds and recompiles all workflowspkg/workflow/**/*.go,pkg/workflow/assets/**) — lock files are intentionally excluded and regenerated post-merge