Enforce pre-submission lint hygiene and add an early CI lint gate to reduce lint-fix PR churn#31921
Merged
Merged
Conversation
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/1a064c4c-6f69-458d-b2b6-44c53d1628da Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Enforce make fmt && make lint in pre-submission agent validation
Enforce pre-submission lint hygiene and add an early CI lint gate to reduce lint-fix PR churn
May 13, 2026
pelikhan
approved these changes
May 13, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens pre-submission validation and restructures the CGO CI workflow so lint/format failures surface early and prevent expensive downstream jobs from running, reducing follow-up “lint-fix” PR churn.
Changes:
- Update
make agent-report-progressto includelint(in addition tobuild,fmt, andtest-unit) and clarify the gate messaging. - Align
AGENTS.mdcheckpoint guidance with the stricter pre-PR gate, explicitly calling out “zero lint errors” beforereport_progress. - Add a new
lint-gatejob in.github/workflows/cgo.ymland wire many heavyweight jobs toneeds: [lint-gate]so failures block early.
Show a summary per file
| File | Description |
|---|---|
Makefile |
Expands the pre-PR gate to include lint and updates help/output messaging accordingly. |
AGENTS.md |
Updates the two-checkpoint guidance to require a lint-clean agent-report-progress before PR updates. |
.github/workflows/cgo.yml |
Introduces an early lint-gate job and makes major jobs depend on it to fail fast. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 2
|
|
||
| - name: Run formatting + lint gate | ||
| run: | | ||
| make fmt-check |
Comment on lines
+57
to
+64
| - name: Install golangci-lint | ||
| run: make install-golangci-lint | ||
|
|
||
| - name: Run formatting + lint gate | ||
| run: | | ||
| make fmt-check | ||
| make lint | ||
|
|
deargvp1
approved these changes
May 13, 2026
Collaborator
|
@copilot review all comments |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Addressed the actionable review feedback in commit
This keeps early CI feedback while avoiding repeated Go lint work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Copilot PRs were repeatedly failing on lint/format issues after submission, creating avoidable follow-up “lint-fix” PRs and wasting agent throughput. This change tightens pre-submission validation and moves lint feedback to the front of CI.
Pre-submission gate now requires lint cleanliness
agent-report-progressinMakefilefrom:build + fmt + test-unitbuild + fmt + lint + test-unitreport_progress.Agent policy tightened for Checkpoint 2
AGENTS.mdtwo-checkpoint guidance to align with the new gate.report_progress.Early CI lint/fmt gate before heavyweight jobs
lint-gatejob in.github/workflows/cgo.yml.test,build,build-wasm,actions-build,security*, cross-platform/container jobs, etc.) toneeds: [lint-gate]so lint failures surface early and block expensive execution.